From bc1b08612d0471af95922c1c7b9722f5befc125e Mon Sep 17 00:00:00 2001 From: Rupert Edwards Date: Mon, 21 Dec 2015 18:18:40 -0500 Subject: [PATCH] Update toriptables2.py --- toriptables2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toriptables2.py b/toriptables2.py index c8c4e1a..420b6e1 100755 --- a/toriptables2.py +++ b/toriptables2.py @@ -49,8 +49,8 @@ DNSPort 53 call(["iptables", "-t", "nat", "-A", "OUTPUT", "-p", "udp", "--dport", "53", "-j", "REDIRECT", "--to-ports", "53"]) - for self.net in self.non_tor: - call(["iptables", "-t", "nat", "-A", "OUTPUT", "-d", "%s" % self.net, + for net in self.non_tor: + call(["iptables", "-t", "nat", "-A", "OUTPUT", "-d", "%s" % net, "-j", "RETURN"]) call(["iptables", "-t", "nat", "-A", "OUTPUT", "-p", "tcp", "--syn", "-j", @@ -59,8 +59,8 @@ DNSPort 53 call(["iptables", "-A", "OUTPUT", "-m", "state", "--state", "ESTABLISHED,RELATED", "-j", "ACCEPT"]) - for self.net in (self.non_tor): - call(["iptables", "-A", "OUTPUT", "-d", "%s" % self.net, "-j", "ACCEPT"]) + for net in (self.non_tor): + call(["iptables", "-A", "OUTPUT", "-d", "%s" % net, "-j", "ACCEPT"]) call(["iptables", "-A", "OUTPUT", "-m", "owner", "--uid-owner", "%s" % self.tor_uid, "-j", "ACCEPT"])