LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   does the /etc/hosts file work same as the M$ hosts file? (https://www.linuxquestions.org/questions/linux-software-2/does-the-etc-hosts-file-work-same-as-the-m%24-hosts-file-165615/)

Lleb_KCir 04-03-2004 01:23 AM

does the /etc/hosts file work same as the M$ hosts file?
 
title basicaly said it all. i want to know if i add a large list of spyware sites to my /etc/hosts file will that stop them from getting into my laptop like it does on M$ OS?

trickykid 04-03-2004 01:30 AM

Usually you can add the site name and add the IP to be your localhost IP, 127.0.0.1.. which should work as I've done it to site before. Why would you be concerned about spyware sites in Linux though? They usually don't have the capabilities to install and or track you, etc when your using Linux..

Lleb_KCir 04-03-2004 01:35 AM

it also holds a rather large list of banner adds that to me are just ugly and detract from viewing the information i want to read.

not worried about spyware on Linux at all, or should i be?

and thank you very much for the answere. i so love learning new things.

this time i was even able to find the right hosts file without help. so getting better and whereis is my friend.

trickykid 04-03-2004 01:37 AM

Quote:

Originally posted by Lleb_KCir
not worried about spyware on Linux at all, or should i be?
I'm not and never have been, never had a problem. I've never run a virus scanner either, even in Windows I didn't and have yet to get a virus in my 9 years of using computers.. hmmm..

Lleb_KCir 04-03-2004 02:26 AM

Quote:

Originally posted by trickykid
I'm not and never have been, never had a problem. I've never run a virus scanner either, even in Windows I didn't and have yet to get a virus in my 9 years of using computers.. hmmm..
well as for M$ not getting a virus, you are just lucky. have lost count how many ive had to clean out thanks to my kids or wife.

ac1980 04-03-2004 11:04 AM

as for banners, mozilla-firefox has the ability to block any image coming from a different domain than what you're browsing.

Rick485 04-03-2004 04:33 PM

A few months ago I added a list of ad server URLs to my /etc/hosts file. I edited the hosts file to take the ad server URLs and redirect them to the 127.0.0.1 loopback address on my computer. I did that in the Red Hat 9 Linux hosts file and also in the Windows 2000 hosts file. Afterwards, only about half as many advertisements appeared on most webpages. That solution worked for both Linux and Windows. The missing advertisements now appear as empty rectangles. The telephone lines in my neighborhood are only good for about 26.4 K so with less advertisements the webpages load much more quickly. It made a big difference and the Internet is now much more useable at 26.4 K.

In the /etc directory there is not only the hosts file but also the hosts.allow file and the hosts.deny file. One linux user claimed that I could have just used the hosts.deny file to block those URLs instead of using the hosts file to divert them to the loopback address of my computer. I have not tried that so I do not know if it could be used instead or not. I found a list of what URLs to block on the Mike Skallas' Ad Blocking Hosts file website. He mainly talks about how to block the adds with Windows but he also describes how to do it with Linux/Unix. Here is his website:

http://www.everythingisnt.com/hosts.html


All times are GMT -5. The time now is 07:26 PM.