Update manage_iptables

This commit is contained in:
vijay 2025-05-08 02:03:26 +00:00
parent dcd5f62cfc
commit f1cffe4fb4

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
https://git.technozone.com.au/vijay/Scripts/raw/branch/main/manage_iptables # Execute the script from the URL and remove it after execution:
# wget -qO- https://git.technozone.com.au/vijay/Scripts/raw/branch/main/manage_iptables | bash && rm -f manage_iptables
# Function to display the menu # Function to display the menu
show_menu() { show_menu() {
@ -50,7 +51,7 @@ remove_from_blacklist() {
if is_in_blacklist "$ip_address"; then if is_in_blacklist "$ip_address"; then
sudo iptables -D INPUT -s "$ip_address" -j DROP sudo iptables -D INPUT -s "$ip_address" -j DROP
echo "IP address $ip_address removed from blacklist." echo "IP address $ip_address removed from blacklist."
} else { else
echo "IP address $ip_address is not in the blacklist." echo "IP address $ip_address is not in the blacklist."
fi fi
} }