I'm using virtualbox to run an Ubuntu server from os x. I have NAT and bridged connections set up and I am able to ping back and forth, ssh into the guest box, transfer files with scp, etc. However, when I start the Django development server I'm unable to view this from the host.
$ - manage.py runserver 0.0.0.0:8000
When viewing 192.168.56.1:8000 the page is unable to load.
Here is the ip details for the guest machine, obtained from host:
vboxnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 ether 0a:00:27:00:00:00 inet 192.168.56.1 netmask 0xffffff00 broadcast 192.168.56.255
Within the Ubuntu server I get the following, the first is for the NAT adapter the second is the bridged connection:
eth0 Link encap:Ethernet HWaddr 08:00:27:1f:cd:51 inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe1f:cd51/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1955 errors:0 dropped:0 overruns:0 frame:0 TX packets:1080 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:173919 (173.9 KB) TX bytes:159672 (159.6 KB) eth1 Link encap:Ethernet HWaddr 08:00:27:cf:e8:7f inet addr:192.168.56.1 Bcast:192.168.56.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fecf:e87f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:22205 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1867168 (1.8 MB) TX bytes:468 (468.0 B)
EDIT: If I browse to
http://192.168.56.1 without the port set, it shows my hosts localhost. So presumably the problem is to do with the host not being able to distinguish between itself and the guest?