DROP Facebook networks with MikroTik firewall address-lis

facebook-drop

DROP Facebook networks with MikroTik address-list firewall

https://www.facebook.com/

Инсталираме whois в Линукс защото ще ни трябва за да генерира мрежите на Facebook

sudo apt-get install whois

Създаваме файл който ще бъде скрипта генериращ мрежите

sudo nano facebook_address-list.sh

Копираме

#!/bin/bash
 
for ip in `whois -h whois.radb.net '!gAS32934' | grep / | sort -n | uniq`
do
echo "ip firewall address-list add address=$ip list=DROP-FACEBOOK"
done

Правим файла изпълним

sudo chmod 755 facebook_address-list.sh

Изпълняваме скрипта

sudo ./facebook_address-list.sh

Получаваме следния актуален резултат готов за MikroTik

ip firewall address-list add address=204.15.20.0/22 list=DROP-FACEBOOK
ip firewall address-list add address=69.63.176.0/20 list=DROP-FACEBOOK
ip firewall address-list add address=66.220.144.0/20 list=DROP-FACEBOOK
ip firewall address-list add address=66.220.144.0/21 list=DROP-FACEBOOK
ip firewall address-list add address=69.63.184.0/21 list=DROP-FACEBOOK
ip firewall address-list add address=69.63.176.0/21 list=DROP-FACEBOOK
ip firewall address-list add address=74.119.76.0/22 list=DROP-FACEBOOK
ip firewall address-list add address=69.171.255.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=173.252.64.0/18 list=DROP-FACEBOOK
ip firewall address-list add address=69.171.224.0/19 list=DROP-FACEBOOK
ip firewall address-list add address=69.171.224.0/20 list=DROP-FACEBOOK
ip firewall address-list add address=103.4.96.0/22 list=DROP-FACEBOOK
ip firewall address-list add address=69.63.176.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=173.252.64.0/19 list=DROP-FACEBOOK
ip firewall address-list add address=173.252.70.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.64.0/18 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.24.0/21 list=DROP-FACEBOOK
ip firewall address-list add address=66.220.152.0/21 list=DROP-FACEBOOK
ip firewall address-list add address=66.220.159.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=69.171.239.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=69.171.240.0/20 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.64.0/19 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.64.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.65.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.67.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.68.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.69.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.70.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.71.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.72.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.73.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.74.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.75.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.76.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.77.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.96.0/19 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.66.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=173.252.96.0/19 list=DROP-FACEBOOK
ip firewall address-list add address=69.63.178.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.78.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.79.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.80.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.82.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.83.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.84.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.85.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.86.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.87.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.88.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.89.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.90.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.91.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.92.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.93.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.94.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.95.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=69.171.253.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=69.63.186.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=31.13.81.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=179.60.192.0/22 list=DROP-FACEBOOK
ip firewall address-list add address=179.60.192.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=179.60.193.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=179.60.194.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=179.60.195.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=185.60.216.0/22 list=DROP-FACEBOOK
ip firewall address-list add address=45.64.40.0/22 list=DROP-FACEBOOK
ip firewall address-list add address=185.60.216.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=185.60.217.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=185.60.218.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=185.60.219.0/24 list=DROP-FACEBOOK
ip firewall address-list add address=129.134.0.0/16 list=DROP-FACEBOOK
ip firewall address-list add address=157.240.0.0/16 list=DROP-FACEBOOK
ip firewall address-list add address=204.15.20.0/22 list=DROP-FACEBOOK
ip firewall address-list add address=69.63.176.0/20 list=DROP-FACEBOOK
ip firewall address-list add address=69.63.176.0/21 list=DROP-FACEBOOK
ip firewall address-list add address=69.63.184.0/21 list=DROP-FACEBOOK
ip firewall address-list add address=66.220.144.0/20 list=DROP-FACEBOOK
ip firewall address-list add address=69.63.176.0/20 list=DROP-FACEBOOK

Създаваме две правила, едно за адреси за който забраната няма да важи и друго за всички останали които няма да имат достъп до Facebook

/ip firewall filter
add action=accept chain=forward dst-address-list=DROP-FACEBOOK src-address-list=ACCEPT-FACEBOOK
add action=drop chain=forward dst-address-list=DROP-FACEBOOK

Адреси за които забраната няма да важи

/ip firewall address-list
add address=192.168.88.86 list=ACCEPT-FACEBOOK
add address=192.168.88.106 list=ACCEPT-FACEBOOK

DROP Facebook networks with MikroTik address-list firewall

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This Post Has One Comment

  1. Еркан Юмер

    Изключително полезен и работещ !!! начин за блокиране на фейсбук чрез Микротик. Благодаря на екипа БРАВО