update_ip_blacklist.sh 664 B

1234567891011121314
  1. #!/bin/bash
  2. # Updates the current blacklist.conf with a full bogon list from
  3. # http://www.team-cymru.org/Services/Bogons/fullbogons-ipv4.txt
  4. CURRENT_DIR=$(pwd)
  5. FILENAME_BLACKLIST="$CURRENT_DIR/blacklist.conf"
  6. echo "saving full bogon to: $FILENAME_BLACKLIST"
  7. wget http://www.team-cymru.org/Services/Bogons/fullbogons-ipv4.txt -O $FILENAME_BLACKLIST
  8. # RFC0919: Limited Broadcast
  9. echo "255.255.255.255/32" >> $FILENAME_BLACKLIST
  10. # Add IP range of TUD
  11. echo -e "# TUD network\n130.83.0.0/16" >> $FILENAME_BLACKLIST
  12. # Add Strato network
  13. echo -e "# Strato\n81.169.128.0/17" >> $FILENAME_BLACKLIST
  14. echo -e "# Strato\n81.169.128.0/17\n85.214.0.0/16" >> $FILENAME_BLACKLIST