diff --git a/action_map.yml b/action_map.yml index dcda6abf..3e24cdb7 100644 --- a/action_map.yml +++ b/action_map.yml @@ -499,6 +499,11 @@ firewall: ### firewall_removeupnp() removeupnp: action_help: Remove upnp cron + + + ### firewall_stop() + stop: + action_help: Stop iptables and ip6tables ############################# # Tools # ############################# diff --git a/yunohost_firewall.py b/yunohost_firewall.py index 9738afee..57bdd789 100644 --- a/yunohost_firewall.py +++ b/yunohost_firewall.py @@ -239,3 +239,14 @@ def firewall_removeupnp(): raise YunoHostError(167,_("UPNP cron was not installed!")) 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")