nospaceships / node-raw-socket

Raw sockets for Node.js.
207 stars 69 forks source link

ICMP: Send echo reply #72

Closed algj closed 3 years ago

algj commented 3 years ago

I want to change the ICMP ping reply. Is it possible?

algj commented 3 years ago

It seems that the kernel sends the reply.

echo "1" >  /proc/sys/net/ipv4/icmp_echo_ignore_all
algj commented 3 years ago

I still haven't figured out how to send ICMP reply. Anyone has done it before?

algj commented 3 years ago

Figured it out. Basically you send back the identifier and sequence with any payload you want (should be the same as you received). I'm going to upload code later on.