News for hackers. Stuff that matters.
Re:Blocklist Facebook domains by tartrate on Wednesday March 21, 2018 @02:21AM (#16635935)
Is it really any use trying to enumerate all variants under *.facebook.com and similar?

The counts:

    307 facebook.com
    295 fbcdn.net
    250 tfbnw.net
     12 whatsapp.com
      9 instagram.com
      3 fb.com
      3 edgesuite.net
      2 metrix.net
      2 fbsbx.com
      2 fbcdn.com
      2 facebook.net
      2 edgekey.net
      2 cdninstagram.com
      2 akamaihd.net
      1 fb.me
      1 appspot.com
Re:Blocklist Facebook domains by SjuulJanssen on Wednesday March 21, 2018 @06:32AM (#16636817)
A bit further down in the replies reustle mentions: `It's a shame /etc/hosts doesn't support wildcards`
Re:Blocklist Facebook domains by TremendousJudge on Wednesday March 21, 2018 @11:05AM (#16638611)
I find that ridiculous. Is there a reason why it's that way?
Re:Blocklist Facebook domains by lnx01 on Wednesday March 21, 2018 @11:46AM (#16639097)
It's been around since the beginning of time itself I guess. You can try something like dnsmasq. One liner in the conf file: address=/.facebook.com/127.0.0.1

edit: For Ubuntu this should work (one versions from Trusty and newer):

sudo touch /etc/NetworkManager/dnsmasq.d/local

Put these lines into the above file and save:

  address=/.facebook.com/127.0.0.1
  address=/.fbcdn.net/127.0.0.1
  address=/.tfbnw.net/127.0.0.1
  address=/.whatsapp.com/127.0.0.1
  address=/.instagram.com/127.0.0.1
  address=/.fb.com/127.0.0.1
  address=/.edgesuite.net/127.0.0.1
  address=/.metrix.net/127.0.0.1
  address=/.fbsbx.com/127.0.0.1
  address=/.fbcdn.com/127.0.0.1
  address=/.facebook.net/127.0.0.1
  address=/.edgekey.net/127.0.0.1
  address=/.cdninstagram.com/127.0.0.1
  address=/.akamaihd.net/127.0.0.1
  address=/.fb.me/127.0.0.1
  address=/.appspot.com/127.0.0.1
And then: sudo systemctl restart network-manager
Re:Blocklist Facebook domains by wodenokoto on Wednesday March 21, 2018 @04:54AM (#16636472)
My thoughts were also, why so many subdomains? I wonder if it is to make the list seem more impressive and Facebook more all-encompassing.

"If you want to block facebook you need to block almost a thousand websites!"

Re:Blocklist Facebook domains by skocznymroczny on Wednesday March 21, 2018 @05:37AM (#16636617)
"Then we will browse in the shade."
Re:Blocklist Facebook domains by Jaruzel on Wednesday March 21, 2018 @03:08AM (#16636129)
Where/How did you get that list?
Re:Blocklist Facebook domains by tartrate on Wednesday March 21, 2018 @03:48AM (#16636256)
grep -Po '\w+\.\w+$' | sort | uniq -c | sort -rhk1

Bit sloppy because it doesn't pick up the domain names with dashes. But my point was that if you want to blacklist *.facebook.com you shouldn't try to enumerate every single variant of it, that's not durable.