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
67379fc2e4
ansible-personal
/
roles
/
common
/
files
/
abuseipdb-ipv6.nft
6 lines
70 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 Then I formatted the nftables files manually. Meh...
2022-02-28 16:51:35 +01:00
fd21:3523:74e0:7301::
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