I have an application where I need to configure a router to pass through
ping requests (ICMP type 8) through to the LAN port. I have a Linksys
WRT54GS with tiny DD-WRT V24 SP2 installed. I am adding the following
iptables rules:
iptables -t nat -I PREROUTING -p icmp --icmp-type 8 -s 72.64.140.50 -j DNAT
--to-destination 192.168.1.200
iptables -t filter -I FORWARD -p icmp --icmp-type 8 -s 72.64.140.50 -d
192.168.1.200 -j ACCEPT
iptables -t nat -I POSTROUTING -p icmp --icmp-type 8 -s 72.64.140.50 -d
192.168.1.200 -j ACCEPT
The intent is that the first rule will change an incoming echo request
destination to the unit on the LAN which I want to receive the ping request.
The second rule allows the modified echo request to pass through the
FORWARD table. And the last one allows the modified echo request to pass
through the POSTROUTING table. When I send a ping to the router with four
tries, I get no pings out the LAN. Using iptables -L -v -n I can see were
rule #1 passes one packet (but not four), rule #2 passes four packets
(good!) and rule #3 passes 1 packet. At this point I am at loss as to why
this is not working. Can someone help me out here?
Sent with AquaMail for Android
http://www.aqua-mail.com
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html