VirtualBox NAT to access Linux server as guest
I asked this question in networking, but it seems more appropriate in this forum.
I have a Linux server with static IP address, and I want to SSH/SMB to it. In qemu it is easy with "-net user,net=192.168.136.0/24 -redir tcp:22:192.168.136.222:22 -redir tcp:445:192.168.136.222:445" VirtualBox Host-only adapter also works after setting static IP address to it in the same network. Both SSH and SMB work fine in Windows7 host, but then it may conflict with my network, so I prefer using NAT instead and connect to localhost. In Windows7 host if I do "VBoxManage.exe modifyvm "my server" --natpf1 "guestssh,tcp,127.0.0.1,2222,192.168.136.222,22", or equivalently use the dialog, then in Cygwin "ssh -v -p 2222 root@127.0.0.1" connects to the port but here is what I get: Code:
OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011 I tried turning off the firewall/add rules but it has same result. I appreciate any insight, solution for similar problems, thanks |
I found the solution, here is the documentation.
For the static IP address because my static IP is not the default I had to specify the NAT network, it is not something with a dialog option so the only way would be through this: Code:
VBoxManage.exe modifyvm "my server" --natnet1 "192.168.136.0/24" |
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
http://www.linuxquestions.org/questi...arding-903403/ |
All times are GMT -5. The time now is 09:21 PM. |