Results 1 to 4 of 4

Thread: How Does One Block Facebook on a System?

  1. #1
    Join Date
    Feb 2010
    Location
    South of the Maple Trees
    Beans
    9,276
    Distro
    Xubuntu 18.04 Bionic Beaver

    How Does One Block Facebook on a System?

    Hi all,

    I thought this was going to be an easy case of adding things to the host file. Apparently, the host file is just there for the giggles or I missed something. I am working to get it out of my life and off of my system.

    What have I done? I added the entries listed below, then powered off the system(it needed a restart anyway), and flushed DNS.

    IPv6 is not in use.

    Here's the output of cat /etc/hosts
    Code:
    127.0.0.1	localhost
    127.0.1.1	PCname
    127.0.0.1	facebook.com login.facebook.com secure.facebook.com latest.facebook.com inyour.facebook.com beta.facebook.com static.facebook.com touch.facebook.com developers.facebook.com newsroom.fb.com pixel.facebook.com apps.facebook.com graph.facebook.com m.facebook.com upload.facebook.com
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    Things like DNS servers, Proxies, router configs are out of the question.
    Last edited by uRock; August 19th, 2020 at 03:07 AM. Reason: cleaned up PC name line as fake

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,382
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How Does One Block Facebook on a System?

    Firefox recently started using DoS by default, unless you tell it not to do so. I don't know if this is the issue, but it could be.

    BTW, seems you are missing www.facebook.com. I don't know what the limit is for 1-line, but I've never seen one that long. Usually, people use 1-line per entry to make management easier.
    https://lifehacker.com/how-to-block-...speed-30814279

    Also, there are some characters in your host file above which aren't legal. remove those.

    Setting up a pi-hole isn't THAT hard. I run it in and lxd container. Took about 20 minutes. I posted instruction links here.

  3. #3
    Join Date
    Feb 2010
    Location
    South of the Maple Trees
    Beans
    9,276
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: How Does One Block Facebook on a System?

    Thanks TheFu. If you're referring to the illegal character, I am guessing it was in the apostrophe in the computer name. That line is fake as I never share the computer name. I just edited the OP.

    I've cleaned up the file and added the line you recommended.

    It was previously working in all three browsers, but now it is only working in Firefox, which is due to the enabling of their "security feature" that trusts Facebook. I went through most of everything here and cleaned Firefox with Bleachbit, yet still it sees Facebook. I hardly ever use Firefox. Chromium is now acting the way I want it.

    Here's the working hosts file.

    Code:
    127.0.0.1	localhost
    127.0.1.1	PcNameGoesHere
    
    # No More Facebook
    127.0.0.1       facebook.com
    127.0.0.1       login.facebook.com
    127.0.0.1       secure.facebook.com
    127.0.0.1       latest.facebook.com
    127.0.0.1       inyour.facebook.com
    127.0.0.1       beta.facebook.com
    127.0.0.1       static.facebook.com
    127.0.0.1       touch.facebook.com
    127.0.0.1       developers.facebook.com
    127.0.0.1       newsroom.fb.com
    127.0.0.1       pixel.facebook.com
    127.0.0.1       apps.facebook.com
    127.0.0.1       graph.facebook.com
    127.0.0.1       m.facebook.com
    127.0.0.1       upload.facebook.com
    127.0.0.1       www.facebook.com
    
    #This one listed as possibly hosting malware
    127.0.0.1	cnbc7.com
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters

  4. #4
    Join Date
    Feb 2010
    Location
    South of the Maple Trees
    Beans
    9,276
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: How Does One Block Facebook on a System?

    This was the site I copied the single line of text from, https://linuxconfig.org/how-to-block...-linux-desktop

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •