TIPS Persistent fail2ban banning

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
I've been using my PBX for years without problems. It lives in the basement and my modem forwards the correct ports. I'm running fail2ban and all has been fine.

fail2ban, however, doesn't persist bans between restarts and reboots. This article Persistent Fail2ban stats the 3 lines which need to be added for banned IPs to be written to disk and loaded upon restart.

Unfortunately, when I copy the 3 changes, fail2ban fails to restart. I'm using copy and paste, so I think it may be that 'our version' is different than stock.

Ward/All, is there something simple I'm missing to get permanent, persistent bans working?

Thanks.

Andrew
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,634
Reaction score
844
Fail2ban less than 0.9 does not support persistant banning. Versions above >=0.9 dont need any external help over a restart
 

KNERD

Well-Known Member
Joined
Mar 9, 2014
Messages
1,674
Reaction score
593
All you should need to do is enter something like

fail2ban-client -vvv set asterisk-iptables banip 212.129.0.0/16

If should be permanent.
 
Last edited:

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,634
Reaction score
844
That will work fone on 0.9+,You would need to check that on 0.8 as I think you would need to do that on every fail2ban restart, that version has no permenant memory, +0.9 adds sqlite3 to the mix, try it.
 

KNERD

Well-Known Member
Joined
Mar 9, 2014
Messages
1,674
Reaction score
593
but we do not know which version he is running at this point. I am sure they will respond soon enough.
 

Members online

No members online now.

Forum statistics

Threads
25,814
Messages
167,778
Members
19,245
Latest member
rahee
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top