title: Host-only VirtualBox vboxnet1 IP belongs to host
body: <p>I'm trying to connect to a server running on a guest OS in VirtualBox. VirtualBox is configured to assign a static IP to the guest. However I'm pretty sure that the IP it assigns actually belongs to the host. If I have an nginx server running on the host then requests to the vboxnet1 IP are intercepted by the host serve and never reach the guest. </p>
  
  <p>Both the host and guest are Debian.</p>
  
  <p>Also, I get the same result with and without the VirtualBox DHCP server enabled.</p>
  
  <p>Here's the VirtualBox network settings (can't embed images with &lt;10 rep...sigh):</p>
  
  <p><a href="https://i.stack.imgur.com/p6tUQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p6tUQ.jpg" alt=""></a></p>
  
  <p>And the VM network settings:</p>
  
  <p><a href="https://i.stack.imgur.com/KIBVR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KIBVR.jpg" alt=""></a></p>
  
  <p>I've also tried with different IP addresses for the host, no change.</p>
  
  <p>ifconfig on host:</p>
  
  <pre><code>$ ifconfig
  eth0      Link encap:Ethernet  HWaddr 00:90:f5:e8:b0:e0  
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
  
  lo        Link encap:Local Loopback  
            inet addr:127.0.0.1  Mask:255.0.0.0
            inet6 addr: ::1/128 Scope:Host
            UP LOOPBACK RUNNING  MTU:65536  Metric:1
            RX packets:183363 errors:0 dropped:0 overruns:0 frame:0
            TX packets:183363 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:70022881 (70.0 MB)  TX bytes:70022881 (70.0 MB)
  
  vboxnet1  Link encap:Ethernet  HWaddr 0a:00:27:00:00:01  
            inet addr:192.168.66.1  Bcast:192.168.66.255  Mask:255.255.255.0
            inet6 addr: fe80::800:27ff:fe00:1/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:2545 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:0 (0.0 B)  TX bytes:308371 (308.3 KB)
  
  wlan0     Link encap:Ethernet  HWaddr 24:fd:52:c0:1b:b1  
            inet addr:192.168.2.106  Bcast:192.168.2.255  Mask:255.255.255.0
            inet6 addr: fe80::26fd:52ff:fec0:1bb1/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:11724555 errors:0 dropped:0 overruns:0 frame:0
            TX packets:7429276 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:16204472393 (16.2 GB)  TX bytes:1222715861 (1.2 GB)
  </code></pre>
  
  <p>iptables on host:</p>
  
  <pre><code>$ sudo iptables -L
  [sudo] password for aidan: 
  Chain INPUT (policy ACCEPT)
  target     prot opt source               destination         
  
  Chain FORWARD (policy ACCEPT)
  target     prot opt source               destination         
  
  Chain OUTPUT (policy ACCEPT)
  target     prot opt source               destination         
  </code></pre>
  
  <p>Here's an nmap comparing the host IP and the 'guest' IP:</p>
  
  <pre><code>$ nmap 192.168.66.1
  
  Starting Nmap 6.40 ( http://nmap.org ) at 2015-07-22 13:28 CEST
  Nmap scan report for 192.168.66.1
  Host is up (0.00015s latency).
  Not shown: 995 closed ports
  PORT     STATE SERVICE
  139/tcp  open  netbios-ssn
  445/tcp  open  microsoft-ds
  902/tcp  open  iss-realsecure
  3128/tcp open  squid-http
  5050/tcp open  mmcc
  
  Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
  
  $ nmap 192.168.2.106
  
  Starting Nmap 6.40 ( http://nmap.org ) at 2015-07-22 13:28 CEST
  Nmap scan report for 192.168.2.106
  Host is up (0.00015s latency).
  Not shown: 995 closed ports
  PORT     STATE SERVICE
  139/tcp  open  netbios-ssn
  445/tcp  open  microsoft-ds
  902/tcp  open  iss-realsecure
  3128/tcp open  squid-http
  5050/tcp open  mmcc
  
  Nmap done: 1 IP address (1 host up) scanned in 0.17 seconds
  </code></pre>