PDA

View Full Version : [ubuntu] how to forward ports to virtualbox ?


tjwoosta
September 26th, 2008, 10:57 PM
i have installed windows xp as a virtualbox guest

i want to be able to use utorrent on the virtualbox

but my router has a firewall (requiring me to forward the desired ports to the desired machines)


so how do i forward the utorrent ports to my windows xp guest?

veloce
September 27th, 2008, 04:33 AM
Assuming that you are using bridged networking ...

Find out the ip address of the vm (use ipconfig)

On the firewall, forward the appropriate port to the ip address of the vm.

bob_hilton
September 29th, 2008, 07:46 PM
im trying to do the same but ipconfig show my ip address as
fe80::a00:27ff:feec:e956%5

Delvien
September 30th, 2008, 10:13 AM
im trying to do the same but ipconfig show my ip address as
fe80::a00:27ff:feec:e956%5


?


Do this...

Start>Run> type in "cmd" and hit enter>in the command line type

ipconfig /all

Then look for your ip address, and write it down.

Go into your router settings, find the option for port forwarding. Fill out the spaces, plop the IP address where it asks you, and the port you wanted it to forward.

tjwoosta
September 30th, 2008, 08:43 PM
Find out the ip address of the vm (use ipconfig)

On the firewall, forward the appropriate port to the ip address of the vm.

yea i tried that but i get an error message from my router that says i cant forward the ports because the address is not part of the private subnet

veloce
September 30th, 2008, 08:58 PM
yea i tried that but i get an error message from my router that says i cant forward the ports because the address is not part of the private subnet

Not knowing what address spaces you are using makes it difficult to give any meaningful advice here.

However, if you are using NAT to provide internet access to your vm then it will be on a different subnet.

Alternatively, your vm may not be connected to the network at all. Did you try the "ipconfig /all" suggestion?

tjwoosta
September 30th, 2008, 10:31 PM
the vm is definatly connected because i can browse on firefox

all of the other computers on my network have adresses like 192.168.1.XX

but the vm has 10.0.2.x

veloce
October 1st, 2008, 06:29 PM
the vm is definatly connected because i can browse on firefox

all of the other computers on my network have adresses like 192.168.1.XX

but the vm has 10.0.2.x

Ah, that makes sense. Your virtualbox is set up to use NAT for your vm to access the network (and internet).

To forward a port to your vm, you have two choices:


Get Virtualbox to use bridged networking rather than NAT. I don't actually know if that's possible but then I don't use virtualbox. This would result in your vm having an address in the 192.168.1.xx space.

Forward the port to your host and then setup a "firewall" on the host to forward it again to the virtualbox virtual network (10.0.2.x). This is also beyond my experience. You can see if it is feasible by pinging the vm from the host: ping 10.0.2.x


I know that option 1. is possible under vmware so expect it is under virtualbox.