dom0/core: implement per-VM-type firewall defaults
This commit is contained in:
parent
79f13d6c66
commit
a8b992e647
@ -1215,8 +1215,11 @@ class QubesVm(object):
|
|||||||
def has_firewall(self):
|
def has_firewall(self):
|
||||||
return os.path.exists (self.firewall_conf)
|
return os.path.exists (self.firewall_conf)
|
||||||
|
|
||||||
|
def get_firewall_defaults(self):
|
||||||
|
return { "rules": list(), "allow": True, "allowDns": True, "allowIcmp": True, "allowYumProxy": False }
|
||||||
|
|
||||||
def get_firewall_conf(self):
|
def get_firewall_conf(self):
|
||||||
conf = { "rules": list(), "allow": True, "allowDns": True, "allowIcmp": True, "allowYumProxy": False }
|
conf = self.get_firewall_defaults()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
tree = xml.etree.ElementTree.parse(self.firewall_conf)
|
tree = xml.etree.ElementTree.parse(self.firewall_conf)
|
||||||
|
Loading…
Reference in New Issue
Block a user