ansible-personal/roles/common
Alan Orth c2a92269e4
roles/common: Add ipsets of abusive IPs to firewalld
This uses the ipsets feature of the Linux kernel to create lists of
IPs (though could be MACs, IP:port, etc) that we can block via the
existing firewalld zone we are already using. In my testing it works
on CentOS 7, Ubuntu 16.04, and Ubuntu 18.04.

The list of abusive IPs currently comes from HPC's systemd journal,
where I filtered for hosts that had attempted and failed to log in
over 100 times. The list is formatted with tidy, for example:

    $ tidy -xml -iq -m -w 0 roles/common/files/abusers-ipv4.xml

See: https://firewalld.org/2015/12/ipset-support
2019-10-05 12:28:30 +03:00
..
files roles/common: Add ipsets of abusive IPs to firewalld 2019-10-05 12:28:30 +03:00
handlers roles/common: Reload firewalld instead of restart 2017-11-05 00:27:44 +02:00
tasks roles/common: Add ipsets of abusive IPs to firewalld 2019-10-05 12:28:30 +03:00
templates roles/common: Increase ssh MaxAuthTries from 3 to 4 2019-09-15 15:17:00 +03:00