Score:-1

ping 100% packet loss - can't ping to server

mk flag

when I try to ping my newly created server it shows:

vasanth@vasanth-client:~$ ping -c 4 server.ip.name
PING server.ip.name (server.ip.address ) 56(84) bytes of data.

--- server.ip.name ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3055ms

when I check ICMP is allowed it shows:

[root@vasanth-server ~]$ firewall-cmd --query-icmp-block=echo-request
no

firewall zone status:

[root@vasanth-server ~]$ firewall-cmd --list-all-zones
....
....

public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens192
  sources: 
  services: cockpit dhcpv6-client http https ssh
  ports: 3306/tcp 33060/tcp 8082/tcp 6666/tcp 7777/tcp 4444/tcp 12345/tcp
  protocols: 
  forward: yes
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 

....
....

can somebody explain why I can't ping my server?

HBruijn avatar
in flag
Assuming that your server is indeed online either the server itself blocks pings (firewall, `/proc/sys/net/ipv4/icmp_echo_ignore_all` kernel sysctl tunable) or something along the path (your firewall, provider firewall or similar cloud providers security groups) blocks ping/ICMP echo reply requests.
Score:0
mk flag

Hey, can you ping from the server to another domain like google.com? If not, please double-check your network settings. Check lists:

  • Your IP and gateway must have a valid subnet mask in the nmtui settings or any other tool or configuration file you use.

Alternatively, use the following commands to enable ICMP:

  • iptables -A {INPUT|OUTPUT} -p icmp -j {ACCEPT|REJECT|DROP}
  • iptables -A {INPUT|OUTPUT} -p icmp --icmp-type {0|8} -j {ACCEPT|REJECT|DROP}
  • iptables -A {INPUT|OUTPUT} -p icmp --icmp-type {echo-reply|echo-request} -j {ACCEPT|REJECT|DROP}
  • iptables -A {INPUT|OUTPUT} -p icmp --icmp-type {echo-reply|echo-request} -m state --state NEW,ESTABLISHED,RELATED -j {ACCEPT|REJECT|DROP}

Note: Make sure you check your internet connection of server or your device. If it is VM check your network adapter setting (VMWare/OracleVB) or Virtual switch (Hyper-V)

Vasanth Vel avatar
mk flag
Hi @Masab Bin Zahid Yes I can ping from the server to another domain like google.
Masab Bin Zahid avatar
mk flag
Then its your firewall issue. allow icmp or try to telnet any port which is open. You can scan network using nmap to check if ports are allowing any connection.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.