Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
haproxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eric Zillmann
haproxy
Commits
1a3288d2
Commit
1a3288d2
authored
9 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
SV-50578 Implement blacklist for haproxy
parent
f526ab51
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
defaults/main.yml
+1
-0
1 addition, 0 deletions
defaults/main.yml
tasks/configure.yml
+9
-0
9 additions, 0 deletions
tasks/configure.yml
templates/blacklist
+3
-0
3 additions, 0 deletions
templates/blacklist
templates/haproxy_cfg
+4
-0
4 additions, 0 deletions
templates/haproxy_cfg
with
17 additions
and
0 deletions
defaults/main.yml
+
1
−
0
View file @
1a3288d2
default_proxy
:
'
'
proxy_default_backend
:
'
'
proxy_blacklist_ips
:
[]
This diff is collapsed.
Click to expand it.
tasks/configure.yml
+
9
−
0
View file @
1a3288d2
...
...
@@ -67,3 +67,12 @@
hour='*'
minute='*/1'
job='/etc/haproxy/update/update.sh >/dev/null 2>&1'
-
name
:
"
Proxy
|
Update
blacklist"
template
:
src=blacklist
dest=/etc/haproxy/blacklist
owner=root
group=root
mode=644
when
:
scope == 'all'
notify
:
'
Proxy
|
Restart
HAProxy'
This diff is collapsed.
Click to expand it.
templates/blacklist
0 → 100644
+
3
−
0
View file @
1a3288d2
{% for line in hostvars[item]['proxy_blacklist_ips'] %}
{{line}}
{% endfor %}
This diff is collapsed.
Click to expand it.
templates/haproxy_cfg
+
4
−
0
View file @
1a3288d2
...
...
@@ -43,6 +43,8 @@ listen stats 127.0.0.1:7000
frontend http-in
bind *:80
acl blockedip src -i -f /etc/haproxy/blacklist
http-request deny if blockedip
{% for host in groups['all'] %}
{% if hostvars[host]['proxy_redirect'] %}
{% for redirect in hostvars[host]['proxy_redirect'] %}
...
...
@@ -67,6 +69,8 @@ frontend http-in
frontend https-in
bind :443 ssl crt /etc/haproxy/certs/s-verein.de.pem no-sslv3
acl blockedip src -i -f /etc/haproxy/blacklist
http-request deny if blockedip
{% for host in groups['all'] %}
{% if hostvars[host]['proxy_redirect'] %}
{% for redirect in hostvars[host]['proxy_redirect'] %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment