mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Firewall functions
This commit is contained in:
parent
b98717f0b5
commit
1958a351b6
1 changed files with 47 additions and 3 deletions
46
parse_args
46
parse_args
|
@ -434,6 +434,9 @@ action_map = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
#############################
|
||||||
|
# Monitor #
|
||||||
|
#############################
|
||||||
'monitor' : {
|
'monitor' : {
|
||||||
'category_help' : _("Monitoring functions"),
|
'category_help' : _("Monitoring functions"),
|
||||||
'actions' : {
|
'actions' : {
|
||||||
|
@ -470,10 +473,51 @@ action_map = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
#############################
|
||||||
|
# Firewall #
|
||||||
|
#############################
|
||||||
|
'firewall' : {
|
||||||
|
'category_help' : _("Manage firewall rules"),
|
||||||
|
'actions' : {
|
||||||
|
'list' : {
|
||||||
|
'action_help' : _("List all firewall rules"),
|
||||||
|
'connections' : ['firewall'],
|
||||||
|
},
|
||||||
|
'allow' : {
|
||||||
|
'action_help' : _("Allow connection port/protocol"),
|
||||||
|
'connections' : ['firewall'],
|
||||||
|
'arguments' : {
|
||||||
|
'port' : {
|
||||||
|
'help' : _("Port to open"),
|
||||||
|
},
|
||||||
|
'protocol' : {
|
||||||
|
'help' : _("Protocol associated with port"),
|
||||||
|
'choices' : ['UDP', 'TCP', 'Both'],
|
||||||
|
},
|
||||||
|
'name' : {
|
||||||
|
'help' : _("Reference name of the rule"),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'disallow' : {
|
||||||
|
'action_help' : _("Disallow connection"),
|
||||||
|
'connections' : ['firewall'],
|
||||||
|
'arguments' : {
|
||||||
|
'name' : {
|
||||||
|
'help' : _("Reference name of the rule to delete"),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
#############################
|
||||||
|
# Tools #
|
||||||
|
#############################
|
||||||
'tools' : {
|
'tools' : {
|
||||||
'category_help' : _("Specific tools"),
|
'category_help' : _("Specific tools"),
|
||||||
'actions' : {}
|
'actions' : {}
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
def parse_dict(action_map):
|
def parse_dict(action_map):
|
||||||
|
|
Loading…
Add table
Reference in a new issue