Author Topic: Port Forwarding to VirtualBox OSE 3.2.12  (Read 1543 times)

Offline dylan420

  • Full Member
  • ***
  • Posts: 71
Port Forwarding to VirtualBox OSE 3.2.12
« on: January 03, 2011, 02:00:14 AM »
I am having problems because users cannot connect to my chat server running in a Windows XP Pro VirtualBox on my desktop computer which is running PCLinuxOS.
This Is My Current IP and Port forwarding configuration.

 (1)Wireless Modem
-Router IP:192.168.2.1
-WAN IP:156.34.162.246
-wireless: OFF
TCP & UDP Port 4200 Redirected to IP Address:192.168.2.10
-cable connected TO>

   (2)Wireless Router
-WAN IP:192.168.2.10
-LAN IP:192.168.4.20
-wireless: ON
TCP & UDP Port 4200 Redirected to IP Address:192.168.4.200
-running DD-WRT v24-sp2 (10/10/09) micro
SPI Firewall: Disabled
Filter WAN NAT Redirection: OFF

-cable connected TO>

   (3)Desktop Computer
-Static IP:192.168.4.200
-Gateway:192.168.4.20
-running PCLinuxOS 2010.1 KDE4


If I were able to run the server in PCLinuxOS the users would be able to connect because the static ip "192.168.4.200" has port 4200 forwarded to it.
However I am not able to do this. I am running the server in an .iso of Windows XP in VirtualBox OSE 3.2.12.
So within the static ip adress "192.168.4.200" we have VirtualBox with an Ip of 10.0.2.15 and a defaul gateway of 10.0.2.2.
I have run a progam call PFPortChecker to confirm that the port is open on PCLinuxOS(192.168.4.200) but when i run PFPortChecker in the Windows XP VirtualBox
it concludes that the port is closed here.

How do I get VirtualBox to use this forwarded port?

Offline dylan420

  • Full Member
  • ***
  • Posts: 71
Port Forwarding to VirtualBox OSE 3.2.12
« Reply #1 on: January 03, 2011, 09:44:31 AM »
I have successfully configured VirtualBox to allow users to connect to the Arca Eclipse 3.3 chat server running in a WinXP VirtualBox.
I think this information may be useful.

I did this by:
-click "Devices" at the top of the window that XP is running in
-then selecting "Network Adapters" (a window opens)
-In the "Adapter 1" tab beside "Attached to:" I selected "Bridged Apapter" from the drop down menu.
-beside "Name:" I selected "eth0" (which is the LAN connection being used in PCLinuxOS [host OS])
-click ok (the window closes)

I then gave the guest OS a static ip of 192.168.201 , using a default gateway of 192.168.4.20 , and set the prefered DNS server to 192.168.4.20 also.
 (192.168.4.20=Router LAN IP) My host OS ip remaining static 192.168.4.200.

Next I went back to my router logon (DD-WRT) 192.168.4.20 and changed the port to be directed to 192.168.4.201, the guest OS.

Finally I restarted everything. The port is now open to the guest OS to allow users to connect to the chat server (Arca Eclipse).

There is more than one way to do what I did. Another way would be to configure the other interface "vboxnet0" which appeared in my host OS network center. I did not realize this at the time.

Offline GermanTux

  • Hero Member
  • *****
  • Posts: 693
Re: Port Forwarding to VirtualBox OSE 3.2.12
« Reply #2 on: January 12, 2011, 01:39:57 PM »
Dylan, I have no idea why "NAT" is the default network setting when creating a new virtual machine in VBOX, but I highly recommend everyone do what you did for every Virtual Machine you build.  Set the network adapter to "bridged."  It saves a lot of hassle in all regards. 

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3981
Re: Port Forwarding to VirtualBox OSE 3.2.12
« Reply #3 on: January 25, 2011, 03:34:47 PM »
The simple reason NAT is the default is it's adequate for web browsing and provides a firewall for everything else. The default is chosen for safety.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf