# Hosts file equivalent on Linux?



## techkid

Hi all,

This is not a problem as such, more just a bit of curiosity...

I was wondering if Linux has an equivalent of the Windows Hosts file, to allow me to redirect "undesirable" websites (you know the ones I mean...  ) to 127.0.0.1. I am running Ubuntu 8.04, if that is relevant.

Thank you in advanced.


----------



## 060456F

Yes you can find a text file called /etc/hosts
:up:


----------



## techkid

Cool. I'll check that up tomorrow. Thanks.


----------



## lotuseclat79

Hi techkid,

Just a footnote: The /etc/hosts file saw its birth in Unix, so its invention was not from the Windows world where undoubtedly it was sorely needed for the purpose you mention.

-- Tom


----------



## techkid

I can't say that I'm surprised at that. But it is an interesting snippet of information.

Thanks for all the help and info.


----------



## jtrag

Winblows... And no, I didn't mispell it by accident LOL


----------



## AKAJohnDoe

FWIW, using a hosts file for security is antiquated and can actually create security exposures. Use a firewall instead.


----------



## techkid

Yeah, I know. And I already have a firewall up and running (Built-in Firestarter firewall). This is for when my dad's mate comes around. I allow him to use my computer, but I want to block access to sites I know are bad.


----------



## Pookie

Your firewall should be able to do that too and is a better permanent solution.


----------



## absolutezero1287

Iptables anyone?


----------



## lotuseclat79

Hi absolutezero1287,

The best reference on iptables is Linux Firewalls and there you will also find the best price if you want to purchase it.

-- Tom


----------

