Skip to content

Instantly share code, notes, and snippets.

@fduran
Created February 20, 2012 18:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fduran/1870519 to your computer and use it in GitHub Desktop.
Save fduran/1870519 to your computer and use it in GitHub Desktop.
Linux: Block IP with iptables
# www.fduran.com
# Block an external attacker's IP address (1.2.3.4) with netfilter (iptables)
/sbin/iptables --append INPUT --source 1.2.3.4 -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment