Block a single IP address immediately with iptables
how to block an ip with iptables | iptables drop ip address | block attacker ip linux | iptables | firewall | banCaution: This command changes the system. Understand what it does before you run it.
iptables -I INPUT -s 203.0.113.25 -j DROPInserts a rule at the top of the INPUT chain that drops all packets from the given IP. The block takes effect immediately and lasts until a reboot or until the firewall is reloaded. To remove it, use the same line with -D instead of -I.
Note: Never enter your own admin IP. For recurring attackers, Fail2Ban or the Plesk firewall is the permanent solution.
Open question before approval: Auf Plesk-Servern mit Firewall-Erweiterung prüfen, ob die Regel beim nächsten Anwenden der Plesk-Firewall verworfen wird und ob iptables-nft dort Standard ist.
Also searched as
- how to block an ip with iptables
- iptables drop ip address
- block attacker ip linux