Unblock a user from fail2ban

Posted on January 22, 2010 | Category: Comcast, Informational, Linux, Linux Distributions, Networking, Server, Ubuntu, bash, ssh


Last month my Comcast static ip address changed. Yes, I know that a static ip address is supposed to be “static.” However, each of the previous two times I was configured, the representatives gave me an ip within their non-static blocks. Fun. This transition led me to unknowingly trigger fail2ban for my SSH protocol, an intrusion prevention framework installed on my Ubuntu Server. Now that I blocked myself, how would I unblock myself? A fellow UbuntuForums contributor helped me out. Since I could not unblock myself remotely at the specific ip address, I had to wait to get home and do the operations manually.

iptables -D fail2ban-SSH -s xxx.xxx.xxx.xxx -j DROP

Also from the same post, is pannemanm’s jail.local file. I oftentimes find it helpful to post various config files like this. It can help me, or someone else, in the future.
# The DEFAULT allows a global definition of the options. They can be override # in each jail afterwards. [DEFAULT] # "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not # ban a host which matches an address in this list. Several addresses can be # defined using space separator. ignoreip = Enter the IP addresses to ignore here # "bantime" is the number of seconds that a host is banned. 172800 seconds = 48 hours bantime = 172800 # A host is banned if it has generated "maxretry" during the last "findtime" # seconds. findtime = 600 # "maxretry" is the number of failures before a host get banned. maxretry = 3 # "backend" specifies the backend used to get files modification. Available # options are "gamin", "polling" and "auto". This option can be overridden in # each jail too (use "gamin" for a jail and "polling" for another). # # gamin: requires Gamin (a file alteration monitor) to be installed. If Gamin # is not installed, Fail2ban will use polling. # polling: uses a polling algorithm which does not require external libraries. # auto: will choose Gamin if available and polling otherwise. backend = auto # This jail corresponds to the standard configuration in Fail2ban 0.6. # The mail-whois action send a notification e-mail with a whois request # in the body. [ssh-iptables] enabled = true filter = sshd action = iptables[name=SSH, port=ssh, protocol=tcp] sendmail-whois-lines[name=SSH, dest=mailaddress, sender=sender address] logpath = /var/log/auth.log maxretry = 3 [vsftpd-iptables] enabled = true filter = vsftpd action = iptables[name=VSFTPD, port=ftp, protocol=tcp] sendmail-whois-lines[name=VSFTPD, dest=mailaddress, sender=sender address] logpath = /var/log/vsftpd.log /var/log/auth.log maxretry = 3 [apache-iptables] enabled = true filter = apache-noscript action = iptables[name=APACHE, port=http, protocl=tcp] sendmail-whois-lines[name=APACHE2, dest=mailaddress, sender=sender address] logpath = /var/log/apache2/error.log maxretry = 3

Similar Articles

Leave a Reply

CAPTCHA Image CAPTCHA Audio
Refresh Image

Design: YGoY TopOfBlogs