Add port in iptables

This commit is contained in:
2025-07-01 20:45:31 +05:30
commit 2f1ff36a64

8
firewall.sh Normal file
View 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