Quantcast

blocking sites with etc/hosts file

$tinkle

Expert on blowing
Feb 12, 2003
14,591
6
while doing a netstat -b, i noticed there are some general tracking sites which establish - and hold - a port connection for the duration of my browser's life.

how can i prevent these nosey parkers from connectivity? is it something like:
Code:
127.0.0.1       *.bothersome.com
127.0.0.1       annoying.site.com
127.0.0.1       adtracker.oct2.oct3.net
i know this isn't exactly it, as i tried it & did a refresh, and the domain came through. or is the hosts file read just upon browser invocation, and i must reset?

edit to ask: i can't get wildcards to behave; are wildcards allowed? (specific ip's do work, however). do i need to mask it specifically, like 255.255.255.0?
 

syadasti

i heart mac
Apr 15, 2002
12,690
290
VT
That will work, it will route all applications those those websites to your local PC instead of their sites but if you don't have the hostname variation right it won't apply. HOSTS file does not support wildcards (dah *)

ie

bob1.site.com
bob2.site.com
joe2.site.com

If you have the right version of IE, you can use wildcards in Internet Explorer's Restricted Zone.
 

$tinkle

Expert on blowing
Feb 12, 2003
14,591
6
great, now i'm all paranoid & doing netstat -b every 10 seconds. my host file has 34 new entries.

found these entries, among others:
Code:
  TCP  cosp-F9F9645266:3253   wwwbaytest2.microsoft.com:http  FIN_WAIT_1 1904 [Newsflsh.exe]
  TCP  cosp-F9F9645266:3219   69.8.201.107:http      ESTABLISHED     3296  [firefox.exe]
  TCP  cosp-F9F9645266:3222   69.8.201.107:http      ESTABLISHED     3296  [firefox.exe]
i'm not too keen on continuous probing by M$ or some archane ip. nor do i want to prevent preferred functionality (third-party billing site requiring advert pass-through)
 

syadasti

i heart mac
Apr 15, 2002
12,690
290
VT
mozilla here.
time to find yet another plugin...
Yeah I guess you have adblock plus already. There are additional plugins if needed.

You could try Spybot S&D - it has a premade host file or I am sure you can find numerous host files that get periodic updates (and I'm guessing someone probably makes a program to automate the process). Doing it via host file keeps all apps from accessing those website. When your hosts file gets real huge you should take note:

in most cases a large HOSTS file (over 135 kb) tends to slow down the machine. This only occurs in W2000/XP/Vista. Windows 98 and ME are not affected.

To resolve this issue (manually) open the "Services Editor"

* Start | Run (type) "services.msc" (no quotes)
* Scroll down to "DNS Client", Right-click and select: Properties
* Click the drop-down arrow for "Startup type"
* Select: Manual, or Disabled (recommended) click Apply/Ok and restart.
 

$tinkle

Expert on blowing
Feb 12, 2003
14,591
6
check out what the sneaky jews at jerusalem post did in one click:
TCP cosp-F9F9645266:1046 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1047 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1050 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1051 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1052 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1054 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1055 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1057 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1058 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1059 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1060 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1061 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1062 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1065 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1067 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1069 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1070 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1073 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1074 secure:http TIME_WAIT 0
TCP cosp-F9F9645266:1075 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1076 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1077 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1078 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1080 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1081 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1082 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1083 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1084 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1091 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1094 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1095 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1096 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1098 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1100 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1101 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1102 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1103 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1104 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1105 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1106 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1107 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:kpop static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1110 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1111 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1112 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1113 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1114 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1115 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1116 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1117 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1118 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1119 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1120 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1121 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1122 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1123 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1124 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1125 static.jpost.com:http TIME_WAIT 0
TCP cosp-F9F9645266:1126 static.jpost.com:http TIME_WAIT 0​