Fred Stluka on 5 Feb 2012 22:34:13 -0800 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Quick& dirty IP blocking |
On 2/3/12 3:26 PM, JP Vossen wrote:
Yeah, adding a rule is a one-liner:Date: Fri, 3 Feb 2012 09:09:35 -0500 sudo iptables -I INPUT -s $1 -j DROP and making the change permanent is another one-liner: sudo service iptables save I use fail2ban to automatically block IP addresses, but when I want to block one manually, I have it all wrapped up, including e-mail to root (which is forwarded to all sys admins) saying that the IP was blocked. So, none of the other sysadmins who may see the same logwatch e-mail bothers to block it again. See: http://bristle.com/Tips/Unix/ipblock --Fred
Fred Stluka -- mailto:fred@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need no Windows or Gates. |
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug