Hello, everyone. I'm new to netfilter and I'm trying to set a port redirection from port 80 to port 8080. I'm using this line in the attached file: -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 But there's something wrong with it, and I don't know what. When I run `iptables-restore < /etc/iptables.config', I get this error: iptables-restore: line 7 failed I'm using Debian Etch. Thanks in advance! -- Gustavo Narea. http://gustavonarea.net/ Get GNU/Linux! http://www.getgnulinux.org/
*filter -A INPUT -i lo -j ACCEPT -A INPUT -m state --state INVALID -j DROP -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7 -A INPUT -p tcp -j REJECT --reject-with tcp-reset -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable -A INPUT -j REJECT --reject-with icmp-proto-unreachable -A FORWARD -j REJECT --reject-with icmp-port-unreachable COMMIT