I have an issue with my pbx, for some reason F2ban wont start , then I realiced that iptable were not starting at all, even restarting the pbx.
I was looking at the logs but i can find anything related, my pbx is a FreePBX 126.96.36.199 distro.
fail2ban adds chains to any existing iptables, by default your fail2ban logs should be in the file defined by logtarget in fail2ban.conf, the level would be defined by loglevel in the same file. If Fail2ban is badly configured, it won’t do anything but the reason why would be in the log file.
I see iptables wont start because chains are generated by f2ban, is that right, thnere must be sometning wrong in the f2ban configuration.
As I said, the reason fail2ban doesn’t start should be found in the logfile. For more in depth info on how it works:-
I actually get this error when iI try to start f2ban manully:
]# fail2ban-client start
WARNING ‘action’ not defined in ‘lighttpd-fastcgi’. Using default value
WARNING ‘action’ not defined in ‘php-url-fopen’. Using default value
WARNING ‘action’ not defined in ‘lighttpd-auth’. Using default value
ERROR /etc/fail2ban/filter.d/freepbx.conf and /etc/fail2ban/filter.d/freepbx.local do not exist
ERROR Unable to read the filter
ERROR Errors in jail ‘pbx-gui’. Skipping…
How did you install fail2ban?
I did not, it is the distro.
Sorry, I’ve never done it that way. Maybe the "Distro Discussion . . . " would be a better forum ?
ok, thanks for your help, I have it working now, I went to jail.local and commented everything related to freepbx-gui and changed the line asterisk by asterisk-security.
Good luck with that recipe