I'm running a web service that listen to port 3000. Then I added a redirect rule in my iptable as follows:
sudo iptables -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 3000
This works perfectly but:
- Why there is no rules displayed running
sudo iptables -L
?
- Why is the rule persistent? after rebooting the server the redirect from 80 to 3000 still works, according to this I need to use
iptables-persistent
which I'm not using.