Skip to content

hostsdeny actionunban does not seem to work #3112

Answered by sebres
gavsiu asked this question in Q&A
Discussion options

You must be logged in to vote

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

actionunban = IP=$(echo "<ip_value>" | sed 's/[][\.]/\\\0/g') && sed -i "/^<daemon_list>: $IP$/d" <file>

(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 …

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@gavsiu
Comment options

@gavsiu
Comment options

@sebres
Comment options

@gavsiu
Comment options

@sebres
Comment options

Answer selected by sebres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants