Assisting 13874695 developers since 2005.

Web Developer, Open Source, Loyal, Dad.  

Read More »

Remove Banned IP from Fail2Ban on Ubuntu / Raspberry Pi

Posted by David  •  Sep 27th, 2014 10:10:12 pm - Subscribe | Mood: Studying | Music: No music

If you have never used Fail2Ban on your Linux distro. I would greatly recommended it, especially if you seeing a lot of traffic trying to brute force your standard SSH connection.

Good practice:
1. Do not SSH on port 22
2. Do not use root
3. Disable root

But this entry is not on good practices on SSH connections, but rather how to remove a ban that Fail2Ban may have done to block you, a client, or a connection that was not intended to be blocked.



Begin by doing the following:
1. iptables -L (Do you see your ip in this list?)
2. iptables -D fail2ban-ssh -s xxx.xxx.xxx.xxx -j DROP
3. Where you see xxx.xxx.xxx.xxx add the IP that is banned.
4. Now verify that your IP is no longer in the list: iptables -L



That's it! Your IP should now be removed! To prevent this from happening again, navigate to the follow path and add your IP address to the safe list:

1. cd /etc/fail2ban
2. vi fail.conf
3. Now locate: # "ignoreip" can be an IP address, a CIDR mask or a DNS host
4. Add your IP address to this list
5. Now save with a :x

I hope this helps you, if you have questions drop me a comment below.

Comments 0  •  Sep 27th, 2014 10:10:12 pm - Subscribe  •  Tweet this entry | Post a comment



Responses

Leave a Reply


ReCaptcha:

Posting as anonymous Anonymous guest, why not register, or login now.

Image Gallery

Badges

Amazon Wishlist Stumble Upon Toolbar
Internet Blogs - Blog Top Sites Internet Blogs - Blog Top Sites Technology

About Me

avatar

@davidpolanco
iPhone: 29.513522,-98.565523 Web Designer, Open Source, Loyal, Dad. Learn more...