SOLVED fail2ban warnings

markrmcs

Member
Joined
Jan 4, 2008
Messages
51
Reaction score
10
I have a new install of PIAF Green with FreePBX2.11 and I noticed that when fail2ban is disabled or enabled that several warnings appear.

Code:
root@pbx:~ $ disable-fail2ban
 
Now stopping the Fail2Ban service
WARNING 'pidfile' not defined in 'Definition'. Using default value
Shutdown successful
Verifying that the fail2ban service was stopped
Fail2ban has been stopped and disabled!
Rebooting will NOT start it you must use enable-fail2ban

Code:
root@pbx:~ $ enable-fail2ban
 
Now starting fail2ban service
WARNING 'pidfile' not defined in 'Definition'. Using default value
WARNING 'usedns' not defined in 'named-refused-tcp'. Using default value
WARNING 'usedns' not defined in 'ssh-iptables'. Using default value
WARNING 'usedns' not defined in 'postfix-tcpwrapper'. Using default value
WARNING 'usedns' not defined in 'ssh-ipfw'. Using default value
WARNING 'usedns' not defined in 'named-refused-udp'. Using default value
WARNING 'usedns' not defined in 'asterisk-iptables'. Using default value
WARNING 'usedns' not defined in 'vsftpd-notification'. Using default value
WARNING 'usedns' not defined in 'ssh-tcpwrapper'. Using default value
WARNING 'usedns' not defined in 'apache-tcpwrapper'. Using default value
WARNING 'usedns' not defined in 'apache-shorewall'. Using default value
WARNING 'usedns' not defined in 'proftpd-iptables'. Using default value
WARNING 'usedns' not defined in 'apache-badbots'. Using default value
WARNING 'usedns' not defined in 'vsftpd-iptables'. Using default value
WARNING 'usedns' not defined in 'sasl-iptables'. Using default value
ERROR  No file found for /var/log/asterisk/fail2ban
2013-10-10 10:35:59,159 fail2ban.server : INFO  Starting Fail2ban v0.8.8
2013-10-10 10:35:59,160 fail2ban.server : INFO  Starting in daemon mode
Verifying Fail2ban service was started successfully
the fail2ban service appears to be running

I also appears from the messages that fail2ban appears to be running but the errors concern me. Is this something I should be concerned about?
 

markrmcs

Member
Joined
Jan 4, 2008
Messages
51
Reaction score
10
Found out that if I enter the following in /etc/fail2ban/fail2ban.conf:

Code:
# Option: pidfile
# Notes.: Set the PID file. This is used to store the process ID of the
# fail2ban server.
# Values: FILE Default: /var/run/fail2ban/fail2ban.pid
#
pidfile = /var/run/fail2ban/fail2ban.pid

and in /etc/fail2ban/jail.conf in the [DEFAULT] section:

Code:
# "usedns" specifies if jails should trust hostnames in logs,
# warn when DNS lookups are performed, or ignore all hostnames in logs
#
# yes: if a hostname is encountered, a DNS lookup will be performed.
# warn: if a hostname is encountered, a DNS lookup will be performed,
# but it will be logged as a warning.
# no: if a hostname is encountered, will not be used for banning,
# but it will be logged as info.
usedns = warn

warnings go away/

The error regarding "No file found for /var/log/asterisk/fail2ban" was due to the entry for the logpath for "[asterisk-iptables]" filter in /etc/fail2ban/jail.local which is indicated in the comments in the file is for the sysadmin module from schmoozecom which is not installed. I edited this entry to match the entry in /etc/fail2ban/jail.conf which is /var/log/asterisk/full.
 

kdaffef02

Member
Joined
Apr 29, 2011
Messages
114
Reaction score
8
Hi and thank you for this thread that helps,
I'm also experiencing this problem with fail2ban-server, but :

- no warnings (thanks to markrmcs),
- cpu reaches 100% and sever blocked !!

for instance, fail2ban is disabled, waiting for help !

Thank you


- server at digital ocean vps
──────────────────────SYSTEM INFORMATION───────────────────────────┐
│ Asterisk = ONLINE | Dahdi = ONLINE | MySQL = ONLINE │
│ SSH = ONLINE | Apache = ONLINE | Iptables = ONLINE │
│ Fail2ban = OFFLINE | Internet = ONLINE | Ip6Tables = ONLINE │
│ Disk Free = ADEQUATE| Mem Free = ADEQUATE| NTPD = ONLINE │
│ SendMail = ONLINE | Samba = OFFLINE | Webmin = ONLINE │
│ Ethernet0 = ONLINE | Ethernet1 = N/A | Wlan0 = N/A │
│ │
│ PIAF Installed Version = 3.0.6.6 under *KVM* │
│ FreePBX Version = 2.11.0.42 │
│ Running Asterisk Version = 11.12.0 │
│ Asterisk Source Version = 11.12.0 *MODIFIED* │
│ Dahdi Source Version = 2.10.0 │
│ Libpri Source Version = 1.4.15 │
│ IP Address = XXX.XXX.XXX.XX on eth0 │
│ Operating System = CentOS release 6.6 (Final) >< │
│ Kernel Version = 2.6.32-431.1.2.0.1.el6.i686 - 32 Bit
 

Members online

No members online now.

Forum statistics

Threads
25,824
Messages
167,826
Members
19,249
Latest member
jetest
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