Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

icmp request received, but doesn't reply [closed]

I set up 3 CentOS servers, configured server2 as router between 192.168.1.0/24 and 30.0.0.0/24, but ping can't get through.

I tried ping 192.168.1.62 from server1, according to tcpdump on server3, ICMP request is received, but it doesn't generate ICMP response.

23:36:06.436243 IP 30.0.0.2 > 192.168.1.62: ICMP echo request, id 23570, seq 2838, length 64
23:36:07.436212 IP 30.0.0.2 > 192.168.1.62: ICMP echo request, id 23570, seq 2839, length 64

Setup

Servers
  • server1:

    • eth0 - 30.0.0.2
  • server2:

    • eth0 - 192.168.1.61
    • eth0:0 - 30.0.0.1
  • server3:

    • eth0 - 192.168.1.62
Routing
  • route info on server1:

    • 0.0.0.0 30.0.0.1
  • route info on server3:

    • 30.0.0.0/24 192.168.1.61
like image 890
Robby Avatar asked Aug 30 '13 15:08

Robby


People also ask

How do I know if my ICMP is enabled?

Expand the Computer Configuration/Policies/Windows Settings/Security Settings/Windows Firewall with Advanced Security/Windows Firewall with Advanced Security/Inbound Rules node. From the Protocol Type: drop down list select ICMPv4 and click Customize… Check the All ICMP types radio botton and click OK.

What is ICMP echo request and reply?

Echo-Request and Reply: ICMP packets of echo request and reply are used to test the network layer of destination. In other words, the host at the destination is switched on or off. We can also check the network layer of all the devices on the way from sender to destination.

How do I enable ping on Linux server?

Enabling Ping:# iptables -D INPUT -p icmp --icmp-type echo-request -j DROP # iptables -D OUTPUT -p icmp --icmp-type echo-reply -j DROP D : This command switch is used to delete the rule. Once the ping is enabled, the server should now respond to ping requests as shown in the below image.

What protocol is ICMP?

The Internet Control Message Protocol (ICMP) is a protocol that devices within a network use to communicate problems with data transmission. In this ICMP definition, one of the primary ways in which ICMP is used is to determine if data is getting to its destination and at the right time.


2 Answers

I was receiving ICMP packets but did not see them go out. The problem was related to the traffic traversing multiple interfaces and reverse path filtering being on by default...

I've enabled martian source logging first:

$ echo 1 >/proc/sys/net/ipv4/conf/eth2/log_martians

Then there are several options for what to do with them... I'm enabling loosely handling them:

$ sysctl net.ipv4.conf.all.rp_filter=2

See these for details:

  • http://lartc.org/howto/lartc.kernel.html
  • https://access.redhat.com/site/solutions/53031
like image 144
AXE Labs Avatar answered Oct 19 '22 04:10

AXE Labs


Run tcpdump with -e flag and see if the destination MAC address is correct.

like image 36
FoamyBeer Avatar answered Oct 19 '22 04:10

FoamyBeer