Block IP Address using IPtables

From Birnam Designs Wiki

Jump to: navigation, search
  • 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 -F

For more itables help:

iptables --help
Share This!
This page was last modified on 11 February 2010, at 19:50. This page has been accessed 647 times.