mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Add stop firewall action
This commit is contained in:
parent
a48c0006f5
commit
ae8c327583
2 changed files with 16 additions and 0 deletions
|
@ -499,6 +499,11 @@ firewall:
|
||||||
### firewall_removeupnp()
|
### firewall_removeupnp()
|
||||||
removeupnp:
|
removeupnp:
|
||||||
action_help: Remove upnp cron
|
action_help: Remove upnp cron
|
||||||
|
|
||||||
|
|
||||||
|
### firewall_stop()
|
||||||
|
stop:
|
||||||
|
action_help: Stop iptables and ip6tables
|
||||||
#############################
|
#############################
|
||||||
# Tools #
|
# Tools #
|
||||||
#############################
|
#############################
|
||||||
|
|
|
@ -239,3 +239,14 @@ def firewall_removeupnp():
|
||||||
raise YunoHostError(167,_("UPNP cron was not installed!"))
|
raise YunoHostError(167,_("UPNP cron was not installed!"))
|
||||||
|
|
||||||
win_msg(_("UPNP cron removed"))
|
win_msg(_("UPNP cron removed"))
|
||||||
|
|
||||||
|
|
||||||
|
def firewall_stop():
|
||||||
|
|
||||||
|
os.system ("iptables -P INPUT ACCEPT")
|
||||||
|
os.system ("iptables -F")
|
||||||
|
os.system ("iptables -X")
|
||||||
|
|
||||||
|
os.system ("ip6tables -P INPUT ACCEPT")
|
||||||
|
os.system ("ip6tables -F")
|
||||||
|
os.system ("ip6tables -X")
|
||||||
|
|
Loading…
Add table
Reference in a new issue