My host computer is OS X Snow Leopard and is connected to the network via Ethernet. The guest virtual machine is Ubuntu 12.04
My goal is for my virtual machine to behave like any other machine on the LAN. Specifically, I want to be able to SSH to and from the virtual machine and all the other machines on the network.
I thought of two solutions, but I haven't been able to get either solution to work.
A virtual machine with a bridged adapter should behave like a normal machine on the LAN, so I set the adapter 1 for the virtual machine to bridged and selected en0 (ethernet) for the name. I then turned on the virtual machine and found I did not have any Internet access, so I couldn't install OpenSSH Server. To fix this I added a NAT adapter (adapter 2) so that I could install OpenSSH. I could then SSH from my VM to any other machines (I believe the NAT adapter allows me to do this) on the network, but I could not SSH from any other machine to the virtual machine (connection timed out). Here's some results from ifconfig that might be useful:
eth0 Link encap:Ethernet HWaddr 08:00:27:e1:60:d4 inet addr:18.104.22.168 Bcast:22.214.171.124 Mask:255.255.248.0 inet6 addr: fe80::a00:27ff:fee1:60d4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 ether 00:25:bc:dd:62:80 inet6 fe80::225:bcff:fedd:6280%en0 prefixlen 64 scopeid 0x4 inet 126.96.36.199 netmask 0xfffff800 broadcast 188.8.131.52 media: autoselect (1000baseT <full-duplex,flow-control>) status: active
I should mention that the host has a firewall (I think that this might affect things)
The second thing I was considering is port forwarding ssh from the host to the guest. I can set it up so that port XXXX on the host machine forwards to port 22 on the guest machine, however the port XXXX on the host machine cannot be accessed.
ssh -p 2222 184.108.40.206
gives a connection timed out error.
I am pretty sure this is related to the firewall, but I can't play around with the firewall because I don't have administrative access.
How can I get this working?