Created
October 13, 2022 14:57
-
-
Save LaurenceJJones/d13326271ce79578af1ced82e4c71bb8 to your computer and use it in GitHub Desktop.
Cron script to fetch ip lists then store within /var/lib/crowdsec/data/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dir=/var/lib/crowdsec/data/ | |
declare -a URLS=("https://quic.cloud/ips?ln,quiccloud_ips.txt" "https://monitoring.platform360.io/whitelist?v4,monitoring360_ips.txt" "https://monitoring.platform360.io/whitelist?v6,monitoring360_ip6s.txt" ) | |
for i in ${URLS[@]}; do | |
IFS=, read -r url name <<< $i | |
/usr/bin/wget -q -O "$dir$name" "$url" | |
done | |
/usr/bin/systemctl restart crowdsec.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment