Browse Source

Added basic forwardtype= support

Giulio 2 years ago
parent
commit
310bf64c48
1 changed files with 7 additions and 0 deletions
  1. 7 0
      qubes/firewall.py

+ 7 - 0
qubes/firewall.py

@@ -183,6 +183,13 @@ class DstPorts(RuleOption):
     def rule(self):
         return 'dstports=' + '{!s}-{!s}'.format(*self.range)
 
+class ForwardType(RuleOption):
+    external = 'external'
+    internal = 'internal'
+
+    @property
+    def rule(self):
+        return 'forwardtype=' + str(self)
 
 class IcmpType(RuleOption):
     def __init__(self, untrusted_value):