mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Update yunohost_firewall.py
This commit is contained in:
parent
4186cd70b8
commit
bfabbf5954
1 changed files with 5 additions and 0 deletions
|
@ -128,6 +128,11 @@ def firewall_reload(upnp=False):
|
||||||
add_portmapping('TCP', upnp, True);
|
add_portmapping('TCP', upnp, True);
|
||||||
add_portmapping('UDP', upnp, True);
|
add_portmapping('UDP', upnp, True);
|
||||||
|
|
||||||
|
os.system ("iptables -A INPUT -i lo -j ACCEPT")
|
||||||
|
os.system ("iptables -A INPUT -p icmp -j ACCEPT")
|
||||||
|
os.system ("ip6tables -A INPUT -i lo -j ACCEPT")
|
||||||
|
os.system ("ip6tables -A INPUT -p icmp -j ACCEPT")
|
||||||
|
|
||||||
os.system ("iptables -P INPUT DROP")
|
os.system ("iptables -P INPUT DROP")
|
||||||
os.system ("ip6tables -P INPUT DROP")
|
os.system ("ip6tables -P INPUT DROP")
|
||||||
os.system("service fail2ban restart")
|
os.system("service fail2ban restart")
|
||||||
|
|
Loading…
Reference in a new issue