I am setting up a new server with 18.04 based on instructions written for 14.04. I have got as far as these steps:
/sbin/iptables -A FORWARD -p tcp --destination-port 80 -j ACCEPT /sbin/iptables -t nat -A PREROUTING -j REDIRECT -p tcp --destination-port 80 --to-ports 8080 /sbin/iptables-save # To save permanently (reset-persistent): sudo sh -c "iptables-save > /etc/iptables.rules" # Modify in /etc/network/interfaces # Add this line: pre-up iptables-restore < /etc/iptables.rules # As below: # The loopback network interface auto lo iface lo inet loopback pre-up iptables-restore < /etc/iptables.rules # The primary network interface auto eth0 eth1 iface eth0 inet static address XXX.XXX.XX.XXX netmask 255.255.255.0 gateway XXX.XXX.XX.1 dns-nameservers 220.127.116.11 18.104.22.168 XXX.XXX.0.3 iface eth1 inet static address XX.XXX.67.47 netmask 255.255.0.0
But it turns out that 18.04 does things a different way, using something called netplan.
I have found questions and answers related to how to revert back to how things were done in 14.04, but I am wondering whether it is better to do the same thing the new way.
How can I do what is being done the old way using netplan?