I'm using iptables on Ubuntu server to route a public IP to a private IP. I want to nat all traffic, including 80, 443 and ICMP.
However, it appears that ICMP isn't routing. I have a steady ping going to the public IP and it never stops, even with NAT pointing to a bogus IP.
Here are the rules that I'm using:
iptables -t nat -I PREROUTING -d 188.8.131.52 -j DNAT --to-destination 10.240.5.5 iptables -t nat -I POSTROUTING -s 10.240.5.5 -j SNAT --to-source 184.108.40.206
I tried with rules for ICMP specifically, but no such luck:
iptables -t nat -I PREROUTING -d 220.127.116.11 - icmp --icmp-type echo-request -j DNAT --to-destination 10.240.5.5