...
Code Block | ||
---|---|---|
| ||
# To make persistent. sudo apt-get install iptables-persistent # Tool replaces lots of manual work documented here, https://help.ubuntu.com/community/IptablesHowTo sudo /etc/init.d/iptables-persistent save sudo /etc/init.d/iptables-persistent reload |
Going further you can actually remap ports too. In this example, I map port 23 on the host server to the 22 on the container,
Code Block | ||
---|---|---|
| ||
sudo iptables -t nat -D PREROUTING -p tcp -i eth0 --dport 22 -j DNAT --to-destination 10.0.3.11:23 |
macvlan with Additional IP
...