Update yunohost_firewall.py

This commit is contained in:
Alexis Gavoty 2013-12-26 17:41:15 +01:00
parent 5645737509
commit eb265396b3

View file

@ -137,10 +137,14 @@ def firewall_reload(upnp=False):
add_portmapping('TCP', upnp, False, 'r')
add_portmapping('UDP', upnp, False, 'r')
ipv6 = False
if os.path.exists("/proc/net/if_inet6"):
add_portmapping('TCP', upnp, True, 'r')
add_portmapping('UDP', upnp, True, 'r')
ipv6 = True
hook_callback('post_iptable_rules', [upnp, ipv6])
os.system("iptables -A INPUT -i lo -j ACCEPT")
os.system("iptables -A INPUT -p icmp -j ACCEPT")