Fail2ban

From Applied Optics Wiki
Jump to: navigation, search

Back to Linux How-tos


Fail2Ban

The blocking is done by adding the offending IP to a number of iptables filters.

To enable yourself to log in again, the first thing you need is access to the machine. This initially sounds a bit like There's a hole in my bucket, but usually you can get in via another PC.

How can I remove an IP address that Fail2Ban blocked?

iptables -L -n --line-numbers

Find the line numbers and chain names of your IP then:

iptables -D CHAINNAME X

where CHAINNAME is the name of the chain and X is the linenumber of the rule you wish to remove, eg:

iptables -D f2b-sshd 1