UPDATE:
There was nothing wrong with the OS. The gateway for the static routes had some double NAT rules which caused the traffic to be dropped.
I have a simple network setup on a CentOS server. The server has only one interface:
ifcfg-eth0:
IPADDR=85.15.17.156
PREFIX=23
GATEWAY=85.15.16.1
DNS1=85.15.16.20
DNS2=85.15.16.21
and here is what it shows for ifconfig:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 85.15.17.156 netmask 255.255.254.0 broadcast 85.15.17.255
inet6 fe80::215:5dff:fe10:1c67 prefixlen 64 scopeid 0x20<link>
ether 00:15:5d:10:1c:67 txqueuelen 1000 (Ethernet)
RX packets 2374071 bytes 726672271 (693.0 MiB)
RX errors 0 dropped 339562 overruns 0 frame 0
TX packets 84906 bytes 19020154 (18.1 MiB)
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 1000 (Local Loopback)
RX packets 74123 bytes 9265792 (8.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 74123 bytes 9265792 (8.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I have setup two static route as below:
ip route:
default via 85.15.16.1 dev eth0 proto static metric 100
85.15.16.0/23 dev eth0 proto kernel scope link src 85.15.17.156 metric 100
94.182.76.0/22 via 85.15.17.254 dev eth0 proto static metric 100
94.183.76.0/22 via 85.15.17.254 dev eth0 proto static metric 100
But I don't seem to be able to get to the gateway (85.15.17.254) when I try to ping an IP in one of those subnets:
[admin.local@server ~]$ tracepath 94.182.76.2
1?: [LOCALHOST] pmtu 1500
1: no reply
2: no reply
3: no reply
I can ping and ssh the gateway (it's a firewall):
[admin.local@server ~]$ ping 85.15.17.254
PING 85.15.17.254 (85.15.17.254) 56(84) bytes of data.
64 bytes from 85.15.17.254: icmp_seq=1 ttl=255 time=0.681 ms
64 bytes from 85.15.17.254: icmp_seq=2 ttl=255 time=0.707 ms
EDIT 1:
There is route from the gateway to the end host:
ASA# sh run int
!
interface Port-channel1.299
nameif Outside
security-level 0
ip address 172.31.74.3 255.255.255.0 standby 172.31.74.4
!
interface Port-channel2.62
nameif Inside
security-level 100
ip address 85.15.17.254 255.255.254.0 standby 85.15.17.253
ASA# traceroute 94.182.76.2
Type escape sequence to abort.
Tracing the route to 94.182.76.2
1 172.31.74.1 1 msec 1 msec 1 msec
2 10.163.19.11 1 msec 1 msec 1 msec
3 * * *
4 94.182.19.252 210 msec 209 msec 214 msec
5 94.182.76.2 209 msec 209 msec 289 msec
firewalld on the server is disabled. Any idea what I am doing wrong?