Brief follow-up on my previous Proxmox https certificate post - at the end of that post I mention an iptables rule to redirect requests on port 443 to port 8006, so one doesn’t need to type in a port number after the URL.

Turns out that doesn’t persist across reboots. Here’s how you do that:

apt install iptables-persistent
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8006 # add the rule
iptables-save > /etc/iptables/rules.v4

That’s it. Now you can reboot and the rule will still be there.

EOF