Unable to access Internet from my linux 7.2 guest

Discussions about using Linux guests in VirtualBox.
Post Reply
khan500
Posts: 4
Joined: 26. Mar 2017, 06:28

Unable to access Internet from my linux 7.2 guest

Post by khan500 »

I had a working Internet on my guest machine running Linux 7.2 on my host windows 10, all of a sudden it just stopped working, I have 2 adapters confgured for this VM, one is NAT and the other is Virtual Host only ethernet adapter, version of the Virtual box 5.1.18, I also read that upgrading will help solve my problem, I did and I it did not fix the issue, please help.

Code: Select all

[root@ol7-121-rac3 ~]# ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fe80::a00:27ff:febc:273  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:bc:02:73  txqueuelen 1000  (Ethernet)
        RX packets 35  bytes 5280 (5.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1120  bytes 95236 (93.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.56.201  netmask 255.255.255.0  broadcast 192.168.56.255
        inet6 fe80::a00:27ff:feb9:990f  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:b9:99:0f  txqueuelen 1000  (Ethernet)
        RX packets 523  bytes 55253 (53.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 224  bytes 56330 (55.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 6946  bytes 629138 (614.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6946  bytes 629138 (614.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:fa:8a:06  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Last edited by socratis on 26. Mar 2017, 22:03, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Unable to access Internet from my linux 7.2 guest

Post by mpack »

If you have questions about a Linux guest (see topic title), please post them in the "Linux Guests" forum, not some random other forum such as "Windows Hosts".

Moving this one.
khan500
Posts: 4
Joined: 26. Mar 2017, 06:28

Re: Unable to access Internet from my linux 7.2 guest

Post by khan500 »

Thanks Mpack, but I think it is more to do with windows 10 and Virtualbox, I am sure it has nothing to Linux in my case
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Unable to access Internet from my linux 7.2 guest

Post by mpack »

In that case it might be better if the topic title referenced your actual problem, and didn't only refer to the guest OS.

Btw, I am not ignoring your question, but I don't use Linux and I'm not a network expert. Linux networking experts should be more easily found in this new forum.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Unable to access Internet from my linux 7.2 guest

Post by Perryg »

Can you ping 8.8.8.8 from the guest? If so then it indicates a DNS issue or something blocking access.
khan500
Posts: 4
Joined: 26. Mar 2017, 06:28

Re: Unable to access Internet from my linux 7.2 guest

Post by khan500 »

Yes it does work

Code: Select all

[oracle@ol7-121-rac3 ~]$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=48 time=16.8 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=48 time=18.6 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=48 time=19.0 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=48 time=20.7 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=48 time=23.9 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=48 time=16.1 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=48 time=16.3 ms
Last edited by socratis on 26. Mar 2017, 22:04, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Unable to access Internet from my linux 7.2 guest

Post by Perryg »

So it is DNS that is failing so open the guests terminal and type the following and post the results here:

Code: Select all

cat /etc/resolv.conf
khan500
Posts: 4
Joined: 26. Mar 2017, 06:28

Re: Unable to access Internet from my linux 7.2 guest

Post by khan500 »

Hi Perry, you are a life saver, I made changes to resolv.conf which messed up, i just commented the line and everything started working again, thank you so much. I was struggling since last 12 hours :D

Code: Select all

[root@ol7-121-rac3 ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search localdomain
#nameserver 127.0.0.1
#nameserver 192.168.56.201
Post Reply