# firehol user friendly firewall NOTE: update-ipsets and friends seem to have lost support in recent times, see https://github.com/firehol/firehol/issues/405 # firehol-tools Debian package which contains update-ipsets for blocking bad IPs. `update-ipsets enable list` to enable a blocklist `ipset-apply list.ipset list2.netset` to apply the blocklists in kernel; note this is an external script found here: https://github.com/firehol/firehol/blob/master/contrib/ipset-apply.sh Actually do something with the ipsets, something like `sudo iptables -I INPUT -m set --match-set banthis src -p tcp --destination-port 80 -j DROP` See https://www.xmodulo.com/block-unwanted-ip-addresses-linux.html for more systemd service: ```ini [Unit] Description=Updates firehol iplists and applies ipsets After=default.target network.target [Service] Type=oneshot ExecStart=/bin/bash -c "update-ipsets && for i in /etc/firehol/ipsets/*.{ipset,netset}; do sudo ipset-apply $i; done" [Install] WantedBy=default.target ``` # blocklist searcher https://blocklist.sernate.com/ -> Search by IP address or CIDR range if a bad IP is in any blocklist