Domain Blocker wont work?

Discussion in 'all things UNIX' started by lucygrl, Mar 5, 2014.

Thread Status:
Not open for further replies.
  1. lucygrl

    lucygrl Registered Member

    Joined:
    Nov 6, 2013
    Posts:
    202
    There is a domain blocker tool in Linux Mint, but it wont work. I add domains but its not blocking anything. Any suggestions?
     
  2. ellison64

    ellison64 Registered Member

    Joined:
    Oct 5, 2003
    Posts:
    2,587
    The domain blocker does seem to be broke ,and i dont know a fix.Depending on what you are trying to achieve though,you could use hosts file to block sites .Theres a tutorial here which works for me on mint 16
    http://www.youtube.com/watch?v=VUQZGuJ8jLM
    Alternatively depending on what browser you use ,you could use a browser addon such as procon latte for firefox ,or just use dns servers with content filtering such as open dns.
     
  3. 0strodamus

    0strodamus Registered Member

    Joined:
    Aug 23, 2009
    Posts:
    1,058
    Location:
    United Surveillance States
    mintNanny is just adding entries to /etc/hosts. Edit the file by hand.
     
  4. lucygrl

    lucygrl Registered Member

    Joined:
    Nov 6, 2013
    Posts:
    202
    Thankyou, I got it to work, seems you need to reboot the computer before it takes effect.
     
  5. tlu

    tlu Guest

    No, a reboot is not necessary. New entries in /etc/hosts are immediately applied. That entry might still be, e.g., in your browser cache, though.

    Please be aware that blocking sites in /etc/hosts is rather inflexible. It blocks only exactly what you added therein. And wildcards/placeholders are not allowed!

    Example: If you add

    Code:
    0.0.0.0 xyz.com
    you will notice that, e.g.,

    www.xyz.com
    123.xyz.com
    imasubdomainof.xyz.com

    are not blocked. This is actually the major reason why those well-known hosts files (like that one) are that huge.

    Rather, you can use two alternatives which are more efficient:

    1. Install dnsmasq and add an entry like the following one to /etc/dnsmasq.conf:

    Code:
    address=/xyz.com/0.0.0.0
    This also blocks all related subdomains.

    2. A little known alternative is dnsspoof which is contained in the dsniff package. It's rather flexible as it supports wildcards like:

    Code:
    127.0.0.1  *.xyz.com
    127.0.0.1  ad.*
    127.0.0.1  ads*.*
    127.0.0.1  adbot*.*
    127.0.0.1  adcount*.*
    127.0.0.1  adfinity*.*
    127.0.0.1  adforce*.*
    127.0.0.1  adimage*.*
    127.0.0.1  *analyticsengine*
    127.0.0.1  analytics.*
    127.0.0.1  tracker.*
    Note that 0.0.0.0 is not supported (contrary to /etc/hosts).
     
  6. lucygrl

    lucygrl Registered Member

    Joined:
    Nov 6, 2013
    Posts:
    202
    Great, thankyou for all that information. That is exactly what I was looking for,

    thankyou.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.