[Netfilter] Revert SNAT rule check, todo: check DNS with SNAT enabled
This commit is contained in:
parent
a1c6bc9027
commit
cfab7274b7
@ -301,12 +301,12 @@ def snat4(snat_target):
|
|||||||
print log['message']
|
print log['message']
|
||||||
chain.insert_rule(get_snat4_rule())
|
chain.insert_rule(get_snat4_rule())
|
||||||
table.commit()
|
table.commit()
|
||||||
#else:
|
else:
|
||||||
# for position, item in enumerate(chain.rules):
|
for position, item in enumerate(chain.rules):
|
||||||
# if item == get_snat4_rule():
|
if item == get_snat4_rule():
|
||||||
# if position != 0:
|
if position != 0:
|
||||||
# chain.delete_rule(get_snat4_rule())
|
chain.delete_rule(get_snat4_rule())
|
||||||
# table.commit()
|
table.commit()
|
||||||
table.autocommit = True
|
table.autocommit = True
|
||||||
except:
|
except:
|
||||||
print 'Error running SNAT4, retrying...'
|
print 'Error running SNAT4, retrying...'
|
||||||
|
Loading…
Reference in New Issue
Block a user