I am using virtualbox 4.1.16 on a Ubuntu 12.04 x64 vm host and all NAT is working properly, like HOST 2222 -> Client 22
But I have changed my HOST sshd
to listen on port 81 and restarted, so host port 22 is free. and order my guest vm to do a NAT (HOST)22 to (CLIENT)22. while the same vm guest, if I map NAT 1234 to 22, it works again.
I have tried ufw disable
, /etc/init.d/apparmor stop
, nothing helps
Is there anything I need to do to make it happen?
This sounds like your VirtualBox process is not running with the right privileges allow it to bind to ports below 1024 - typically that requires root level permissions. According to the VirtualBox manual, there are four limitations to the NAT engine:
Reference: http://www.virtualbox.org/manual/ch06.html#nat-limitations
The best workaround would be to configure your virtual machine to use a bridged virtual network adapter if that will work in your environment.