Author Topic: block wildcarded urls in /etc/hosts  (Read 1074 times)

Digit

  • Techno Hippie
  • Posts: 295
  • savant (alegedly), polymath (wannabe)
    • View Profile
    • wastedartist.com
block wildcarded urls in /etc/hosts
« on: November 07, 2013, 01:54:08 AM »
preface:  if you're unfamiliar with blocking url through /etc/hosts then i suggest you do a quick websearch for "someonewhocares" and "hosts" (n that should get you there).

http://code.google.com/p/marlon-tools/source/browse/tools/dnsproxy/dnsproxy.py

nice, huh?   i'm sure there's other ways, but this is the first i found.   i was looking in the output of nettop / jnettop, and kept seeing some curious stuff spamming my connection, for no good reason i could fathom, so i looked up how to augment my /etc/hosts file so i could effectively block a range with a wildcard... like *.somemarketingtwatt.net instead of trying to chase down 3mcoisjeuc.somemarketingtwatt.net and 77ka7kc8ojqwie1.somemarketingtwatt.net and jco8jgycke7r.somemarketingtwatt.net and... etc.

i havnt actually implemented that yet, (cos i'm a timid cautious scardey when it comes to meddling with my connection incase i break it), but i'm sure it's great.  ;)

next stop... learning iptables.  ^_^

p.s. investigate dnsmasq & dnsmasq.conf