How to block ads and malware websites using /etc/hosts files in Ubuntu
|
|
Here’s an easy way to block annoying advertisement and malware sites using ‘/etc/hosts’ file.
First edit the /etc/hosts files using your favorite text editor :
sudo gedit /etc/hosts
Then, paste the list of ads/malware servers in the ‘hosts’ file. You can get the list from http://someonewhocares.org/hosts/ or by searching through Google.

Close the file, and Save. The change will take effect immediately after that. One of the side-effect from this modfication is that your web surfing experience would be significantly faster because your browser does not have to wait for the annoying advertisement to load.
Tags: advertisement, adware, browsers, firefox, hosts, internet, linux, malware, tips, ubuntuKeep updated with this website! : Subscribe to your email
WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.














September 20th, 2009 at 6:14 pm
Just a small question, if I use the “sudo nautilus”, can I save the file? Cause last time I use “sudo nautilus” to edit another file, I get to install the whole system again -__-”
September 20th, 2009 at 11:56 pm
wong, you shouldn’t use “sudo nautilus”, you only need to enter the terminal, and type “sudo gedit”.
nautilus is a file manager (explorer-like clone in GNOME), if you run it as root (via “sudo nautilus”) there’s a chance you might delete some important files that might damage your system.
September 21st, 2009 at 3:13 pm
I see… Shit! I always use “sudo nautilus”… I miss the old version where we can directly login as “root” to the desktop :(
Oh, why is that you use 0.0.0.0 as the address and not 127.0.0.1 as stated in the URRL you provided?
September 22nd, 2009 at 3:06 am
wong, because 0.0.0.0 directly denies the ip addresss.. if I use 127.0.0.1, it would take a while for the browser/application to figure out that localhost (127.0.0.1) does not have that service.
furthermore, if you install apache (or other webserver) on your pc, it will use 127.0.0.1 ip address, if that happen then all the ads will display the homepage of your webserver :)
December 13th, 2009 at 8:29 am
thanks for all admin
Are you really cool