Earlier quoted context omitted.
I'm surprised that AS-based blocking tools aren't already more prevalent and readily available. AS information isn't trivially available, though you can do a pretty good job through tools like the CIDR Report and ASN Routeviews. There are quite substantial portions of the Internet to which I'd generally provide very little or very limited access if I had my druthers.
ARIN, et al, provide WHOIS servers that will map IP address information to ASNs. The list of all registered ASNs is also public. Also, there are routing registries which can provide even more information on which ASNs announce which prefixes. Most of what you'd want is out there, but you might have to obtain it all and doing a bit of work to combine/correlate i all.
Blocklist of all Facebook domains
131–140 of 152 posts
Re: Blocklist of all Facebook domains
#132This does just the same: .facebook.com .facebook.com .fbcdn.com .fbcdn.net .facebook.com.edgekey.net .facebook.com.edgesuite.net .instagram.com .instagramstatic-a.akamaihd.net .instagramstatic-a.akamaihd.net.edgesuite.net .cdninstagram.com .tfbnw.net .whatsapp.com .fbsbx.com facebook-web-clients.appspot.com .fb.me fbcdn-profile-a.akamaihd.net h-ct-m-fbx.fbsbx.com.online-metrix.net ac-h-ct-m-fbx.fbsbx.com.online-metri…
You can't do wildcards in a hosts file.
Re: Blocklist of all Facebook domains
#133Not the way I'd do it, since you can easily miss on some new domain that belongs to facebook (or perhaps some server that does not look like it belongs to facebook in the first place, but it is sitting in their assigned subnets). If you really want to block all traffic from/to facebook, lookup the IP prefixes associated with their AS number(AS32934), and setup your firewall to block those. If you are using PF, tables…
Facebook only has one AS?
An AS (identified by an ASN) is an autonomous system. It's comprised of multiple CIDR blocks, contiguous regions of IP addresses. The network definition (by CIDR block) is fairly dynamic, as blocks can be added, deleted, or consolidated.
An autonomous system is a single administrative domain over public IP space. Essentially, autonomous systems are what the Internet is inter-networking between, through BGP (border gateway protocol). BGP and AS are what Cisco (and other router) gear are ultimately all about.
So yes: organisations typically have one AS. Exceptions are typically the result of corporate mergers (not uncommon) or government space (where the domains are large).
(Disclaimer: I'm not a networking bithead, don't muck with routers much, and have a rough knowledge of much of this, though it should be vaguely accurate.)
Re: Blocklist of all Facebook domains
#134I just want to say "Privacy matters, thanks you" (even more when FB decided to leverage their like/share button for a global ad netwotk) :-) non tech saavy guys may love a simple .sh / .bat to automatically add those entries to the /etc/hosts on windows & unix
curl https://raw.githubusercontent.com/jmdugan/blocklists/master/corporations/facebook/all | sudo tee -a /etc/hosts
You are a bad, bad man Mr Rochacon.
Re: Blocklist of all Facebook domains
#135Not the way I'd do it, since you can easily miss on some new domain that belongs to facebook (or perhaps some server that does not look like it belongs to facebook in the first place, but it is sitting in their assigned subnets). If you really want to block all traffic from/to facebook, lookup the IP prefixes associated with their AS number(AS32934), and setup your firewall to block those. If you are using PF, tables…
definitely not ideal, not even complete, and requires work - BUT, nearly any Internet user can implement the solution done this way.
It would be really interesting to autogenerate the domain lists by running background scripts on AS numbers, polling DNS for every IP in the range, and cataloging the domains by script - say, daily, and then printing the list into a 0.0.0.0 prefixed hosts list. Thank you!
disclaimer: github user maintaining linked resource
Re: Blocklist of all Facebook domains
#136I'm wondering ... what's the best approach to automatically collect all domains of a company?
Re: Blocklist of all Facebook domains
#137Not the way I'd do it, since you can easily miss on some new domain that belongs to facebook (or perhaps some server that does not look like it belongs to facebook in the first place, but it is sitting in their assigned subnets). If you really want to block all traffic from/to facebook, lookup the IP prefixes associated with their AS number(AS32934), and setup your firewall to block those. If you are using PF, tables…
Re: Blocklist of all Facebook domains
#138Earlier quoted context omitted.
what's AS number? how can I find out what a AS number for a domain or ip address is?
You can use https://ipinfo.io - either search at https://ipinfo.io/countries/us , or use the API (note the org field): $ curl ipinfo.io/`dig +short facebook.com | head -n1` { "ip": "69.171.230.68", "hostname": "edge-star-mini-shv-17-prn1.facebook.com", "city": "Menlo Park", "region": "California", "country": "US", "loc": "37.4590,-122.1781", "org": "AS32934 Facebook, Inc.", "postal": "94025" } See https://ipinfo.io/d…
Re: Blocklist of all Facebook domains
#139Earlier quoted context omitted.
what's AS number? how can I find out what a AS number for a domain or ip address is?
https://en.wikipedia.org/wiki/Autonomous_system_(Internet)
can I and how obtain this information myself, from the very source, for a given domain name or company or whatever it is?
Re: Blocklist of all Facebook domains
#140Not the way I'd do it, since you can easily miss on some new domain that belongs to facebook (or perhaps some server that does not look like it belongs to facebook in the first place, but it is sitting in their assigned subnets). If you really want to block all traffic from/to facebook, lookup the IP prefixes associated with their AS number(AS32934), and setup your firewall to block those. If you are using PF, tables…
Blocking at the firewall works best for me. If any OS X users want to know how, I've covered it here: https://www.perpetual-beta.org/weblog/blocking-facebook-on-o...