I have tried this in several ways and haven't succeeded. I tried to find something about this issue on the Internet but it seems that no one has run into this problem before (or I am a lousy user of the search engine). I also tried with a simple one-Ubuntu-guest setup just to check if it is working with that setup, and it did not.
So the setup is following:
-One node on VirtualBox 3.2.8 (yes, I am using an old version for the moment)
-Guest OS is Ubuntu
-One NAT interface
In order to activate the port forwarding to a static IP address I do the following:
1) Shut down the node
2) Add the PF rule with:
Code: Select all
VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,,2222,192.168.130.48,22"4) Since eth0 automatically gets assigned 10.0.2.15 i change it using
Code: Select all
ifconfig eth0 192.168.130.48 netmask 255.255.255.0I have redone this several times trying to reach other ports on the guest (e.g. 3333) with e.g. netcat but the forwarding just doensn't seem to be working.
In the user guide (http://www.virtualbox.org/manual/ch06.html#natforward) it says:
Am I doing something wrong here?If for some reason the guest uses a static assigned IP address not leased from the built-in DHCP server, it is required to specify the guest IP when registering the forwarding rule:
VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,,2222,10.0.2.19,22"
This example is identical to the previous one, except that the NAT engine is being told that the guest can be found at the 10.0.2.19 address.
Thank you in advace.