Testing setup for iptables through Docker
There is a way to locally get some experience with iptables, and to get a testable environment. This is easily achieved with a simple docker container. We’ll dive right in with the dockerfile and commands to get this running: FROM debian:latest # Install iptables and net-tools (for testing with ping, netstat, etc.). Install python3 to start web-servers RUN apt-get update && \ apt-get install -y iptables net-tools iproute2 iputils-ping python3 && \ apt-get clean && rm -rf /var/lib/apt/lists/* # Allow IPv4 forwarding (useful if testing NAT) RUN echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf The last command is just for illustration. This part will not delve deeper into testing NAT setups. ...