Unable to ping any IP address from CentOS 8 VPS

Issues related to configuring your network
Post Reply
Masterou
Posts: 3
Joined: 2021/06/19 16:23:07

Unable to ping any IP address from CentOS 8 VPS

Post by Masterou » 2021/06/19 16:26:18

I can't ping any external IP address from my CentOS 8 VPS, but I'm able to ping domains.

Thing is that I have one VPS which contains website that needs to send API requests to other VPS, they are not same subnet.

x.97.169.30 is server with website, and pinging another VPS x.18.255.239 does not print any output.

I'm able to ping domains, and local IP, and not able to ping any other external IP.

Do someone know the fix? Thanks to all in advance.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unable to ping any IP address from CentOS 8 VPS

Post by TrevorH » 2021/06/19 17:42:30

By "able to ping domains" I presume you mean you can e.g. ping google.com? How about if you then ping the ip address that that domain resolves to? Because otherwise it makes no sense at all.

Is the 'x' in x.97.169.30 and x.18.255.239 the same value? What is the netmask on your current interface?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

tunk
Posts: 1204
Joined: 2017/02/22 15:08:17

Re: Unable to ping any IP address from CentOS 8 VPS

Post by tunk » 2021/06/19 17:51:09

deleted

Masterou
Posts: 3
Joined: 2021/06/19 16:23:07

Re: Unable to ping any IP address from CentOS 8 VPS

Post by Masterou » 2021/06/19 18:42:26

Hello thanks for answer,

So when I ping same IP from my Windows PC I got normal output:

Code: Select all

C:\Users\DELL>ping x.18.255.239

Pinging x.18.255.239 with 32 bytes of data:
Reply from x.18.255.239: bytes=32 time=43ms TTL=56
Reply from x.18.255.239: bytes=32 time=39ms TTL=56
Reply from x.18.255.239: bytes=32 time=279ms TTL=56
Reply fromx.18.255.239: bytes=32 time=239ms TTL=56

Ping statistics for x.18.255.239:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 39ms, Maximum = 279ms, Average = 150ms
When I ping it from my CentOS VPS

Code: Select all

[root@vmi605263 ~]# ping x.18.255.239
PING x.18.255.239 (x.18.255.239) 56(84) bytes of data.
7 packets transmitted, 0 received, 100% packet loss, time 6000ms
- No response.

Netmask (VPS with CentOS which from packets are sent):

Code: Select all

DNS2="x.97.189.52"
DNS1="x.97.189.51"
IPADDR="x.97.169.30"
GATEWAY="x.97.160.1"
NETMASK="255.255.240.0"
BOOTPROTO="static"
DEVICE="eth0"
ONBOOT="yes"
IPV6INIT="yes"
IPV6ADDR="2a02:c206:2060:5263:0000:0000:0000:0001/64"
IPV6_DEFAULTGW="fe80::1"
IPV6_DEFAULTDEV="eth0"

I'm trying to debug this so I can make cURL work, as I got timeout with connecting to x.18.255.239.

Also firewall is off on both machines.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unable to ping any IP address from CentOS 8 VPS

Post by TrevorH » 2021/06/19 19:42:17

Show an example of being able to ping "by domain" and not "by ip". Do you get results from `ping 8.8.8.8`?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Masterou
Posts: 3
Joined: 2021/06/19 16:23:07

Re: Unable to ping any IP address from CentOS 8 VPS

Post by Masterou » 2021/06/19 19:45:41

Code: Select all

[root@vmi605263 ~]# ping google.com
PING google.com (216.58.208.110) 56(84) bytes of data.
64 bytes from ams17s08-in-f14.1e100.net (216.58.208.110): icmp_seq=1 ttl=118 time=8.96 ms
64 bytes from ams17s08-in-f14.1e100.net (216.58.208.110): icmp_seq=2 ttl=118 time=8.52 ms
64 bytes from ams17s08-in-f14.1e100.net (216.58.208.110): icmp_seq=3 ttl=118 time=8.57 ms
64 bytes from ams17s08-in-f14.1e100.net (216.58.208.110): icmp_seq=4 ttl=118 time=8.67 ms
64 bytes from ams17s08-in-f14.1e100.net (216.58.208.110): icmp_seq=5 ttl=118 time=8.55 ms
64 bytes from ams17s08-in-f14.1e100.net (216.58.208.110): icmp_seq=6 ttl=118 time=8.59 ms

Code: Select all

[root@vmi605263 ~]# 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=118 time=4.52 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=3.99 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=118 time=4.78 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=118 time=4.70 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=118 time=4.00 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=118 time=3.97 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=118 time=4.02 ms
Looks like I'm able to ping google IP address (216.58.208.110), but I can't do same with IP of my another CentOS VPS x.18.255.239

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Unable to ping any IP address from CentOS 8 VPS

Post by jlehtone » 2021/06/20 10:09:34

Ok, name resolution is functional as is access to 8.8.8.8.

Code: Select all

ipcalc -n -b -p x.97.169.30 255.255.240.0
PREFIX=20
BROADCAST=x.97.175.255
NETWORK=x.97.160.0
Your machine A is in subnet x.97.160.0/20. Its DNS servers x.97.189.y are not in the same subnet.

Therefore, routing between those two subnets (and to subnet of 8.8.8.8) is functional.

Your machine B (x.18.255.239) is clearly in different subnet. What can B reach?

When A pings B, do any packets reach B? I would listen with 'tcpdump' in B while A pings. You say that B has no firewall, so it should pong if it gets a ping.
When B pings A, do any packets reach A? Can B ping 8.8.8.8 like A does?

It is totally possible that the ISP's filter some traffic. Do the service agreements have anything about that?

Post Reply