dom0/qvm-firewall: add support for 'allowYumProxy' setting (#568)
This commit is contained in:
parent
030584f026
commit
c81cc32da2
@ -189,7 +189,8 @@ def display_firewall(conf):
|
|||||||
print "Firewall policy: %s" % (
|
print "Firewall policy: %s" % (
|
||||||
"ALLOW all traffic except" if conf['allow'] else "DENY all traffic except")
|
"ALLOW all traffic except" if conf['allow'] else "DENY all traffic except")
|
||||||
print "ICMP: %s" % ("ALLOW" if conf['allowIcmp'] else 'DENY')
|
print "ICMP: %s" % ("ALLOW" if conf['allowIcmp'] else 'DENY')
|
||||||
print "DMS: %s" % ("ALLOW" if conf['allowDns'] else 'DENY')
|
print "DNS: %s" % ("ALLOW" if conf['allowDns'] else 'DENY')
|
||||||
|
print "Qubes yum proxy: %s" % ("ALLOW" if conf['allowYumProxy'] else 'DENY')
|
||||||
list_rules(conf['rules'])
|
list_rules(conf['rules'])
|
||||||
|
|
||||||
def add_rule(conf, args):
|
def add_rule(conf, args):
|
||||||
@ -251,6 +252,8 @@ def main():
|
|||||||
help="Set ICMP access (allow/deny)")
|
help="Set ICMP access (allow/deny)")
|
||||||
parser.add_option ("-D", "--dns", dest="set_dns", action="store", default=None,
|
parser.add_option ("-D", "--dns", dest="set_dns", action="store", default=None,
|
||||||
help="Set DNS access (allow/deny)")
|
help="Set DNS access (allow/deny)")
|
||||||
|
parser.add_option ("-Y", "--yum-proxy", dest="set_yum_proxy", action="store", default=None,
|
||||||
|
help="Set access to Qubes yum proxy (allow/deny)")
|
||||||
|
|
||||||
parser.add_option ("-n", "--numeric", dest="numeric", action="store_true", default=False,
|
parser.add_option ("-n", "--numeric", dest="numeric", action="store_true", default=False,
|
||||||
help="Display port numbers instead of services (makes sense only with --list)")
|
help="Display port numbers instead of services (makes sense only with --list)")
|
||||||
@ -261,7 +264,7 @@ def main():
|
|||||||
vmname = args[0]
|
vmname = args[0]
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
|
|
||||||
if options.do_add or options.do_del or options.set_policy or options.set_icmp or options.set_dns:
|
if options.do_add or options.do_del or options.set_policy or options.set_icmp or options.set_dns or options.set_yum_proxy:
|
||||||
options.do_list = False
|
options.do_list = False
|
||||||
qvm_collection = QubesVmCollection()
|
qvm_collection = QubesVmCollection()
|
||||||
if options.do_list:
|
if options.do_list:
|
||||||
@ -289,6 +292,9 @@ def main():
|
|||||||
if options.set_dns:
|
if options.set_dns:
|
||||||
conf['allowDns'] = allow_deny_value(options.set_dns)
|
conf['allowDns'] = allow_deny_value(options.set_dns)
|
||||||
changed = True
|
changed = True
|
||||||
|
if options.set_yum_proxy:
|
||||||
|
conf['allowYumProxy'] = allow_deny_value(options.set_yum_proxy)
|
||||||
|
changed = True
|
||||||
|
|
||||||
if options.do_add:
|
if options.do_add:
|
||||||
load_services()
|
load_services()
|
||||||
|
Loading…
Reference in New Issue
Block a user