Block Facebook

apt-get install dnsmasq
Verify that the file
 NetworkManager/NetworkManager.conf 
has dnsmasq
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false
Now Edit
/etc/dnsmasq.d/dnsmasq-block.conf 
Here address block entire domains and server blocks individual servers!
address=/facebook.com/127.0.0.1
address=/facebook.com/127.0.0.1
address=/facebook.com/127.0.0.1
address=/facebook.net/127.0.0.1
address=/facebook.fr/127.0.0.1
address=/facebook.de/127.0.0.1
address=/fb.com/127.0.0.1
address=/fb.me/127.0.0.1
address=/fbcdn.net/127.0.0.1
address=/fbcdn.com/127.0.0.1
address=/tfbnw.net/127.0.0.1
server=/01.sharedsource.org/
Edit
 /etc/dhcp/dhclient.conf
change
#prepend domain-name-servers 127.0.0.1;
to
prepend domain-name-servers 127.0.0.1;
Now restart
service network-manager restart
service dnsmasq restart

get new lists from
https://github.com/tbds/FreeContributor/tree/master/data 
https://github.com/jmdugan/blocklists

Blocking tool for OSX - Creative Commons Attribution-ShareAlike 4.0 International License - from the following webpage
https://www.perpetual-beta.org/weblog/blocking-facebook-on-os-x.html
 
whois -h whois.radb.net '!gAS32934' | tr ' ' ', '
Paste the csv to
table  persist { 204.15.20.0/22, 69.63.176.0/20, 66.220.144.0/20, 66.220.144.0/21 }
block quick to 
load the rules into PF:
sudo pfctl -f /private/etc/pf.conf
This location of this file is /private/etc on my Mac. It might be in a different path on your machine. Use:
sudo find / -name "pf.conf" to locate it.