I have discover a tip to fight again advertisement by host file, thanks to Hajdar we will see how to modify this file to block advertisement and then the way to update automatically.
why to do this since we can use AdBlock or others softwares to block advertisement?
Because it is not enough sufficiency for safe level or download speed; In fact although adblock prevent displaying of advertisement content, it is downloaded and is present in the browser's cash, and it would be the same for trojans and malwares, so Hajdar give an updated host file to block unwanted files 's download before the begin of the connection. since it will look up blacklist content in the localhost: 127.0.0.1 instead of the internet.
For example: if we put a line: 127.0.0.1 http://www.google.com, then any program who try to connect to http://www.google.com will be redirected to the server address with ip 127.0.0.1
The hosts is available in his website: http://www.adzhosts.fr/?cat=4
Before the install, remember to back up the hosts file:
Code: Select all
cd /etc/ cp hosts hosts.backup
go to http://www.adzhosts.fr/ and download the last built of AdZHosts. Then unzip the file un your home folder. And finally move the hosts file into /etc/ folder as root.
With the script available here:
http://kosvocore.free.fr/AdZHosts/adzhosts.sh. it need to be root to be launched.
If you have a problem to connect to a website, you can delete its address from hosts
you can delete the replaced hosts file, and restore the back up of the original.