Add port in iptables
This commit is contained in:
8
firewall.sh
Normal file
8
firewall.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
echo Opening port \"$1\" in firewall
|
||||
|
||||
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport $1 -j ACCEPT
|
||||
|
||||
echo Saving the changes to IPTables
|
||||
|
||||
sudo netfilter-persistent save
|
Reference in New Issue
Block a user