4 ms·
I advocate for iptables instead of DNS filtering. Process of enumerating and rejecting facebook IPs : * Query the RAD http://radb.net/query/ http://radb.net
by dontchooseanick 9y ago
I advocate for iptables instead of DNS filtering.
Process of enumerating and rejecting facebook IPs :
* Query the RAD http://radb.net/query/ http://radb.net/query/ , search for AS32934
* Enumerate ip ranges by http://radb.net/query/?advanced_query=1 http://radb.net/query/?advanced_query=1
* Check inverse query by origin, use AS32934
* Grep the response route and route6 CIDR ranges
* Build a netfilter script with REJECT
Gives those scripts for iptables (updated once in a while) :
* https://cdn.rawgit.com/smigniot/mu/ea0f32867907b855063c56ae8dbd7237d35913f1/fbmute/no_facebook_in_ipv4.sh https://cdn.rawgit.com/smigniot/mu/ea0f32867907b855063c56ae8...
* https://cdn.rawgit.com/smigniot/mu/ea0f32867907b855063c56ae8dbd7237d35913f1/fbmute/no_facebook_in_ipv6.sh https://cdn.rawgit.com/smigniot/mu/ea0f32867907b855063c56ae8...
* https://cdn.rawgit.com/smigniot/mu/ea0f32867907b855063c56ae8dbd7237d35913f1/fbmute/no_facebook_out_ipv4.sh https://cdn.rawgit.com/smigniot/mu/ea0f32867907b855063c56ae8...
* https://cdn.rawgit.com/smigniot/mu/ea0f32867907b855063c56ae8dbd7237d35913f1/fbmute/no_facebook_out_ipv6.sh https://cdn.rawgit.com/smigniot/mu/ea0f32867907b855063c56ae8...
To enable :
* iptables -I OUTPUT -j no_facebook_out
* iptables -I INPUT -j no_facebook_in
* ip6tables -I OUTPUT -j no_facebook_out
* ip6tables -I INPUT -j no_facebook_in
By design, instagram and connect-with-facebook get muted too.
- DavideNL 9y agoTo get a list of all Facebook ip's: whois -h whois.radb.net '!gAS32934' | tr ' ' '\n' | awk '!/[[:alpha:]]/' > facebook.list whois -h whois.radb.net '!6AS32934' | tr ' ' '\n' | grep '::' >> facebook.list