Skip to content
Snippets Groups Projects
Commit 72c570aa authored by jurgenhaas's avatar jurgenhaas
Browse files

Moved blacklist handling to HaProxy

parent 3da6aabe
Branches
No related tags found
No related merge requests found
......@@ -33,86 +33,6 @@ apache_cache:
type: 'text/html'
default: 'A900'
apache_global_redirect:
agents:
- 'AhrefsBot'
- 'Ahrefs'
- 'rogerbot'
- 'MJ12bot'
- 'majestic12'
- 'MJ12'
- 'SiteBot'
- 'Semrush'
- 'CCBot'
- '80legs'
- 'Sogou'
- 'DigExt'
- 'spbot'
- 'ia_archiver'
- '.*Rankivabot.*'
- '.*DBLBot.*'
- '.*libw.*'
- '.*Java.*'
- '.*Voil.*'
- '.*Twice.*'
- '.*Sogou.*'
- '.*psbot.*'
- '.*Exabot.*'
- '.*boitho.*'
- '.*ajSitemap.*'
- '.*Rankivabot.*'
- '.*SeznamBot.*'
- '.*DBLBot.*'
- 'Ezooms'
- 'Ezooms/1.0'
- 'exabot'
- 'dotbot'
- 'gigabot'
referer:
- 'buttons-for-website\.com'
- 'semalt\.com'
blocked_ips:
- '173.199.114.0/24'
- '173.199.115.0/24'
- '173.199.116.0/24'
- '173.199.117.0/24'
- '173.199.118.0/24'
- '173.199.119.0/24'
- '173.199.120.0/24'
- '213.186.96.0/19'
- '212.113.32.0/21'
- '173.199.115.112/29'
- '5.10.83.0/25'
- '5.10.83.'
- '210.171.3.'
- '5.9.104.'
- '5.9.0.'
- '213.186.'
- '195.239.'
- '173.199.120.'
- '173.199.114.'
- '173.199.115.'
- '173.199.116.'
- '173.199.117.'
- '173.199.118.'
- '173.199.119.'
- '208.167.230.'
- '209.222.12.'
- '188.92.74.'
- '69.42.83.'
- '213.186.'
- '212.113.37.'
- '182.50.130.'
- '212.113.'
- '54.235.220.243'
- '50.112.126.117'
- '162.243.9.72'
- '54.251.45.250'
- '54.252.97.95'
- '54.249.240.15'
- '54.232.100.158'
- '146.185.176.158'
- '46.137.98.159'
- '212.100.254.105'
- '198.186.194.0/24'
- '198.186.190.0/23'
- '198.186.192.0/23'
ip: []
agent: []
referer: []
......@@ -2,4 +2,3 @@
dependencies:
- { role: common }
- { role: php, php_called_from_apache: true }
......@@ -3,7 +3,7 @@
{% else %}
<RequireAll>
Require all granted
{% for ip in apache_global_redirect.blocked_ips|default([]) %}
{% for ip in apache_global_redirect.ip|default([]) %}
Require not ip {{ ip }}
{% endfor %}
</RequireAll>
......
Options +FollowSymLinks
RewriteEngine on
{% for agent in apache_global_redirect.agents|default([]) %}
{% for agent in apache_global_redirect.agent|default([]) %}
RewriteCond %{HTTP_USER_AGENT} "{{ agent }}" [NC,OR]
{% endfor %}
RewriteCond %{HTTP_USER_AGENT} "dummyagent" [NC]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment