-
OS: FreeBSD 12.2-RELEASE-p9 Through testing, I realized hostsdeny action adds my IP to the hosts.deny file when I trigger the sshd filter. I try to unban myself using
actionunban was not modified and matches the latest here on GitHub.
I found this and followed it. I got rid of the error, but the entry was still not removed from hosts.deny file. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
See https://stackoverflow.com/a/35620381/7161854 Shortly: FreeBSD You have to change fail2ban/config/action.d/hostsdeny.conf Line 42 in 5093ff8 (or rewrite it in /etc/fail2ban/action.d/hostsdeny.local )
- actionunban = IP=$(echo "<ip_value>" | sed 's/[][\.]/\\\0/g') && sed -i "/^<daemon_list>: $IP$/d" <file>
+ actionunban = IP=$(echo "<ip_value>" | sed 's/[][\.]/\\\0/g') && sed -i .bak "/^<daemon_list>: $IP$/d" <file> @fail2ban/bsd, @fail2ban/maintainers do we need some customized action here (or can it be generalized using parameter |
Beta Was this translation helpful? Give feedback.
See https://stackoverflow.com/a/35620381/7161854
Shortly: FreeBSD
sed
requires an argument after-i
to rename the original file to.You have to change
fail2ban/config/action.d/hostsdeny.conf
Line 42 in 5093ff8
(or rewrite it in
/etc/fail2ban/action.d/hostsdeny.local
)@fail2ban/bsd, @fail2ban/maintainers do we need some customized action here (or can it …