diff --git a/firewall.yml b/firewall.yml index ff6ebc99..976ac43d 100644 --- a/firewall.yml +++ b/firewall.yml @@ -1,6 +1,6 @@ ipv4: TCP: [22, 25, 53, 80, 443, 5222, 5269, 5280] - UDP: [] + UDP: [53] ipv6: TCP: [22] - UDP: [] + UDP: [53] diff --git a/yunohost_firewall.py b/yunohost_firewall.py index a15f3d95..9738afee 100644 --- a/yunohost_firewall.py +++ b/yunohost_firewall.py @@ -229,9 +229,13 @@ def firewall_installupnp(): """ os.system("touch /etc/cron.d/yunohost-firewall") os.system("echo '*/50 * * * * root yunohost firewall reload -u>>/dev/null'>/etc/cron.d/yunohost-firewall") - win_msg(_("Upnp install")) + win_msg(_("UPNP cron installed")) def firewall_removeupnp(): - os.system("rm /etc/cron.d/yunohost-firewall") - win_msg(_("Upnp remove")) + try: + os.remove("/etc/cron.d/yunohost-firewall") + except: + raise YunoHostError(167,_("UPNP cron was not installed!")) + + win_msg(_("UPNP cron removed"))