Hello there...
My original intention is to force all trafic to/from a certain command
to go through ppp0, so I thought the simplest choice would be
iptables -A OUTPUT -t mangle -m owner --cmd-owner [my-cmd] -j ROUTE
--oif ppp0
But now, I have to do a SNAT so inbound traffic arrives through ppp0
too:
iptables -A POSTROUTING -t nat -m owner --cmd-owner [my-cmd] -j SNAT
--to-source 10.252.155.87
(where 10.252.155.87 is the address just assigned to ppp0)
Am I on the right track so far?
I don't know how to do *both* operations on outbound packets, and I'm
afraid there's something about traversing chains that I still don't
get, despite having read the tutorial at frozentux.net and the manpage.
Once a packet matches the first (OUTPUT) rule, no further procesing is
done (iptables counters and tcpdump confirm that). And I don't know how
to jump from a custom chain on one table to another on a different
table.
I would really appreciate some light on what I'm dealing with!
regards...
- ariel
|