diff options
author | Avery Pennarun <apenwarr@gmail.com> | 2010-05-02 02:00:19 -0400 |
---|---|---|
committer | Avery Pennarun <apenwarr@gmail.com> | 2010-05-02 02:00:58 -0400 |
commit | a244b325cb6c7ce86e1c4a78eed6a80b9357dbf1 (patch) | |
tree | cdf19eb1b57c39e18318a78505be4ce4febcfa05 | |
parent | 10069f99e2161b26306c76e2c6ad0ef012162f12 (diff) |
iptables: add a PREROUTING rule so we can proxy for other machines too.
If you run sshuttle on a router, it can handle vpn'ing for all the boxes on
your network.
-rw-r--r-- | iptables.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/iptables.py b/iptables.py index 5bb6133..096844e 100644 --- a/iptables.py +++ b/iptables.py @@ -44,6 +44,7 @@ def main(port, subnets): # basic cleanup/setup of chains if chain_exists(chain): ipt('-D', 'OUTPUT', '-j', chain) + ipt('-D', 'PREROUTING', '-j', chain) ipt('-F', chain) ipt('-X', chain) @@ -51,6 +52,7 @@ def main(port, subnets): ipt('-N', chain) ipt('-F', chain) ipt('-I', 'OUTPUT', '1', '-j', chain) + ipt('-I', 'PREROUTING', '1', '-j', chain) # create new subnet entries for snet,swidth in subnets: |