[Solved] Oracle/ssh servers in Ubuntu guest

Discussions related to using VirtualBox on Windows hosts.
Post Reply
rbms
Posts: 3
Joined: 21. Oct 2009, 02:08
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Ubuntu

[Solved] Oracle/ssh servers in Ubuntu guest

Post by rbms »

Hi,

I am trying to connect to oracle CE and ssh installed in Ubuntu guest from WinXP host
I followed instructions in following sites.

http://forums.virtualbox.org/viewtopic. ... 24&start=0
http://mydebian.blogdns.org/?p=148

Did quite a bit of googling and all the hits pretty much say what is mentioned in above two links.

following command from my windows host (cygwin) does not return anything.
netstat -an |grep 2222
netstat -an |grep 8080

I can see that ports 22 and 8080 in ubuntu guest are listening(terminal) and I can ssh and http from inside guest.

Host IP: 128.137.247.47
guest IP: 128.137.247.20

1. I am using Bridge adapter and I tried all combinations of Adapter Type
2. I can connect to oracle from my host browser using http://128.137.247.20:8080/apex. But What I want is access using http://localhost:8080/apex from my host
3. I can login to my guest from host using ssh user@128.137.247.20. But what I want is access using "ssh -l <user> -p 2222 localhost" from my host

Following is result from "VBoxManage getextradata <guest> enumerate" command.

Any help is greatly appreciated.

***************************************************************************************************
C:\VirtualBox>VBoxManage.exe list vms
VirtualBox Command Line Management Interface Version 3.0.6
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

"WinXP1" {282ff623-68c4-47c9-925a-d365e6402612}
"ubuntu" {ccdab7a3-2f18-4d31-8ca3-c9d3ee72484d}

C:\VirtualBox>VBoxManage.exe getextradata ubuntu enumerate
VirtualBox Command Line Management Interface Version 3.0.6
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Key: GUI/LastCloseAction, Value: powerOff
Key: GUI/LastWindowPostion, Value: 85,68,640,522,max
Key: GUI/Fullscreen, Value: off
Key: GUI/Seamless, Value: off
Key: GUI/AutoresizeGuest, Value: on
Key: GUI/MiniToolBarAutoHide, Value: on
Key: VBoxInternal2/VRDPBindPort, Value: 3389
Key: GUI/SaveMountedAtRuntime, Value: yes
Key: GUI/ShowMiniToolBar, Value: yes
Key: GUI/MiniToolBarAlignment, Value: bottom
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracle_admin/Protocol, Value: TCP
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracle_admin/HostPort, Value: 8080
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracle_admin/GuestPort, Value: 8080
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort, Value: 2222
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort, Value: 22
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol, Value: TCP

C:\VirtualBox>
********************************************************************************************************
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Oracle/ssh servers in Ubuntu guest

Post by Perryg »

But What I want is access using http://localhost:8080/apex from my host
Why?

You have a localhost on both OSes (127.0.0.1). Why not just use a name and put that name in the Windows hosts file with the IP address of the guest?
Since you are using Bridged you should not even need to forward the ports.
rbms
Posts: 3
Joined: 21. Oct 2009, 02:08
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Ubuntu

Re: Oracle/ssh servers in Ubuntu guest

Post by rbms »

Why not just use a name and put that name in the Windows hosts file with the IP address of the guest?
Since you are using Bridged you should not even need to forward the ports.
Because, I connect to different networks. Home, Work, Airport, Hotel etc. And I don't get same ip even when I connect to same network. And I don't want to change the host file every time in host's host file.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Oracle/ssh servers in Ubuntu guest

Post by Perryg »

In that case I would be using host-only mode and a second adapter set to NAT for Internet. Then if you are connected to what ever it will not matter because the host-only will always know where the guest is. You will still need to put the host name and IP address in the Windows host file if you want to use a common name instead of the ip address.
rbms
Posts: 3
Joined: 21. Oct 2009, 02:08
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Ubuntu

Re: Oracle/ssh servers in Ubuntu guest

Post by rbms »

It worked. Thank you

:)
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Oracle/ssh servers in Ubuntu guest

Post by Perryg »

I knew you would make it work. Marking this topic Solved.
Post Reply