CentOS 7 connectivity issues

centoscentos7ipv6linux-networkingnetworking

I have a second CentOS 7 box that's having a lot of trouble connecting. Basically, we were running WHMCS, but a domain lookup kept failing. So the issue is IPv6 connectivity.

[root@da01 ~]# yum install telnet -y -q -e 0
[root@da01 ~]# telnet whois.crsnic.net 43
Trying 2001:503:e8ef:1000::74...

It's trying to connect through IPv6. We've been moving our colo servers and got an IPv6 range (10 addresses) but this hasn't been setup in the system yet – thus the connection times out.

[root@da01 ~]# telnet whois.crsnic.net 43
Trying 2001:503:e8ef:1000::74...
telnet: connect to address 2001:503:e8ef:1000::74: Connection timed out

The resolution is to temporarily disable IPv6 connectivity throughout the whole system. So simply go ahead and pick the network interface you wanna disable IPv6 on:

[root@da01 ~]# vi /etc/sysconfig/network-scripts/ifcfg-em2 

Then change all IPv6-related config values to "no" as follows:

IPV6INIT="no"
IPV6_AUTOCONF="no"
IPV6_DEFROUTE="no"
IPV6_FAILURE_FATAL="no"
IPV6_PEERDNS="no"
IPV6_PEERROUTES="no"
IPV6_PRIVACY="no"

Finally, restart the networking-related service.

[root@da01 ~]# service network restart

It will now pass trying to connect through IPv6, then on timeout retry with IPv4:

[root@da01 ~]# telnet whois.crsnic.net 43
Trying 199.7.74.74...
Connected to whois.crsnic.net.
Escape character is '^]'.
Connection closed by foreign host.

So, I changed these values in the system configuration.

[root@da01 network-scripts]# sysctl -w net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.all.disable_ipv6 = 1
[root@da01 network-scripts]# sysctl -w     net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6 = 1
[root@da01 network-scripts]# sysctl -p /etc/sysctl.conf
[root@da01 network-scripts]# sysctl --system

HOWEVER, I am now experiencing network issues.

Can't ping the server

iMac-van-William-4:~ williamdavidedwards$ ping 
PING : 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1

Traceroute from the server is weird

[root@da01 domains]# traceroute google.nl
traceroute to google.nl (74.125.136.94), 30 hops max, 60 byte packets
 1  178.21.23.3 (178.21.23.3)  11.069 ms * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

Can't ping anything, except the server IP itself, the gateway, 8.8.8.8 and 8.8.4.4

[root@da01 domains]# ping nu.nl
PING nu.nl (62.69.166.254) 56(84) bytes of data.
^C
--- nu.nl ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms

route -n

[root@da01 ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use     Iface
0.0.0.0         5.255.90.1      0.0.0.0         UG    100    0        0 em2
5.255.90.0      0.0.0.0         255.255.255.0   U     100    0        0 em2

/etc/resolv.conf

[root@da01 ~]# cat /etc/resolv.conf 
# Generated by NetworkManager
search -removed- -removed-
nameserver 8.8.8.8
nameserver 8.8.4.4

ifconfig

[root@da01 ~]# ifconfig
em1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:21:9b:a7:c3:fd  txqueuelen 1000  (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

em2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet serveripv4  netmask 255.255.255.0  broadcast 5.255.90.255
        inet6 serveripv6  prefixlen 32  scopeid 0x0<global>
        inet6 ipv6  prefixlen 64  scopeid 0x20<link>
        inet6 ipv6  prefixlen 64  scopeid 0x0<global>
        ether ipv6  txqueuelen 1000  (Ethernet)
        RX packets 42827922  bytes 4801530409 (4.4 GiB)
        RX errors 0  dropped 30874  overruns 0  frame 0
        TX packets 2972081  bytes 1060556603 (1011.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

em3: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:21:9b:a7:c4:01  txqueuelen 1000  (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

em4: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:21:9b:a7:c4:03  txqueuelen 1000  (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

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)
        RX packets 13560475  bytes 5100699012 (4.7 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13560475  bytes 5100699012 (4.7 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

When I ping an inexistent address (dsjahdasjdsa.com) it automatically pings my own server by pinging dsjahdasjdsa.com.example.com where example.com is my DOMAIN for the network interface.

Unfortunately, this is still happening. I must admit I'm stuck… HELP

Best Answer

The issue was caused by the DDoS protection software from the datacenter. It contained a bug which caused big latency for DNS lookups. I reinstalled the OS, disabled the DDoS protection (they're fixing the bug) and everything is working now.