Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop driver drivers dvd email error excel excel 2003 firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem recovery router safe mode screen slow sound spyware tdlwsp.dll trojan upgrade video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Hosts file equivalent on Linux?

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
techkid's Avatar
Computer Specs
Distinguished Member with 2,088 posts.
 
Join Date: Sep 2004
Location: Sydney, Australia
Experience: Fix it until it's broken
04-Mar-2009, 01:32 AM #1
Hosts file equivalent on Linux?
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.
__________________
Like anime? Join the TSG Anime Fan Club
Most computer problems are found between the chair and the keyboard.
SUPERAntiSpyware, AVG Antivirus, ZoneAlarm Firewall, Spybot S&D, MBAM, HijackThis
060456F's Avatar
Computer Specs
Senior Member with 140 posts.
 
Join Date: Jun 2008
Location: Colombo
Experience: Intermediate
04-Mar-2009, 02:47 AM #2
Wink Yes
Yes you can find a text file called /etc/hosts
techkid's Avatar
Computer Specs
Distinguished Member with 2,088 posts.
 
Join Date: Sep 2004
Location: Sydney, Australia
Experience: Fix it until it's broken
04-Mar-2009, 06:04 AM #3
Cool. I'll check that up tomorrow. Thanks.
lotuseclat79's Avatar
Distinguished Member with 14,984 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
04-Mar-2009, 07:43 AM #4
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's Avatar
Computer Specs
Distinguished Member with 2,088 posts.
 
Join Date: Sep 2004
Location: Sydney, Australia
Experience: Fix it until it's broken
06-Mar-2009, 03:54 AM #5
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's Avatar
Junior Member with 11 posts.
 
Join Date: Mar 2009
08-Mar-2009, 12:26 PM #6
Winblows... And no, I didn't mispell it by accident LOL
AKAJohnDoe's Avatar
Senior Member with 1,349 posts.
 
Join Date: Jun 2007
Experience: Once, again if I like it
08-Mar-2009, 02:59 PM #7
FWIW, using a hosts file for security is antiquated and can actually create security exposures. Use a firewall instead.
techkid's Avatar
Computer Specs
Distinguished Member with 2,088 posts.
 
Join Date: Sep 2004
Location: Sydney, Australia
Experience: Fix it until it's broken
10-Mar-2009, 07:51 AM #8
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's Avatar
Senior Member with 161 posts.
 
Join Date: Dec 2004
Experience: Intermediate
10-Mar-2009, 04:34 PM #9
Your firewall should be able to do that too and is a better permanent solution.
absolutezero1287's Avatar
Senior Member with 210 posts.
 
Join Date: May 2007
Experience: Intermediate
10-Mar-2009, 09:00 PM #10
Iptables anyone?
lotuseclat79's Avatar
Distinguished Member with 14,984 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
11-Mar-2009, 09:51 AM #11
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
Closed Thread Bookmark and Share

Tags
hosts file, linux

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 09:58 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.