All HOSTS0.EXE, HOSTS127.EXE + HOSTS.ZIP links below redirect to MDGXHOST.EXE, which installs all these files.
Install MDGx HOSTS :
Install MDGXHOST.EXE into C:\Program Files\MDGx HOSTS [default, change to any other drive/partition/directory/folder if you wish] -> run/open 1 of these 3 files:
C:\Program Files\MDGx HOSTS\HOSTS0.EXE = installs HOSTS with all IPs pointing to 0.0.0.0 = automatic EXE installer.
C:\Program Files\MDGx HOSTS\HOSTS127.EXE = installs HOSTS
with all IPs pointing to 127.0.0.1 = automatic EXE installer.
C:\Program Files\MDGx HOSTS\HOSTS.ZIP [must unZIP all files into same directory/folder] = installs
either HOSTS [run HOSTS0.BAT or HOSTS127.BAT] with all IPs pointing to 0.0.0.0 or 127.0.0.1 = manual BATch installers.
CREDITS: MDGXHOST.EXE
created with Inno Setup installer tool for all 32-bit Windows (Win32) editions [freeware].
MDGx HOSTS Files = Automated EXE Installers :
Download + install 1 of these 2
automated/unattended installers executables:
HOSTS0.EXE [700 KB] = all local computer IP entries in this HOSTS file point to 0 (null = 0.0.0.0
abbreviated) [faster].
HOSTS127.EXE [720 KB] = all local computer IP entries in this HOSTS file point to 127.0.0.1 (localhost = loopback) [slower].
IMPORTANT: You may need to be logged on with Administrative/Power User privileges to be allowed to copy/delete/install/move/rename/replace/uninstall files/folders!Both HOSTS0.EXE + HOSTS127.EXE copy the new HOSTS file to:
%windir% = Windows 95/98/ME
%windir%\SYSTEM32\DRIVERS\ETC
= Windows NT4/2000/XP/2003/Vista/2008/7
%windir% = usually C:\WINDOWS [95/98/ME + 2000/XP/2003/Vista/2008/7] or C:\WINNT [NT4/2000]. Your original HOSTS file (if any) will be backed up (renamed) as
HOSTS.ORI . Both HOSTS0.EXE + HOSTS127.EXE also install a new URL shortcut to %windir%\HOSTS.HTM, which displays MDGx HOSTS Files, Guides +
Tools (this web page). How to run this shortcut: Start button -> Programs -> MDGx -> "MDGx HOSTS Files & Guides & Tools".How to remove MDGx HOSTS file + restore your original
HOSTS file from HOSTS.ORI (if any): Start button -> Settings -> Control Panel -> Add/Remove Programs -> select "Remove MDGx HOSTS + Restore Original HOSTS" -> click Add/Remove or
Uninstall button.Both HOSTS0.EXE + HOSTS127.EXE can be opened and their contents can be extracted/viewed using any unZIPping tool that supports the ZIP format [most are free(ware)].CREDITS: Both HOSTS0.EXE + HOSTS127.EXE created with MakeSFX.exe ZIP self extractor command line tool for all 32-bit Windows (Win32) editions [free,
open source].
MDGx HOSTS Files = ZIP Archive :
Download HOSTS.ZIP [1.3 MB, ZIPped] + extract its files. You need an unZIPping tool to extract files from ZIP archives [most are free(ware)]. HOSTS.ZIP contains 2 HOSTS files:
HOSTS0 = all
local computer IP entries in this HOSTS file point to 0 (null = 0.0.0.0 abbreviated) [faster].
HOSTS127 = all local computer IP entries in this HOSTS file point to 127.0.0.1 (localhost =
loopback) [slower].
IMPORTANT: You may need to be logged on with Administrative/Power User privileges to be allowed to copy/delete/install/move/rename/replace/uninstall
files/folders!How to install 1 of the HOSTS files from HOSTS.ZIP:
Use 1 of the included DOS style BATch files:
HOSTS0.BAT = backs up your original HOSTS (if any) to HOSTS.ORI and then copies HOSTS0 (renamed as HOSTS) to:
%windir% = Windows
3.1x/95/98/ME
%windir%\SYSTEM32\DRIVERS\ETC = Windows NT/2000/XP/2003/Vista/2008/7
%windir% = usually C:\WINDOWS [3.1x/95/98/ME + 2000/XP/2003/Vista/2008/7] or C:\WINNT
[NT/2000].
HOSTS127.BAT = backs up your original HOSTS (if any) to HOSTS.ORI and then copies HOSTS127 (renamed as HOSTS) to:
%windir% = Windows
3.1x/95/98/ME
%windir%\SYSTEM32\DRIVERS\ETC = Windows NT/2000/XP/2003/Vista/2008/7
%windir% = usually C:\WINDOWS [3.1x/95/98/ME + 2000/XP/2003/Vista/2008/7] or C:\WINNT [NT/2000].
Or if
you prefer to do this by hand: You MUST rename either HOSTS0 [faster] or HOSTS127 [slower] to HOSTS (no file extension):
Right-click on the one you want in Windows Explorer
(%windir%\EXPLORER.EXE), File Manager [FM = %windir%\WINFILE.EXE (Win3.1x/95/98/ME) or %windir%\SYSTEM32\WINFILE.EXE (WinNT/2000/XP/2003/Vista/2008/7)] or similar tool -> select Rename -> type HOSTS (case insensitive = upper case works same as lower case).
Or run one of these DOS commands from within the
directory/folder where they reside:REN HOSTS0 HOSTSor:REN HOSTS127 HOSTS
After that, copy this new
HOSTS file (overwritting the existing one, if any) to:
%windir% = Windows 3.1x/95/98/ME
%windir%\SYSTEM32\DRIVERS\ETC = Windows NT/2000/XP/2003/Vista/2008/7
%windir% =
usually C:\WINDOWS [3.1x/95/98/ME + 2000/XP/2003/Vista/2008/7] or C:\WINNT [NT/2000]. If using Windows NT4/2000/XP/2003/Vista/2008/7 you may also need to copy this new HOSTS file (overwritting the existing one, if
any) to %windir%\SYSTEM32\DLLCACHE .IMPORTANT: Windows 2000/XP/2003/Vista/2008/7 users may need to disable System Restore [Windows File Protection
(WFP)] or do this BEFORE installing HOSTS. Follow these EXACT steps to install HOSTS on Windows 2000/XP/2003/Vista/2008/7 (Windows XP used here as example):
You MUST disable System Restore: open Control Panel -> System -> System Restore tab -> check the "Turn off System Restore on all drives" box -> click OK -> reboot.
Install HOSTS.
To
reenable System Restore: open Control Panel -> System -> System Restore tab -> UNcheck the "Turn off System Restore on all drives" box -> click OK -> reboot.
It is recommended to
FIRST backup your original HOSTS file (if any).
HOSTS.ZIP also contains HOSTS.HTM, which you can run to display MDGx HOSTS Files, Guides + Tools (this
web page).
Useful HOSTS tools I recommend [100% free(ware)] :
HostTool 0.04 command line DOS console tool for Windows 9x/NT4/2000/ME/XP/2003
queries all DNS servers listed in HOSTS file, detects + lists invalid ones, highly customizable [32 KB].
Connection IP (CIP) Checker 5.00 SR6 for Windows 9x/NT4/2000/ME/XP/2003 queries
all DNS servers listed in HOSTS file and deletes invalid ones [186 KB].
HOSTS (case insensitive in Windows OSes) or hosts
(usually lower case in *nix OSes) is an ASCII (plain text) file used by TCP/IP protocol for BSD/FreeBSD/Linux/Solaris/UNIX, BeOS, MacOS, OS/2, Novell Netware + Windows Operating Systems. Acts as TCP/IP (Transport Control
Protocol/Internet Protocol) host table and contains a list of address-to-name resolution mappings of numeric IP (Internet Protocol) addresses (32-bit identifiers) resolved to valid host names. Operates as a local DNS
(Domain Naming System) server by translating a UNC (Universal Naming Convention) domain name into an IP address, thus decreasing the time necessary to reach a remote server. MS TechNet: How DNS query works. Never map an IP to a host name already in use, for example your ISP (Internet Service Provider) name or your favorite web site(s)
name(s). Never rename this file, it must be HOSTS or hosts without extension.To properly use HOSTS in Windows 32-bit (Win32/x86) + 64-bit (Win64/x64) OSes you must make sure Enable DNS is turned
ON: Control Panel -> Network -> your TCP/IP adapter name (if more than 1 must do this for ALL) -> TCP/IP Properties -> DNS Configuration tab -> check Enable DNS box -> click Apply/OK
button.Microsoft Windows Host Name Resolution over TCP/IP search order:
HOSTS file
DNS server
NetBIOS cache
WINS
server
Broadcast
LMHOSTS file
You can view/edit your HOSTS file using Notepad or better text/ASCII editor/viewer, especially if you are using a large HOSTS file, because
Notepad does NOT support files > 64 KB in Windows 95/98/ME/NT4/2000. :-( Each entry must be kept on its own (separate) line. Entries are almost always case sensitive. Each IP address must be placed 1st separated
by at least 1 space or Tab from corresponding host (machine) name, which must be placed 2nd on the same line. Insert any optional comments on the same line after the host name (or on separate lines) preceded by a # symbol
and followed (optionally) by at least 1 space or Tab (examples):
IP
Host name
Comments
102.54.94.97
rhino.acme.com
source server
38.25.63.10
x.acme.com
client host
This must be the 1st HOSTS line:127.0.0.1
localhostIf more than 1 localhost lines, the 1st one overrides all others.Each host name entry is limited to a maximum of 255 characters.NEVER rename/modify/delete/comment/remark
this HOSTS line:127.0.0.1 localhostThe hosts file must reside in: [%windir% = usually C:\WINDOWS (3.xx/95/98/ME +
2000/XP/2003/Vista/2008/7) or C:\WINNT (NT/2000)]
%windir% = Windows 3.xx/95/98/ME
%windir%\SYSTEM32\DRIVERS\ETC or %windir%\SYSTEM32 = Windows
NT4/2000/XP/2003/Vista/2008/7: The HOSTS file location can be changed by modifying the "DataBasePath" REG_EXPAND_SZ Registry Value to any other valid location, also described @ MSKB Q314053.
WARNING: According to this
Microsoft Windows Vista DNS resolver: deliberately sabotaged hosts file lookup study certain Microsoft owned servers canNOT be blocked by using a
HOSTS file in Windows Vista, 2008 and 7. They seem to be "protected" from being blocked/bypassed ("hard-wired") inside %windir%\SYSTEM32\DNSAPI.DLL [%windir% = usually C:\WINDOWS]. And because the DNS Resolving feature
canNOT be disabled/bypassed (network + internet access are NOT possible without it), the only way I can think of to "un-protect"/bypass these Microsoft servers is to hex-edit DNSAPI.DLL and delete the "offending" entries. Even so,
one must bypass System Restore (SR)/Windows File Protection (WFP) in order to replace the original file with the modded one. This hard-wired list of Microsoft servers is also "built" into the Windows XP SP2 + Windows XP SP3
versions of DNSAPI.DLL (Windows XP SP1 and older are not affected), and is designed to send meta + UDP feedback data to Microsoft (for example): how many and what types of media files are opened by Windows Media Player 10/11
(WMP10/WMP11) and respectively documents opened by Microsoft Office 2007/newer. The list, which contains over 500 Microsoft servers, can be viewed here.Even worse, attempting to install any of my HOSTS files [either trying to copy a HOSTS file by hand or using
any of the BATch files or EXEcutables (automatic installers)] will
NOT succeed, because:
the imposed User Account Control (UAC) limitations, which can be temporarily bypassed by running a program with Administrative rights (right-click on program name -> Run as
administrator), or permanently disabled from Control Panel (not recommended per Microsoft guidelines),
%windir%\SYSTEM32\DRIVERS\ETC = the folder containing the HOSTS file is considered "sensitive"
by Windows security, and thus protected even from the owner of the computer (one must enable specific folder/file security policy access to work around this); workarounds:
change the default "DataBasePath" Registry value for the HOSTS file
location, and there is more...
System Restore (SR)/Windows File Protection (WFP) services are always monitoring file changes, and consequently the original %windir%\SYSTEM32\DRIVERS\ETC\HOSTS canNOT
be replaced without performing all these workarounds, unless one can afford to purchase a license for valid Microsoft ID
certificates just for the purpose of creating a "genuine" Microsoft installer. :-(
FYI: Other important issues you should be aware of if using Windows Vista/2008/7:
In Windows 2000/XP/2003/Vista/2008/7 DNS Client service [already started (Automatic) by default on most computers]
loads the entire contents of the existing HOSTS file (if any) into the DNS cache, which may slow down the computer, especially if using a (very) large HOSTS file, like mine. You have 2
choices here:
One way is to stop and/or disable DNS Client service: Start button -> Run... box -> type services.msc -> click OK or press Enter -> open DNS Client -> General tab
-> set to Manual (if needed) or Disabled (if not needed) -> Stop (if running) -> click OK or press Enter -> reboot. To set DNS Client to Manual (if needed), run these 2 commands from a
DOS console or a batch file:SC CONFIG DNSCache START= demand and: SC STOP
DNSCache or: NET STOP DNSCacheTo set DNS Client to Disabled (if not needed), run these 2 commands from a DOS console or a batch
file:SC CONFIG DNSCache START= disabled and: SC STOP
DNSCache or: NET STOP DNSCacheTo determine if you need to have DNS Client service enabled: Start button -> Run... box ->
type services.msc -> click OK or press Enter -> open DNS Client -> Status column -> should state Started (if needed) or should be empty (if not needed). More info:
CAUTION: Stop/Disable
DNS Client service ONLY if NOT connected to/part of a network/domain or using IPSec (Internet Protocol Security). More info @ MS TechNet. If connected to/part of a network/domain and/or if using IPSec, DNS Client service may be necessary for proper operation.More info:
The other way is to force the DNS cache (if DNS Client service is active) to (re)read the entire list of
servers from your HOSTS file by running this command from a DOS console or a batch file:IPCONFIG /flushdnsMore info @ MSKB Q314850.
NOTE 3 : Local Server
In case you are running ANY network/server on your
local computer, you MUST edit your HOSTS file using Notepad or better text/ASCII editor/viewer and change ALL 127.0.0.1 entries (except the 127.0.0.1 localhost line) to read 0 (or 0.0.0.0). Restart or log back into your network/server when done. Otherwise you might get a huge number
of login popup prompts while trying to access the local server/network, because localhost is always located at the 127.0.0.1 IP address.
NOTE 4 : Disable HOSTS Entry
In case you cannot access an internet site/server, and if your web browser/e-mail client/ftp client/network tool returns a
message/page/screen similar to (depending on the web browser/client/tool used):
this may be due
to a 0 (0.0.0.0 abbreviated) or 127.0.0.1 entry into your HOSTS file associated with the internet site/server you are trying to access. To (re)enable that particular internet site/server:
first
exit/close all instances of all open internet/web/ftp/e-mail/network tools (if any),
then delete/remove or comment/remark the entire line containing the respective server: edit your HOSTS file using Notepad or better text/ASCII editor/viewer and place a # symbol in front of that line
and then restart your web browser/e-mail client/ftp client/network tool and access that same internet site/server once
again.
NOTE 5 : Internet Explorer
In case Internet Explorer web browser does NOT allow you to save a web page, and you get
this error message (or similar):
"Error Saving Web Page This Web page could not be saved"
this may be due to 1 or more
0 (0.0.0.0 abbreviated) or 127.0.0.1 entry/entries into your HOSTS file associated with 1 or more of the internet site(s)/server(s) you are trying to save that web page from. To temporarily access
that/those particular internet site(s)/server(s) and be able to save it/them properly as web page:
Copy & paste that URL name from the Internet Explorer URL address box: highlight the entire URL line ->
right-click on it -> select Copy.
Close/exit that particular Internet Explorer instance.
Rename to any other name or move to any other valid location your HOSTS file.
Restart
Internet Explorer.
Highlight the entire URL address box -> right-click on it -> select Paste -> press Enter.
Now save your web page again.
Close/exit that particular Internet Explorer instance.
Rename
BACK to the original name or move BACK to the original location your HOSTS file.
Restart Internet Explorer.
This is because webmasters sometimes include server-side code to access more than 1 web
site/server from within the same web page.You can automate some of the steps above by using these 2 DOS style BATch files [%windir% = usually C:\WINDOWS (Win95/98/ME + Win2000/XP/2003)
or C:\WINNT (WinNT4/2000)]:
BAKHOSTS.BAT = copies (backs up) %windir%\HOSTS [Win95/98/ME] or %windir%\SYSTEM32\DRIVERS\ETC\HOSTS [WinNT4/2000/XP/2003] to %windir%\INF
+ deletes %windir%\HOSTS [Win95/98/ME] or %windir%\SYSTEM32\DRIVERS\ETC\HOSTS [WinNT4/2000/XP/2003]
RESHOSTS.BAT = copies (restores) %windir%\INF\HOSTS back to %windir% [Win95/98/ME] or
%windir%\SYSTEM32\DRIVERS\ETC [WinNT4/2000/XP/2003] + deletes %windir%\INF\HOSTS
FYI: If you don't understand some of these abbreviations/acronyms/terms, please look them up.
Retrieve the IP address of any known host
name by running ping (example):ping microsoft.comwhich returns this screen:Pinging microsoft.com [207.46.130.108]
with 32 bytes of data...Then add this IP followed by its host name to your HOSTS file (example):207.46.130.108 microsoft.com # MicrosoftPING.EXE is
installed by default by all Windows 32-bit (Win32/x86) + 64-bit (Win64/x64) OSes in %windir% [95/98/ME = 9x OSes] or %windir%\SYSTEM32 [NT4/2000/XP/2003/Vista/2008/7 = NTx OSes]. Run:pingby itself to display all available command line parameters.Some internet/network servers use dynamic IP addresses, meaning the numbers change periodically or every time you try to access them.
Therefore you may need to ping the same server more than once at different times, and then add ALL IP numbers found for that server, followed by its host/web site name (see example above) on separate lines into your HOSTS
file.
HOSTS as ad, malware + popup blocker :
The HOSTS file is only a primitive anti-adware, anti-spyware, anti-malware + anti-popup blocking tool. But it can be used to successfully block
adware, spyware, malware, viruses, trojans, worms, zombies + popups in all your web browsers by preventing an entire list of internet domains/servers/web sites from accessing your local computer(s). Be aware that the HOSTS
file can be easily deleted, modified, renamed, moved etc by malware/spyware to include malware/spying/rogue/phishing/virus/trojan/zombie servers or/and to remove/disable malware servers in the background, without user's
knowledge.STRONGLY RECOMMENDED: Install + run a dedicated firewall, anti-spyware + anti-virus tools in order to monitor for, detect and remove any potential malware/spyware.Block (deny access to and from) any host (force that server to default to localhost IP) by preceding its
name with 0.0.0.0 (null = can be abbreviated to 0) or 127.0.0.1 (localhost = loopback). This example:0.0.0.0 microsoft.comor abbreviated to
(faster):0 microsoft.comor (slower):127.0.0.1 microsoft.comdenies access to and from microsoft.com domain
name. See MDGx HOSTS files for a list of blocked servers. Rename all your HOSTS file 0.0.0.0 (or abbreviated to 0) instances to 127.0.0.1 (or the other way around)
if too slow or if not working.NEVER rename/modify/delete/comment/remark this HOSTS line:127.0.0.1 localhostSurf the internet safely...