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:
parent
1522a7f759
commit
dc29da8316
1 changed files with 2 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue