Port Forwarding in Ubuntu 11.04 under VirtualBox

Discussions about using Linux guests in VirtualBox.
Post Reply
hypercalm
Posts: 1
Joined: 21. Jun 2011, 16:04
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu

Port Forwarding in Ubuntu 11.04 under VirtualBox

Post by hypercalm »

[If this does not involve issues relating to VirtualBox configuration, please ignore the post or it may be deleted by the admins.
I am new to this, but the problem may have to do with my modem, virtualbox, and Ubuntu. Any help would be really appreciated.]

I am running Ubuntu 11.04 using VirtualBox on a Win XP machine. A certain server that I am running inside Ubuntu needs to be accessible
from the outside on port 27080. I've chosen "bridged adapter" option through VirtualBox.

So, the IP's are like:
Windows (Host) IP: 192.168.1.11
Ubuntu (VM) IP: 192.168.1.3

The server running on port 27080 is accessible from the Windows system. The problem lies with forwarding the ports so that outside users can access it.

I use a Beetel 220x ADSL modem. I've tried using port-forwarding (virtual server option in my modem config), where I put my Linux VM's IP as the destination to forward the specific port. I've even tried configuring my modem in DMZ mode putting the Linux VM's IP as the DMZ host IP address. Nothing has worked so far!

I believe that Ubuntu does not run a firewall by default, but is there any specific settings inside my Linux VM that need to be done to make this work?

Thanks!

VirtualBox:

Devices-->Network Adapters

Attached to: Bridged Adapter
Name: Broadcom 440x 10/100 Integrated Controller

Linux:
eerie@V-Machine:~$ ifconfig
eth0 Link encap:Ethernet HWaddr **********
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe84:de3b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:320762 errors:0 dropped:0 overruns:0 frame:0
TX packets:150458 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23431384 (23.4 MB) TX bytes:11969188 (11.9 MB)


Windows:
Windows IP Configuration

Host Name . . . . . . . . . . . . : Singularity
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom 440x 10/100 Integrated Cont
roller
Physical Address. . . . . . . . . : **********
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.1.11
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 202.56.215.54
202.56.215.55

Ethernet adapter VirtualBox Host-Only Network:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
Physical Address. . . . . . . . . : *********
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Port Forwarding in Ubuntu 11.04 under VirtualBox

Post by Sasquatch »

Do you have internet on the Guest? If not, then you probably haven't set a gateway in it and that prevents the outside to access the Guest service. The Guest gets the request from an outside source, but has no idea how to reply to it, because it doesn't know where the machine is. You can access the service from the Host because it's on the same network, which doesn't require a gateway to work.

Another option is that the service requires another port to be forwarded before it works. Check it's documentation on what ports are required. What you can also do is check with the netstat command (netstat -tl or netstat -tln, that's a small L) to see what ports are used by services to listen on.

The absolute last thing you can check, which should not be a problem at all, is the firewall on the Host. Disable it and see if you get any response.
As you say, this isn't a question for VB, as it's outside the scope of this forum. It has little to do with VB.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply