Ignore my VMs from a fail2ban

This commit is contained in:
Jake Howard 2021-09-27 14:49:56 +01:00
parent 7e2d01c612
commit 4db474034e
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 10 additions and 4 deletions

3
ansible/group_vars/all/hosts.yml Normal file → Executable file
View file

@ -1,2 +1,5 @@
"hosts": "hosts":
"casey_ip": "108.61.221.88" "casey_ip": "108.61.221.88"
"decker_ip": "95.179.184.22"
"grimes_ip": "104.238.172.209"
"walker_ip": "192.248.168.230"

View file

@ -6,9 +6,9 @@ maxretry = 100
filter = nginx-tcp filter = nginx-tcp
logpath = /var/log/nginx/ips.log logpath = /var/log/nginx/ips.log
port = http,https,8448 port = http,https,8448
ignoreip = {{ wireguard.cidr }},{{ nebula.cidr }},{{ pve_hosts.internal_cidr }} ignoreip = {{ wireguard.cidr }},{{ nebula.cidr }},{{ pve_hosts.internal_cidr }},{{ hosts.values()|sort|join(",") }}
[traefik] [traefik]
enabled = true enabled = true
port = http,https,8448 port = http,https,8448
ignoreip = {{ wireguard.cidr }},{{ nebula.cidr }},{{ pve_hosts.internal_cidr }} ignoreip = {{ wireguard.cidr }},{{ nebula.cidr }},{{ pve_hosts.internal_cidr }},{{ hosts.values()|sort|join(",") }}

View file

@ -6,5 +6,5 @@ maxretry = 5
filter = traefik filter = traefik
logpath = /tmp/traefik-logs/access.log logpath = /tmp/traefik-logs/access.log
port = http,https port = http,https
ignoreip = {{ wireguard.cidr }},{{ nebula.cidr }},{{ pve_hosts.internal_cidr }} ignoreip = {{ wireguard.cidr }},{{ nebula.cidr }},{{ pve_hosts.internal_cidr }},{{ hosts.values()|sort|join(",") }}
action = gateway action = gateway

View file

@ -1,7 +1,10 @@
resource "local_file" "hosts" { resource "local_file" "hosts" {
content = yamlencode({ content = yamlencode({
hosts : { hosts : {
casey_ip : vultr_instance.casey.main_ip casey_ip : vultr_instance.casey.main_ip,
walker_ip : vultr_instance.walker.main_ip,
grimes_ip : vultr_instance.grimes.main_ip,
decker_ip : vultr_instance.decker.main_ip,
} }
}) })
filename = "${path.module}/../ansible/group_vars/all/hosts.yml" filename = "${path.module}/../ansible/group_vars/all/hosts.yml"