Commit 1a2eab74 by Bach Dániel

firewall: random fixes

parent 433b8374
......@@ -89,7 +89,7 @@ class IptChain(object):
self.rules.add(rule)
def sort(self):
return sorted(list(self.rules))
return sorted(list(self.rules), reverse=True)
def __len__(self):
return len(self.rules)
......
......@@ -32,8 +32,8 @@ class Migration(SchemaMigration):
if rule.nat:
# swap
tmp = rule.dport
# rule.dport = rule.nat_external_port
# rule.nat_external_port = tmp
rule.dport = rule.nat_external_port
rule.nat_external_port = tmp
if rule.direction == '0':
rule.direction = 'out'
elif rule.direction == '1':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment