iptables -t nat -A PREROUTING -p tcp --dport 8080 -j REDIRECT --to-port 80
iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
iptables -P INPUT DROP
iptables -t nat -A OUTPUT -p tcp -s 127.0.0.1 --dport 8080 -j REDIRECT --to-ports 80
iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 8080 -j DNAT --to-destination 127.0.0.1:80
iptables -A INPUT -p tcp -d 127.0.0.1 --dport 80 -j ACCEPT
iptables -P INPUT DROP
iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -t mangle -A PREROUTING -p tcp --dport 80 -j DROP
iptables -t nat -A PREROUTING -p tcp --dport 8080 -j REDIRECT --to-port 80
iptables -P INPUT DROP
iptables -t nat -A POSTROUTING -p tcp --dport 8080 -j REDIRECT --to-port 80