Browse Source

[Netfilter] fix mailcow isolation rule for iptables

FreddleSpl0it 1 year ago
parent
commit
57e67ea8f7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      data/Dockerfiles/netfilter/modules/IPTables.py

+ 2 - 2
data/Dockerfiles/netfilter/modules/IPTables.py

@@ -219,7 +219,7 @@ class IPTables:
 
 
       # insert mailcow isolation rule
       # insert mailcow isolation rule
       rule = iptc.Rule()
       rule = iptc.Rule()
-      rule.in_interface = f'! {_interface}'
+      rule.in_interface = f'!{_interface}'
       rule.out_interface = _interface
       rule.out_interface = _interface
       rule.protocol = 'tcp'
       rule.protocol = 'tcp'
       rule.create_target("DROP")
       rule.create_target("DROP")
@@ -234,7 +234,7 @@ class IPTables:
       if _allow != "":
       if _allow != "":
         rule = iptc.Rule()
         rule = iptc.Rule()
         rule.src = _allow
         rule.src = _allow
-        rule.in_interface = f'! {_interface}'
+        rule.in_interface = f'!{_interface}'
         rule.out_interface = _interface
         rule.out_interface = _interface
         rule.protocol = 'tcp'
         rule.protocol = 'tcp'
         rule.create_target("ACCEPT")
         rule.create_target("ACCEPT")