Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a virtual box (4.3.14) installed on host ubuntu 12.04. I have a guest machine ubuntu 12.04 32 bit installed on this virtual box. The problem is that, my ping request is not reaching the guest operating system. I have taken the tshark capture to confirm that tshark -i any -w /tmp/myTrace.pcap on my guest machine. I am able to ping to the IP:192.168.56.1 from my host machine and the ICMP messages are getting response.

Host ifconfig

eth0      Link encap:Ethernet  HWaddr 00:1e:90:b4:71:3b  
          inet addr:10.0.61.73  Bcast:10.0.61.255  Mask:255.255.255.0
          inet6 addr: fe80::21e:90ff:feb4:713b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7749 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3322 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2187490 (2.1 MB)  TX bytes:487337 (487.3 KB)
          Interrupt:17 

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:1197 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1197 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:111429 (111.4 KB)  TX bytes:111429 (111.4 KB)

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00  
          inet addr:192.168.56.1  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::800:27ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:11558 (11.5 KB)

Guest ifconfig

eth0      Link encap:Ethernet  HWaddr 08:00:27:c6:4f:84  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fec6:4f84/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34 errors:0 dropped:0 overruns:0 frame:0
          TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4558 (4.5 KB)  TX bytes:4194 (4.1 KB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:02:43:ba  
          inet addr:192.168.56.1  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe02:43ba/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:648 (648.0 KB)

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:106 errors:0 dropped:0 overruns:0 frame:0
          TX packets:106 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:8904 (8.9 KB)  TX bytes:8904 (8.9 KB)

Host ufw status

Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere
22                         ALLOW       Anywhere (v6)

Guest ufw status

Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere
22                         ALLOW       Anywhere (v6)

The main problem is that, I want to ssh from the host to the guest, but it is giving me permision denied. I have added the Host-only-network in the preferences of my virtualbox. I am stuck here. Any help is really appreciated.

share|improve this question
    
When you can't ping/connect to the guest from the host, what IP address are you trying to ping or connect to? –  Kenster Jul 23 at 15:16
    
@Kenster: Thanks for the response. Actually I was supposed to configure a different IP than the HostOnlyAdapter in the guest machine as the static IP Address. I did not read the tutorial properly. –  Abhishek Jul 23 at 17:25
    
@Kenster: As to your answer, I was pinging to the address that I put up in the network adapter setting. Now, since it was also assigned to the host network, the ICMP request were answered. :) –  Abhishek Jul 23 at 17:26

1 Answer 1

up vote 1 down vote accepted

As far as I can tell you've tried to set up a host-only subnet of 192.168.56.0/24, but you've set both the host and the guest IP to be 192.168.56.1. They'll need to be on different IPs but the same range, e.g. 192.168.56.1 and 192.168.56.2. Additionally, I'm not sure what eth0 is for on the guest.

It would be useful to know:

  • Whether each guest interface is NAT / Bridged / Host only
  • What you're trying to achieve (do you want the guest to be accessible by the normal subnet, do you want it host only or do you want it to be able to NAT out from behind your host)
  • If you want your VM to be able to route out anywhere, it would be useful to show us the routing table for both the host and the guest.
share|improve this answer
    
I am really really really sorry @Alex. I misread the tutorial. I was supposed to configure different IP on both virtual box HostOnlyNetwork adapter and in eth1 of the guest machine. Upon changing the static IP of guest machine from 192.168.56.1 to 192.168.56.101 it worked. Thanks a lot for pointing that out. :) –  Abhishek Jul 23 at 17:23
    
By the way, the eth0 is for the primary NAT adapter for sharing the Internet to the guest machine. The eth0 was NAT interface, and eth1 was HostOnly interface. –  Abhishek Jul 23 at 17:32
    
Glad to hear that sorted out your problem :) –  Alex Berry Jul 24 at 13:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.