...
Code Block | ||
---|---|---|
| ||
# Immediately enable port forwarding rule, but this is not persistent on reboot.
sudo iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to-destination 10.0.3.10:80
# Need to document how to turn this off using command line without rebooting.
# ...
# 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 |
...