forked from norman/fusionpbx-install.sh-github-mirror
fixes for fail2ban (#10)
export the command line variables so sub scripts can use them use sed to update log path is source is used simplify freeswitch rules to use protocol=all general tidy up of spacing in files
This commit is contained in:
@@ -1,45 +1,33 @@
|
||||
[freeswitch-tcp]
|
||||
[freeswitch]
|
||||
enabled = true
|
||||
port = 5060,5061,5080,5081,5070
|
||||
protocol = tcp
|
||||
port = 5060,5061,5080,5081
|
||||
protocol = all
|
||||
filter = freeswitch
|
||||
logpath = /var/log/freeswitch/freeswitch.log
|
||||
action = iptables-allports[name=freeswitch-tcp, protocol=all]
|
||||
maxretry = 5
|
||||
findtime = 600
|
||||
bantime = 600
|
||||
# sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org] #no smtp server installed
|
||||
|
||||
[freeswitch-udp]
|
||||
enabled = true
|
||||
port = 5060,5061,5080,5081,5070
|
||||
protocol = udp
|
||||
filter = freeswitch
|
||||
logpath = /var/log/freeswitch/freeswitch.log
|
||||
action = iptables-allports[name=freeswitch-udp, protocol=all]
|
||||
action = iptables-allports[name=freeswitch, protocol=all]
|
||||
maxretry = 5
|
||||
findtime = 600
|
||||
bantime = 600
|
||||
# sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org] #no smtp server installed
|
||||
|
||||
[freeswitch-ip]
|
||||
enabled = true
|
||||
port = 5060,5061,5080,5081
|
||||
protocol = udp
|
||||
filter = freeswitch-ip
|
||||
logpath = /var/log/freeswitch/freeswitch.log
|
||||
action = iptables-allports[name=freeswitch-ip, protocol=all]
|
||||
enabled = true
|
||||
port = 5060,5061,5080,5081
|
||||
protocol = all
|
||||
filter = freeswitch-ip
|
||||
logpath = /var/log/freeswitch/freeswitch.log
|
||||
action = iptables-allports[name=freeswitch-ip, protocol=all]
|
||||
maxretry = 1
|
||||
findtime = 30
|
||||
bantime = 86400
|
||||
|
||||
[freeswitch-dos]
|
||||
enabled = true
|
||||
port = 5060,5061,5080,5081,5070
|
||||
protocol = udp
|
||||
filter = freeswitch-dos
|
||||
logpath = /var/log/freeswitch/freeswitch.log
|
||||
action = iptables-allports[name=freeswitch-dos, protocol=all]
|
||||
enabled = true
|
||||
port = 5060,5061,5080,5081
|
||||
protocol = all
|
||||
filter = freeswitch-dos
|
||||
logpath = /var/log/freeswitch/freeswitch.log
|
||||
action = iptables-allports[name=freeswitch-dos, protocol=all]
|
||||
maxretry = 50
|
||||
findtime = 30
|
||||
bantime = 6000
|
||||
@@ -57,11 +45,12 @@ findtime = 600
|
||||
bantime = 600
|
||||
|
||||
[nginx-404]
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-404
|
||||
logpath = /var/log/nginx/access*.log
|
||||
bantime = 600
|
||||
enabled = true
|
||||
port = 80,443
|
||||
protocol = tcp
|
||||
filter = nginx-404
|
||||
logpath = /var/log/nginx/access*.log
|
||||
bantime = 600
|
||||
findtime = 600
|
||||
maxretry = 10
|
||||
|
||||
@@ -69,10 +58,11 @@ maxretry = 10
|
||||
# Based on apache-badbots but a simple IP check (any IP requesting more than
|
||||
# 240 pages in 60 seconds, or 4p/s average, is suspicious)
|
||||
# Block for two full days.
|
||||
enabled = true
|
||||
port = http
|
||||
filter = nginx-dos
|
||||
logpath = /var/log/nginx/access*.log
|
||||
enabled = true
|
||||
port = 80
|
||||
protocol = tcp
|
||||
filter = nginx-dos
|
||||
logpath = /var/log/nginx/access*.log
|
||||
findtime = 60
|
||||
bantime = 172800
|
||||
maxretry = 240
|
||||
bantime = 172800
|
||||
maxretry = 240
|
||||
76
debian/resources/fail2ban/jail.source
vendored
76
debian/resources/fail2ban/jail.source
vendored
@@ -1,76 +0,0 @@
|
||||
[freeswitch-tcp]
|
||||
enabled = true
|
||||
port = 5060,5061,5080,5081,5070
|
||||
protocol = tcp
|
||||
filter = freeswitch
|
||||
logpath = /usr/local/freeswitch/log/freeswitch.log
|
||||
action = iptables-allports[name=freeswitch-tcp, protocol=all]
|
||||
maxretry = 5
|
||||
findtime = 600
|
||||
bantime = 600
|
||||
# sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org] #no smtp server installed
|
||||
|
||||
[freeswitch-udp]
|
||||
enabled = true
|
||||
port = 5060,5061,5080,5081,5070
|
||||
protocol = udp
|
||||
filter = freeswitch
|
||||
logpath = /usr/local/freeswitch/log/freeswitch.log
|
||||
action = iptables-allports[name=freeswitch-udp, protocol=all]
|
||||
maxretry = 5
|
||||
findtime = 600
|
||||
bantime = 600
|
||||
# sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org] #no smtp server installed
|
||||
|
||||
[freeswitch-ip]
|
||||
enabled = true
|
||||
port = 5060,5061,5080,5081
|
||||
protocol = udp
|
||||
filter = freeswitch-ip
|
||||
logpath = /usr/local/freeswitch/log/freeswitch.log
|
||||
action = iptables-allports[name=freeswitch-ip, protocol=all]
|
||||
maxretry = 1
|
||||
findtime = 30
|
||||
bantime = 86400
|
||||
|
||||
[freeswitch-dos]
|
||||
enabled = true
|
||||
port = 5060,5061,5080,5081,5070
|
||||
protocol = udp
|
||||
filter = freeswitch-dos
|
||||
logpath = /usr/local/freeswitch/log/freeswitch.log
|
||||
action = iptables-allports[name=freeswitch-dos, protocol=all]
|
||||
maxretry = 50
|
||||
findtime = 30
|
||||
bantime = 6000
|
||||
|
||||
[fusionpbx]
|
||||
enabled = true
|
||||
port = 80,443
|
||||
protocol = tcp
|
||||
filter = fusionpbx
|
||||
logpath = /var/log/auth.log
|
||||
action = iptables-allports[name=fusionpbx, protocol=all]
|
||||
# sendmail-whois[name=fusionpbx, dest=root, sender=fail2ban@example.org] #no smtp server installed
|
||||
maxretry = 5
|
||||
findtime = 600
|
||||
bantime = 600
|
||||
|
||||
[nginx-404]
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-404
|
||||
logpath = /var/log/nginx/access*.log
|
||||
bantime = 600
|
||||
findtime = 600
|
||||
maxretry = 10
|
||||
|
||||
[nginx-dos]
|
||||
# Based on apache-badbots
|
||||
enabled = true
|
||||
port = http
|
||||
filter = nginx-dos
|
||||
logpath = /var/log/nginx/access*.log
|
||||
findtime = 60
|
||||
bantime = 172800
|
||||
maxretry = 240
|
||||
Reference in New Issue
Block a user