Host Flash™ stops a computer from accessing content served by web hosts known to contain undesirable content. These hosts might be reported malicious websites, known ad servers, adult websites or torrent sites, for example.
Host Flash™ is interactive.
The interactive set-up program is launched when Host Flash™ is first used or until a configuration profile is created and saved. When Host Flash™ detects a configuration profile, Host Flash™ will prompt to use the detected profile or to use manual settings.
These instructions are out of date and will be updated soon. Read the 3.x.x readme file to learn how to use Host Flash.
Quick Setup Guide
Download Host Flash™ from GitHub, run the program, follow the on screen prompts to quickly configure the program and install your new hosts file block list then save your settings for use as the default Quick Run options for the next time you run Host Flash™.
- Download Host Flash™ from GitHub
- Unzip host-flash-master.zip
- Enter the directory ‘host-flash-master’
- Run host-flash.sh
To Run Host Flash™, either
- click host-flash.sh, or
- click host-flash.desktop, or
- type bash host-flash.sh or ./host-flash.sh at the command line.
Programmatically, that is
wget https://github.com/VR51/host-flash/archive/master.zip ; unzip host-flash-master.zip ; cd host-flash-master ; bash host-flash.sh
The file host-flash.sh may need to be made executable if host-flash.sh fails to launch when clicked.
The computer may need to be restarted and the browser cache(s) may need to be cleaned for the new hosts file rules to be observed by the OS.
Run Host Flash™ regularly to keep your hosts file bad hosts blacklist up-to-date with new.
Run Host Flash™ if you need to undo changes made to the hosts file by Host Flash™.
Use Host Flash™ and the files whitelist.txt, whitelist-wild.txt and blocklist.txt to manage your computer’s hosts file. These files are stored in the Host Flash™ program directory.
Rerun Host Flash™ to activate changes to whitelist.txt, whitelist-wild.txt and blocklist.txt.
Make sure manual edits to the hosts file are above the content added by Host Flash™ otherwise Host Flash™ will delete them.
Press Esc or Ctrl+C to stop Host Flash™ at any stage.
Host Flash™ needs either ‘dialog’ or ‘whiptail’ as well as ‘wget’, ‘sed’, ‘zip’, ‘unzip’ and ‘p7zip’ to be installed in the OS environment. Host Flash™ will display an alert if any of these programs is not installed. In Ubuntu, they can be installed with
sudo apt-get install dialog whiptail wget sed sed zip unzip p7zip
Host Flash™ is known to work on Debian Linux systems. It may or may not work on other Linux or Unix based systems.
Where to Place the Host Flash™ Program Files
Host Flash™ can be stored in any directory. Recommended locations for the program files are
- Documents/Host Flash, or
- Desktop/Host Flash, or
- ~/Host Flash
What to Expect
Host Flash™ performs the following tasks
- downloads up to 23 bad hosts blocklists from reputable sources
- merges those lists into one large compilation of bad hosts
- adds bad hosts from your custom blocklist.txt into the mix
- removes duplicate bad host entries from the compiled bad hosts list
- removes whitelisted hosts stated in whitelist.txt and whitelist-wild.txt from the blocklist
- installs the compiled blocklist into /etc/hosts
In addition to the above, Host Flash™
- copies the hosts file that exists when Host Flash™ is first run to /etc/hosts.hf.original
- copies and compresses replaced hosts files into the archive directory ‘Hosts Flash/backup/’
- retains the original hosts file entries within the hosts file created by Host Flash™
- provides the option to remove bad hosts added to the hosts file by Host Flash™
Your computer will no longer be able to send requests for data to any of the domains blocked by Host Flash™.
When you try to access a page of a blocked host domain you will be greeted by a ‘Document Not Found’ error message. This message will be served by your computer. This is normal, is what is supposed to happen and proves the hosts file blocklist is being observed.
Some web pages will display their main content but the places where ads would normally display will now be replaced by Document Not Found messages. This is normal and happens because the web page loads content from multiple host domains.
Some web pages you visit will display their main content but the places where social media messages normally display will now be replaced by Document Not Found messages.
Many web pages will load faster because your web browser will no longer need to wait for ad content to load or other undesired content to load. This makes web pages lighter so will save bandwidth too.
Websites that detect adblock software do not normally detect when ad servers are blocked through a hosts file. This means you will not be denied access to websites that detect adblockers.
Quick Note About the IP Address Options
Host Flash™ lets you choose from 4 IP address mapping options. The IP address you choose is the address your computer will call when host names in the list of bad hosts are requested. Here is more information about these options.
This is the normal loopback address of a computer. This is the address normally used to send a request to a bad host (blocked host / website) back to your own computer so that the bad host is never contacted. Select this IP address unless you know better for your own purposes.
This IP address is mapped to hosts in bad host lists provided by some sources. I think, not sure, this is occasionally used to resolve a bug in some versions of Windows. Linux is not affected by this bug (obviously – ** insert smug smile here **). This IP address is included …just in case…
This IP address is included for my own convenience. I redirect all blocked hosts to a home server virtual host that listens to all ports on loopback address 127.255.255.254. This allows me to tell my home server to serve a minimally styled 404 message in place of ugly browser Document Not Found error messages. Has a visible affect on mod_pagespeed’s cache too… (mod_pagespeed caches the request).
If you wish, you can use a custom IP address to redirect bad hosts to websites of your choosing such as Google or any other host with its own dedicated IP address.
The web hosts blocked by the downloaded blocklists may deny you access to a small number of websites that you enjoy visiting.
The presence of a website in one of the downloaded lists does not necessarily imply the site is malicious. If you trust that a blocked website is safe to view you can ‘whitelist’ it to prevent Host Flash™ blocking access to it.
To whitelist a website, add the website’s root address to the whitelist.txt file stored in the same directory as host-flash.sh.
- DO put each whitelisted domain onto a line of its own within whitelist.txt.
- Do add both www and non-www versions of the domain to whitelist.txt to ensure both versions are whitelisted.
- DO end the root domain with dot (.) if all gTLD or ccTLD versions of the domain are to be whitelisted
- DO NOT include the HTTP or HTTPS part of the domain address i.e the protocol is not required.
- DO NOT include anything after the TLD part of the domain.
whitelist-wild.txt is used to remove root hosts and their subdomains from the blocklist. The subdomains are discovered automatically based on the root domain.
Apply the same instructions as explained above for the whitelist.txt.
You may want to block access to more hosts than are included in the lists of bad hosts downloaded by Host Flash™. To block extra websites (hosts), add their root addresses to the blocklist.txt file stored in the same directory as host-flash.sh.
- DO put each domain to block onto a line of its own within blocklist.txt.
- Do add both www and non-www versions of the domain to blocklist.txt to ensure both versions are blocked.
- DO NOT include the HTTP or HTTPS part of the domain address.
- DO NOT include anything after the TLD part of the domain.
If you see a Document Not Found page when you try to visit a trusted website, add the website’s domain (host name) to whitelist.txt or whitelist-wild.txt (to automatically unblock subdomains too) and rerun host-flash.sh.
If you want to block access to additional websites such as social media sites, search engines, adult sites or torrent sites etc.., add their domain host names to blocklist.txt
Host Flash™ will run in many Debian (and probably non Debian) environments like Ubuntu, Kubuntu and Debian. It might work on rooted Android devices, though full BusyBox needs to be installed into Android with a few additional shell scripts (it is easier to compile the hosts file on a full Linux machine then transfer it to Android).
Saved Quick Run settings will work independently of the host they were configured on. If you want to reuse the settings, just move the Host Flash™ directory to any other system and any saved settings will be migrated too.