Just a quick bit of background here. I’m running home automation on Raspberry Pi 4 via node-red and hubitat. I need access to port 80 but I don’t want to run with root access for obvious reasons. Unfortunately, to access alexa locally by voice I need port 80 access. I found this work around (see below) which works very well. But, I’m not entirely certain how to get this to survive a reboot. Any tips or even just pointing me in the right direction to figure it out myself would be greatly appreciated.
sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 3000
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000