Cannot access the internet. CentOS guest isn't receiving incoming traffic.

Private network is fully accessible.

Scratching my head here... I don't have this problem on Debian/Ubuntu/Windows! :(


  • Hyper-V host (
  • Freshly built CEntOS guest (
  • Guest resides on Internal Network with Internet Connection Sharing(ICS) enabled
  • Address is assigned by DHCP server on the host
  • Address range:
  • DNS is set to my ISP's public nameservers (resolv.internode.on.net)

Additional Configuration

  • iptables is stopped
  • SELinux is disabled

Some info that may be useful


eth0      Link encap:Ethernet  HWaddr 00:15:5D:C8:34:5A
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::215:5dff:fec8:345a/64 Scope:Link
          RX packets:111 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:12748 (12.4 KiB)  TX bytes:1788 (1.7 KiB)

eth1      Link encap:Ethernet  HWaddr 00:15:5D:C8:34:5C
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::215:5dff:fec8:345c/64 Scope:Link
          RX packets:147 errors:0 dropped:0 overruns:0 frame:0
          TX packets:117 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:14087 (13.7 KiB)  TX bytes:14587 (14.2 KiB)
          Interrupt:9 Base address:0x2000

netstat -rn

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface   U         0 0          0 eth0     U         0 0          0 eth0         UG        0 0          0 eth0

cat /etc/resolv.conf

; generated by /sbin/dhclient-script

cat /etc/sysconfig/network-scripts/ifcfg-eth0


cat /etc/sysconfig/network


cat /etc/udev/rules.d/70-persistent-net-rules

# net device ()
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:5d:c8:34:5a", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x1011:0x0009 (tulip)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:5d:c8:34:5c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

Questions I've already looked at to answer my own (in vain)

Unable to ping or access internet

Connect to the internet with CENTOS 5

Centos internet not working

My CentOS 5.7 server can't access the internet

  • Painfully obvious question, but when you say incoming traffic, I assume you have started the original connection rather than a new incoming connection coming in? Mar 12, 2014 at 18:58
  • Example: I try yum update, dns requests go out, nothing comes back, yum keeps retrying in vain. So... yes, I think. Mar 12, 2014 at 20:36
  • How did you configure the Hyper-V virtual switch? Mar 12, 2014 at 22:23

6 Answers 6


I had no internet connection on a fresh Centos 7 install. In my case it was because eth0 was down.

Check the status of your devices with

nmcli device

If the ethernet device (usually eth0) is "disconnected", bring it up with

nmcli connection up eth0
  • in my case nmcli connection up eth0 fixed my issue! thanks so much!!!
    – Farkhod
    Feb 14 at 8:46

Can machine with IP address forward traffic from network to the internet?

If this machine is Linux, it has to have allow forwarding, try to see /etc/sysctl.conf file.

On routing machine can be denied forwarding by iptables (try exec iptables -L -n and check rules in the FORWARD chain).

You can try to install tshark (or tcpdump or tethereal) utility even on the new host even on the routing machine and watch packets. Then you can on the new machine exec ping, for example, and you will see, if router can forward packet to the next hop correctly.

If you have another router in the network: know this another router, that your first router (with one of IP address routing this network? Try to check it by running command ping on this next router (preferably border router). If this ping don't work, you have to set static route, somethink like this: ip route add via x.x.x.x, where x.x.x.x is IP address of router, which have as another address

I'm very sory about my English, but I believe, that this post can help to you...

  • The Hyper-V host is and can forward traffic to and from the internet. Each machine on the network can communicate with each other without a problem. What do I look for inside the sysctl.conf file? Mar 12, 2014 at 8:07
  • You have to have in this file somethink like net.ipv4.ip_forward=1 (it's depend on the version of kernel).
    – Jan Marek
    Mar 12, 2014 at 8:43
  • I edited my sysctl.conf and it did not seem to change anything. I checked on wireshark and it looks like the guest can send traffic outgoing, but nothing comes back. iptables is disabled. Mar 12, 2014 at 11:12

I think your problem lies with your VM Guest configuration in Hyper-V, and not the OS itself. I'm no expert - but i vaguely recall similar problems a long time ago that were related to which type of virtualized network interface I had selected in my HyperV configuration.

The solution for me was to remove the network adapter configured by default, and add a 'Legacy Network' adapter. After that it seemed to work.



Okay, so I found out what it was.

I do not expect anyone to ever have guessed this!

I have two network adapters:

  • 1x Ethernet Network Adapter -
  • 1x Wireless Adapter -

The Hyper-V Internal network was running on the Wireless Adapter with Internet Connection Sharing (ICS) enabled.

Packets were successfully going out, but upon coming back in they would go to my Ethernet card and they would have no clue where to go from there, hence, my VMs did not receive anything back.

I've now split my network in two, so I have my Wireless card on and my Ethernet card on

This configuration now works.



I had a similar issue with getting out to the internet with my CentOS 7 server (KVM guest). I had to configure the Network default gateway in /etc/sysconfig/Network by adding my router's IP address (must be in the same subnet as the NIC you are using for internet traffic). I was able to ping my router (gateway) at this point, but still could not get to to the public internet (pings to google.com were unsuccessful). I made sure I had my dns server's defined in /etc/resolv.conf, but still could not get out. I checked the services that were running using systemctl list-unit-files | grep enabled and saw that NetworkManager was enabled. I stopped this service, then disabled and BINGO! I was able to get out to the Wild Wild West! Pings to google.com were successful.

Hope this helps.


I faced similar issue when I installed CentOS7 on Hyper-v.

I went to: Settings->Network Adapter->virtual switch->Select Default switch.

No need to restart VM.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .