eth0 interfacace fix

This commit is contained in:
titoko 2013-07-14 16:48:29 +02:00
parent 7626497d9d
commit a0eb1ee0b1

View file

@ -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()