Results 1 to 3 of 3
Thread: Forwarding ICMP packets with NAT
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Dec 2009
Forwarding ICMP packets with NAT
I was hoping to set a linux box up by my router to respond to incoming ICMP packets for a series of WAN delay reading I need, however I'm very confused about exactly how ICMP is handled.
Without using a port I can't configure any port based forwarding, but I have an idea that it might be handled by NAT, is this the case?
Has anyone done this before? The router is a thompson using a propriety unix like kernel from what i can tell.
Any help would be appreciated.
Neil r w
I believe that ICMP is protocol at the same level as TCP/IP, but NAT works with the IP layer, so ICMP cannot be routed using it.
I have no idea if similar forwarding mechanisms exist for ICMP, sorry.Linux user #126863 - see http://linuxcounter.net/
While I have not tried it I do not see any reason why you could not DNAT ICMP traffic to another IP Address. ICMP is a protocol and like any other protocol you should be able to DNAT it.
you could try something like this;
iptables -t nat -A PREROUTING -p icmp --icmp-type 0 -j DNAT --to-destination 192.168.1.1
Here is a list of different types of ICMP
The adventure of a life time.
Linux User #296285