This website requires JavaScript.
Explore
Help
Sign In
alanorth
/
ansible-personal
Watch
1
Star
0
Fork
0
You've already forked ansible-personal
Code
Issues
4
Pull Requests
Projects
Releases
Wiki
Activity
df26b6c17e
ansible-personal
/
roles
/
common
/
files
/
abuseipdb-ipv6.nft
6 lines
74 B
Plaintext
Raw
Normal View
History
Unescape
Escape
roles/common: Use AbuseIPDB.com list in nftables For now I am still manually updating this, as we can only hit their API five times per day, so it is not possible to have each host get the list themselves every day with our one API key.
2021-07-31 20:46:50 +02:00
#!/usr/sbin/nft -f
define ABUSEIPDB_IPV6 = {
roles/common: Update list of abusive IP addresses This comes from the AbuseIPDB with a confidence level of 95%. I use the following command to download and sort the IPs: $ curl -G https://api.abuseipdb.com/api/v2/blacklist -d \ confidenceMinimum=95 -H "Key: $ABUSEIPDB_API_KEY" \ -H "Accept: text/plain" | sort | sed -e '/:/w /tmp/ipv6.txt' \ -e '/:/d' > /tmp/ipv4.txt I manually add the XML formatting to each file and run them through tidy: $ tidy -xml -utf8 -m -iq -w 0 roles/common/files/abusers-ipv4.xml $ tidy -xml -utf8 -m -iq -w 0 roles/common/files/abusers-ipv6.xml Note: there were no IPv6 addresses in the top 10,000 this time so I used a dummy address for the nftables set so the syntax was valid.
2021-09-28 09:28:02 +02:00
fe80::bca2:37fa:fe58:414e
roles/common: Use AbuseIPDB.com list in nftables For now I am still manually updating this, as we can only hit their API five times per day, so it is not possible to have each host get the list themselves every day with our one API key.
2021-07-31 20:46:50 +02:00
}
Reference in New Issue
Copy Permalink