ssh from FreeBSD to OpenBSD install in VirtualBox

I use FreeBSD 8.1 AMD64 and I install VirtualBox and Install OpenBSD with Virtualbox . During installation I use normal or default networking my openBSD system IP is 10.2.2.10 and my FreeBSD IP is 192.168.0.90, how I can ssh from FreeBSD to OpenBSD installed in Virtualbox, I use default setting of VirtualBox for networking and it is NAT.
 
First off make sure both are in the same network segment. This isn't strictly necessary but it'll make things easier. After that you connect like normal, it doesn't matter if it's OpenBSD or FreeBSD.
 
I go and chagne IP of OpenBSD installed in VirtualBox and change it to 192.168.0.95 with 255.255.255.0 netmask and I set gateway , but when I run ping 192.168.0.95 in FreeBSD box I see this error
Code:
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
and I can not connect with ssh
 
mfaridi said:
I use FreeBSD 8.1 AMD64 and I install VirtualBox and Install OpenBSD with Virtualbox . during installation I use normal or default networking my openBSD system IP is
10.2.2.10 and my FreeBSD IP is 192.168.0.90 , how I can ssh from FreeBSD to OpenBSD installed in Virtualbox , I use default setting of VirtualBox for networking and it is NAT ,

Let's see if I understand this post correctly..
You use FreeBSD as the host OS. This host OS has the IP 10.2.2.10.
Virtualbox runs on this host OS.
OpenBSD is installed as a Virtual Machine in Virtualbox, and has the IP 192.168.0.90. It is using the NAT feature of Virtualbox, so all traffic leaving the host OS from this VM has the source address 10.2.2.10.

You're wondering why the host OS is unable to connect to the virtual machine?

First thing which comes to my mind: Can you post the output from the following command so we can better see what your configuration is like?
$ ifconfig -a
 
I think you can't communicate with the guest OS in VirtualBox if the guest uses NAT networking, bridged setting should work.
 
kpa said:
I think you can't communicate with the guest OS in VirtualBox if the guest uses NAT networking, bridged setting should work.

No you can do it, but it a lot easier to just bridge it, otherwise you have to edit Vbox's port forwarding setup and you run into restrictions like only one VM can have port 22 forwarded to it, etc.
 
Thanks all guys , I change NAT to bridge and I give OpenBSD new IP and I can ssh , but I must check port forwarding in VirtualBox next time .
 
Back
Top