From 2f1ff36a647bb6dbc5ebc04de7b3d1f2d3c07917 Mon Sep 17 00:00:00 2001 From: ryuupendragon Date: Tue, 1 Jul 2025 20:45:31 +0530 Subject: [PATCH] Add port in iptables --- firewall.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 firewall.sh diff --git a/firewall.sh b/firewall.sh new file mode 100644 index 0000000..0cd04e7 --- /dev/null +++ b/firewall.sh @@ -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