From 310bf64c48844de5d83643621a6cf3beec2d6f19 Mon Sep 17 00:00:00 2001 From: Giulio Date: Tue, 22 Jun 2021 18:13:05 +0200 Subject: [PATCH] Added basic forwardtype= support --- qubes/firewall.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qubes/firewall.py b/qubes/firewall.py index 2cddce16..9ba258df 100644 --- a/qubes/firewall.py +++ b/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):