-
-
Save djaiss/85a0ada83e6bca68e41e to your computer and use it in GitHub Desktop.
# Block Facebook IPv4 | |
127.0.0.1 www.facebook.com | |
127.0.0.1 facebook.com | |
127.0.0.1 login.facebook.com | |
127.0.0.1 www.login.facebook.com | |
127.0.0.1 fbcdn.net | |
127.0.0.1 www.fbcdn.net | |
127.0.0.1 fbcdn.com | |
127.0.0.1 www.fbcdn.com | |
127.0.0.1 static.ak.fbcdn.net | |
127.0.0.1 static.ak.connect.facebook.com | |
127.0.0.1 connect.facebook.net | |
127.0.0.1 www.connect.facebook.net | |
0.0.0.0 meta.com | |
0.0.0.0 www.meta.com | |
# Block Twitter | |
127.0.0.1 www.twitter.com | |
127.0.0.1 twitter.com | |
127.0.0.1 apps.facebook.com | |
# Block Facebook IPv6 | |
fe80::1%lo0 facebook.com | |
fe80::1%lo0 login.facebook.com | |
fe80::1%lo0 www.login.facebook.com | |
fe80::1%lo0 fbcdn.net | |
fe80::1%lo0 www.fbcdn.net | |
fe80::1%lo0 fbcdn.com | |
fe80::1%lo0 www.fbcdn.com | |
fe80::1%lo0 static.ak.fbcdn.net | |
fe80::1%lo0 static.ak.connect.facebook.com | |
fe80::1%lo0 connect.facebook.net | |
fe80::1%lo0 www.connect.facebook.net | |
fe80::1%lo0 apps.facebook.com |
That is a brilliant attempt at providing a full list. Bravo.
Unfortunately, it didn't work on Twitter. And, just to confirm no rookie mistake, I was running Notepad as administratorLoL
no rookie mistake, I was running Notepad as administrator
I didn't know that using Notepad was getting you off the rookie list
sudo nano /etc/hosts
Should it be updated with following lines?
0.0.0.0 meta.com
0.0.0.0 www.meta.com
Still can't block
I finally blocked Twitter with a Chrome app, but for some odd reason the blank page I get still has that stupid bird.
I was also having trouble with Twitter. How I fixed:
- Go to Twitter
- Open developer tools, go to the application tab
- Click on "clear site data"
After that, Twitter was not able to load anymore
In addition to that, I also added 0.0.0.0 api.twitter.com
If you are using Pi-Hole for blocking just Facebook, you can plug these into the admin web console as wildcard domains:
facebook.com
facebook.net
fbcdn.com
fbcdn.net
fbsbx.com
fbsbx.net
fburl.com
fb.me
fb.com
m.me
messenger.com
Pi-hole wildcard domains match on regex like: (\.|^)facebook\.com$
If all you want to block is twitter.com then it's as simple as
0.0.0.0 twitter.com
. These lists are to block any additional subdomains that twitter might be using for e.g. widgets, trackers, analytics, etc. on other websites. So if all you want is to not be able to open twitter.com, that single line is sufficient. The "leeches" can't really do anything to stop you from blocking them; you can literally cut your internet cables and be done with it. you could run your own twitter on your local network for your family to enjoy.