iptables schreibt keine Regeln

iptables schreibt keine Regeln

ich führe diese beiden Regeln als Root aus, aber wenn ich iptables -L ausführe, werden keine Regeln angezeigt. Hat jemand eine Idee, wo das Problem liegen könnte?

iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 --source 84.244.145.135 -j REDIRECT --to-port 1222
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 --source 243.134.97.194 -j REDIRECT --to-port 1222


duno@Virtual-Box:/home/glennwiz# iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Antwort1

Sie fügen sie der NAT-Tabelle hinzu, und standardmäßig listet Iptables die Filtertabelle auf. Um zu sehen, was Sie hinzugefügt haben, führen Sie Folgendes aus:

iptables -t nat -nL

verwandte Informationen