1
0
Fork 0
mirror of https://github.com/YunoHost/moulinette.git synced 2024-09-03 20:06:31 +02:00

Update yunohost_firewall.py

Remove name argument
This commit is contained in:
titoko 2012-12-12 14:16:11 +01:00
parent df035adfb0
commit c21db5055d

View file

@ -9,7 +9,7 @@ except ImportError:
sys.stderr.write('apt-get install python-yaml\n')
sys.exit(1)
def firewall_allow(protocol=None,port=None,name=None):
def firewall_allow(protocol=None,port=None):
if protocol == "Both":
chaineTCP="iptables -A INPUT -p tcp -i eth0 --dport "+ port +" -j ACCEPT"
chaineUDP="iptables -A INPUT -p udp -i eth0 --dport "+ port +" -j ACCEPT"
@ -23,7 +23,7 @@ def firewall_allow(protocol=None,port=None,name=None):
append_port(port,protocol)
os.system(chaine)
def firewall_disallow(protocol=None,port=None,name=None):
def firewall_disallow(protocol=None,port=None):
if protocol == "Both":
chaineTCP="iptables -A INPUT -p tcp -i eth0 --dport "+ port +" -j REJECT"
chaineUDP="iptables -A INPUT -p udp -i eth0 --dport "+ port +" -j REJECT"