Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
509 B

---
- name: Ensure ipsets exist
shell: |
ipset list crowdsec-blacklists || ipset create crowdsec-blacklists nethash timeout 300
ipset list crowdsec6-blacklists || ipset create crowdsec6-blacklists nethash timeout 300 family inet6
changed_when: False
tags: cs
- name: Add DROP rules
iptables_raw:
name: cs_blacklist
weight: 9
rules: |
-A INPUT -m set --match-set crowdsec-blacklists src -j DROP
-A FORWARD -m set --match-set crowdsec-blacklists src -j DROP
tags: cs