mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
commit
ac59954aee
1 changed files with 2 additions and 2 deletions
|
@ -253,9 +253,9 @@ def add_portmapping(protocol=None, upnp=False, ipv6=None, mode=None,):
|
||||||
|
|
||||||
for i, port in enumerate(firewall[ip][protocol]):
|
for i, port in enumerate(firewall[ip][protocol]):
|
||||||
if ipv6:
|
if ipv6:
|
||||||
os.system("ip6tables -A INPUT -p " + protocol + " -i eth0 --dport " + str(port) + " -j ACCEPT")
|
os.system("ip6tables -A INPUT -p " + protocol + " --dport " + str(port) + " -j ACCEPT")
|
||||||
else:
|
else:
|
||||||
os.system("iptables -A INPUT -p " + protocol + " -i eth0 --dport " + str(port) + " -j ACCEPT")
|
os.system("iptables -A INPUT -p " + protocol + " --dport " + str(port) + " -j ACCEPT")
|
||||||
if upnp and not ipv6:
|
if upnp and not ipv6:
|
||||||
if port in firewall['UPNP']['ports'][protocol]:
|
if port in firewall['UPNP']['ports'][protocol]:
|
||||||
upnpc = miniupnpc.UPnP()
|
upnpc = miniupnpc.UPnP()
|
||||||
|
|
Loading…
Reference in a new issue