Block IP Address using IPtables
From Birnam Designs Wiki
- login to server via SSH and su - to root
- after logging in as root you can look at the tables currently in effect with:
iptables -L -n
- to block an IP address, use:
iptables -I INPUT -s 123.123.123.123 -j DROP
- to verify the entry, you can rerun the first command
- flush the IP tables with:
iptables -FFor more itables help:
iptables --help