I've got a script that listens for ICMP ping packets (containing data payload) and while this works if you run it from command line, it doesn't work in a Docker container because ICMP ping packets are not being routed from the server instance to the container.
This is running on AWS Container Service which slightly complicates things.
I think this will forward all packets
sudo iptables -t nat -A POSTROUTING --out-interface veth* -j MASQUERADE
sudo iptables -A FORWARD --in-interface eth1 -j ACCEPT
How do I forward specifically ICMP ping ("echo") packets arriving on the 'eth0' interface of the instance to the local IP or virtual interface of the docker container (e.g. 172.0.0.1 or veth*).