1

im running these two rules as root, but when doing a iptables -L it dosent show any rules, any one have an idea of what the problem can be?

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
Kyle Brandt
  • 82,107
  • 71
  • 302
  • 444
Darkmage
  • 323
  • 3
  • 12

1 Answers1

6

you add them to nat talbe, and by default iptables lists filter table. to see what you added run:

iptables -t nat -nL
pQd
  • 29,561
  • 5
  • 64
  • 106