I have setup a Linux machine on my server but for some reason Im unable to reach my default gateway. This is causing me to not communicate with the outside world (unable to connect to CentOS repos)
[root@localhost init.d]# ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 142.133.50.11 netmask 255.255.252.0 broadcast 142.133.51.255
inet6 fe80::a00:27ff:fec2:f9b5 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:c2:f9:b5 txqueuelen 1000 (Ethernet)
RX packets 19699 bytes 1668673 (1.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 611 bytes 44086 (43.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost init.d]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 142.133.48.1 0.0.0.0 UG 0 0 0 enp0s3
142.133.48.0 0.0.0.0 255.255.252.0 U 0 0 0 enp0s3
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 enp0s3
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 enp0s8
172.16.16.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s8
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
Now the default gateway here is 142.133.48.1 and it falls under my network.
142.133.48.0/22
Address: 142.133.48.0 10001110.10000101.001100 00.00000000
Netmask: 255.255.252.0 = 22 11111111.11111111.111111 00.00000000
Wildcard: 0.0.3.255 00000000.00000000.000000 11.11111111
=>
Network: 142.133.48.0/22 10001110.10000101.001100 00.00000000 (Class B)
Broadcast: 142.133.51.255 10001110.10000101.001100 11.11111111
HostMin: 142.133.48.1 10001110.10000101.001100 00.00000001
HostMax: 142.133.51.254 10001110.10000101.001100 11.11111110
Hosts/Net: 1022
But I cannot ping it.
[root@localhost init.d]# ping -c 1 142.133.48.1
PING 142.133.48.1 (142.133.48.1) 56(84) bytes of data.
From 142.133.50.11 icmp_seq=1 Destination Host Unreachable
--- 142.133.48.1 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
Firewall and iptables is off. So I have no idea what else might be wrong here.