Fixed default policy handling in firewall rules
This commit is contained in:
parent
d82001819d
commit
aa58bec1d9
@ -1189,12 +1189,12 @@ class QubesProxyVm(QubesNetVm):
|
|||||||
reject_action = "REJECT --reject-with icmp-host-prohibited"
|
reject_action = "REJECT --reject-with icmp-host-prohibited"
|
||||||
|
|
||||||
if conf["allow"]:
|
if conf["allow"]:
|
||||||
rules_action = accept_action
|
default_action = accept_action
|
||||||
default_action = reject_action
|
rules_action = reject_action
|
||||||
iptables += "-A FORWARD -i vif{0}.0 -p icmp -j ACCEPT\n".format(xid)
|
iptables += "-A FORWARD -i vif{0}.0 -p icmp -j ACCEPT\n".format(xid)
|
||||||
else:
|
else:
|
||||||
rules_action = reject_action
|
default_action = reject_action
|
||||||
default_action = accept_action
|
rules_action = accept_action
|
||||||
|
|
||||||
for rule in conf["rules"]:
|
for rule in conf["rules"]:
|
||||||
iptables += "-A FORWARD -i vif{0}.0 -d {1}".format(xid, rule["address"])
|
iptables += "-A FORWARD -i vif{0}.0 -d {1}".format(xid, rule["address"])
|
||||||
|
Loading…
Reference in New Issue
Block a user