Guide | How To Hardening your HOST file

  • Thread starter Deleted member 178
  • Start date
The associated guide may contain user-generated or external content.
D

Deleted member 178

Thread author
Sometimes an antivirus suite is not enough, you may be redirected to infected sites, so you need to harden your HOST file.

There it is the HOST file (to be downloaded) and tutorial to "harden" it.

http://winhelp2002.mvps.org/hosts.htm

if you have already a custom HOST file, copy your lines in a text file before launching the batch. then past them in the updated HOST.

hope it can help you.
 

moonshine

Level 7
Verified
Apr 19, 2011
1,264
I refused from hardening my HOSTS file since it blocks too much and slows me down, Adblock Plus and a Secure DNS would do fine for me.
 

HeffeD

Level 1
Feb 28, 2011
1,690
BoXX28 said:
I refused from hardening my HOSTS file since it blocks too much and slows me down, Adblock Plus and a Secure DNS would do fine for me.

Yes. I'd actually recommend against filling up your HOSTS file...

A large HOSTS file can affect system performance because the HOSTS file is not indexed. The file must be read from the beginning of the file each time it needs to do a lookup. Depending on the system, this can be extremely detrimental to performance. If each new lookup needs to scan several MB's of data, you can see where the problem lies.

HOSTS file sites recommend disabling the DNScache service if you are experiencing performance issues. What they don't tell you is that by doing this, you've just killed your local resolver list. This means that each and every URL you visit now needs a DNS lookup instead of just unique URL lookups! :huh: This will of course slow down your browsing. Depending on the speed of your DNS service, this may not be very noticeable, but it is happening... :rolleyes:
 

bogdan

Level 1
Jan 7, 2011
1,362
HOSTS file sites recommend disabling the DNScache service if you are experiencing performance issues.
This recommendation makes no sense to me. The DNS Client service (DNS Cache) reads the HOSTS file when it starts up and thereafter whenever the DNS Client service notices that it has been modified by looking at the last modification timestamp. So the HOSTS file is actually cached by the DNS Client service. If you disable this service the HOSTS file is not cached and it has to be read and parsed repeatedly by every application that performs a DNS look-up (this is indeed a slow process).
 

jelson

Level 2
Jun 14, 2011
54
bogdan said:
HOSTS file sites recommend disabling the DNScache service if you are experiencing performance issues.
This recommendation makes no sense to me. The DNS Client service (DNS Cache) reads the HOSTS file when it starts up and thereafter whenever the DNS Client service notices that it has been modified by looking at the last modification timestamp. So the HOSTS file is actually cached by the DNS Client service. If you disable this service the HOSTS file is not cached and it has to be read and parsed repeatedly by every application that performs a DNS look-up (this is indeed a slow process).

I don't understand it either. But I believe that FAQ was written several years ago and systems now are considerably faster.

I've been using a MVP HOSTS file for several months and haven't disabled DSN Client. Haven't done any testing to really see what the performance hit acutally is, but I don't really notice anything (XP SP3 on Core2Duo 1.86 GHz with 1.5 GB DDR2).

I also read that disabling DNS caching will also prevent Network Discovery from working.

So far, I'm quite pleased with MVP HOSTS file (no pressing need to install AdBlock since it stops most annoying ads.) I've also looked at using
HpHOSTS file which is even more extensive, but it's HUGE in comparison:
3.8 MB (HpHOSTS) vs 0.62 MB (MVP HOSTS)

While attempting to understand the whole DNS Client issue, I also found some posts on WildersSecurity critiquing the use of HOSTS for protection against malware. (I forget all the reasons given but mainly remember that HOSTS files were orginally designed as a networking aid)

Anyway, I use HostsXpert to manage my HOSTS file but plan on trying HOSTMan and I also use Norton DNS for primary and secondary DNS servers with Google DNS in the tertiary slot in my router config.
 

Dirk41

Level 17
Verified
Top Poster
Mar 17, 2016
797
Thanks Umbra for your guide.

I never tried the suggestion of this thread ( because I did not know about them and I don't know if they are all , hostman for examples, still compatible with W10) but unchecky adds some entries in host file too:
What about to just add then without installing unchecky?
 
D

Deleted member 178

Thread author
Thanks Umbra for your guide.

I never tried the suggestion of this thread ( because I did not know about them and I don't know if they are all , hostman for examples, still compatible with W10) but unchecky adds some entries in host file too:
What about to just add then without installing unchecky?

i don't use Unchecky, but if the format is identical you can copy-paste.
 
  • Like
Reactions: Dirk41

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top