-1

I want to bind IPs to non-root users so that all outgoing applications will use that IP for the user. I have this:

iptables -t nat -A POSTROUTING -m owner --uid-owner xxx -j SNAT --to-source xxx.xxx.xxx.xxx

But when I when I do check iptables:

# 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

Nothing shows up.

1 Answer 1

1

You need to do

iptables -t nat -L

to see the rules you've added, since your commands are in the nat table, not the default filter table:

$ man iptables
..snip..
  --table   -t table    table to manipulate (default: `filter')

which is why iptables -L shows up blank, because you have no rules in your filter table.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .