Last active
October 2, 2019 12:26
-
-
Save stephenscaff/a0527da89b69dab57f93c09b4287b174 to your computer and use it in GitHub Desktop.
Instructions for freeing an IP from fail2ban jail.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, use ip tables to find fail2ban rules | |
iptables -L -n | |
# Locate the block ip among the listed refs returned | |
... | |
Chain f2b-wordpress-hard (1 references) | |
target prot opt source destination | |
REJECT all -- 1.2.3.4.5 0.0.0.0/0 reject-with icmp-port-unreachable | |
RETURN all -- 0.0.0.0/0 0.0.0.0/0 | |
... | |
# Then use fail2ban-client status to find actual jail names. | |
# Though, it might just be what's in Chain, minus the f2b- prefix. | |
fail2ban-client status | |
# Jail list status returned | |
... | |
|- Number of jail: 3 | |
`- Jail list: sshd, wordpress-hard, wordpress-soft | |
... | |
# Now, remove the desired ip | |
fail2ban-client set wordpress-hard unbanip 1.2.3.4.5 | |
# The provided ip should be returned, indicating that it's been set free and you're good to go. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment