Hi, This is an EDU BLOG that discuss, share, try to collect and organize the best information on the web that will help you to "LEARN" and "WORK" and stay-on e-learning.

Edit hosts and block spyware in Linux

This is copy from anil_robo from Ubuntu Forum: all credit goes to him

Hi all! I'm seeing heated discussions on spyware for linux, and I think it's a well-suited time to post a useful tutorial here. By following these simple steps, you will be able to block most advertisement banners on webpages, virus-infected websites, spyware-infected websites, and other insecure websites.

Theory: In Linux, the file /etc/hosts contains information about how the system interprets website domain names. If you want to block a website, just make it point to your local address (e.g. www.site-to-be-blocked.com will point to 127.0.0.1 => The site won't open at all!).

How to: First, you need a good hosts file to install. The one I use is here.
Click on that link right now, and the file will open in a browser or a text editor. Select all the text in the file, and copy it.

Now open a terminal, and type
Code:

sudo gedit /etc/hosts

Your hosts file should open up. This file may already have some entries in it, which we're not going to change. Go to the end of the file, and "paste" the contents of the hosts file you had copied to the clipboard earlier.
Save the hosts file, close it, and reboot your computer.

A lot of people have recommended using adblock extension for Firefox instead of this hosts-file blocking method. Adblock protects you against spyware/adware when you're surfing the internet through Firefox. But what about the other malicious things you can get through other programs? For example, in your email which you view through evolution? Since evolution accesses internet directly, I'd still go for blocking all the parasites through the hosts file.

In addition, I'd like to know how can I change the default error page in Firefox. I'd like to replace the big error message by a little one so that the page structure in firefox after ad-blocking looks acceptable. Thanks

0 comments & suggestions:

Post a Comment

Make your valuable comments & suggestions below: Please keep your comments relevant to the post. Inappropriate comments may be removed. Help us to make this blog useful for all the students those who seek online COMMUNITY help!

Edit hosts and block spyware in Linux from REACH and TEACH each OTHER