Score:1

"mate-network-properties" won't honor ignored-hosts address

in flag

I want to block a social media address.

When I block it via

  echo "127.0.0.1     facebook.com" | sudo tee -a /etc/hosts > /dev/null

works.

But when I use mate-network-properties gui and add 127.0.0.1 facebook.com into ignored-hosts tab, it ignores the address I added, I mean it doesn't block that address. I also ran mate-network-properties as sudo but nothing's changed.

Score:2
in flag

The mate-network-properties GUI focuses on the Proxy settings:

Network Proxy Preferences

The values that are entered into "Ignored Hosts" will not run through the proxy connection. This is why the three localhost addresses are pre-filled in, as there's no point running any of those through a proxy server.

If you would like to block network traffic to Facebook (or any other service), then the simplest methods would be through the use of a hosts.deny file. Here's how you can set one up:

  1. Open Terminal (if it's not already open)
  2. Create the hosts.deny file:
    sudo vi /etc/hosts.deny
    
  3. Add records in this format:
    ALL : .domain.com
    
    Note: Do not forget that preceding . in front of the domain.
  4. Save the file
  5. There is no fourth step

What's nice about this method is that you can create a single list that gets shared across multiple devices through a regular sync process. No muss. No fuss.

in flag
Thank you for the answer. `gnome-network-admin` tool had an option to edit `etc/hosts` file in the earlier version of Ubuntu
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.