Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmadawais/2e292892a2d88cd84cee07bb6dfcd529 to your computer and use it in GitHub Desktop.
Save ahmadawais/2e292892a2d88cd84cee07bb6dfcd529 to your computer and use it in GitHub Desktop.
Stop Fail2Ban from Banning your DynamicIP by using FreeDNS

Stop Fail2Ban from Banning your DynamicIP by using FreeDNS

I was getting banned by f2b sshd for using autossh and since I am at a Dynamic DNS with no way of knowing its range. I started to look for solutions.

Mike Andreasen has been more than helpful in situations like these. You should definitely hire him.

  • Create an account at Afraid DNS
  • Create a subdomain and use your IP with A (https://i.imgur.com/d3xKbAV.png)
  • Open fail2ban jail.local nano /etc/fail2ban/jail.local
  • Then add your sub domain FDNS in ignore ip like ignoreip = 127.0.0.1/8 sub.mooo.com
  • Your logs for f2b will look like this now INFO [sshd] Ignore <IP_HERE> by dns

That's all!

For more try this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment