@openit said in Ubuntu firewall sucks, status showing allowed http, but won't:
I have ran following commands to redirect port 80 and 443, and it is working fine until next reboot:
#!/bin/bash
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8069
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8070
iptables-saveSo I found one more article is saying to add first two commands to /etc/rc.local file to have rules permanently, but doesn't seems to be, not sure why?
@Pete-S @black3dynamite
Here's how to do it using UFW.
https://serverfault.com/a/238565
66ee7cc6-ba0d-489b-9b1c-a73e23ca9fb3-image.png