Announcement

Collapse
No announcement yet.

Hosts File Blocking

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hosts File Blocking

    I have added a few domains to my Hosts File and all is fine. But I was trying to block about.com and cannot seem to do it. They have a ton of subdomains like, cooking.about.com, so blocking each of those would be a chore since my understanding is, wildcards are not allowed in Hosts Files. But I cannot even block the regular about.com site. Does anyone know how they are getting through? I have www.about.com and about.com listed.

    My other question is, there are two other files called hosts.allow and hosts.deny, I am unaware of how these work. Are they part of another program? I understand that you just edit the "hosts" file, and in my small experience it works just fine. Can anyone explain these. The files have text that references a man for hosts_access(5), and if I understand you can use wildcards on domain names. That would be great but I understood that wildcards were impossible, so it makes me think it belongs to another program.
    Kubuntu 18.04.3 LTS -- KDE 5.12.9

    #2
    You can't use wildcards in hosts. Each line in this file must contain a single hostname or a fully-qualified domain name. (Additional aliases are allowed, but typcially aren't used when building a hosts file to block sites.)

    The hosts_access files are used by daemons running on a machine to determine whether to allow or deny incoming connections from other machines. Most commonly, you'll see these used on machines running an SSH server. They serve no purpose for the exercise you're performing here.

    Comment


      #3
      Thanks Steve for the info on hosts_access I was sure it was not a normal part of the process and clearly not something I would need.
      Oddly the about.com regular site (not subdomains) are now blocked in my hosts file. Not sure why it was ignoring it.

      Do you have any suggestions on a tool that would block subdomains without creating a huge hosts file? I'm not looking for a browser addon either. I am trying to block content farms like about.com.
      Kubuntu 18.04.3 LTS -- KDE 5.12.9

      Comment


        #4
        You might try my script to automate building an ad-blocking hosts file. It pulls in four routinely-updated sources. Not all of about.com is blocked, but the ads and trackers are.

        Comment

        Working...
        X