LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-29-2005, 09:21 AM   #1
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Rep: Reputation: 15
host file equiv...


In win I was able to edit the host file to block/unblock/reroute sites - is there anything equivelant in Linux?
Many thanx
 
Old 04-29-2005, 09:42 AM   #2
apsivam
Member
 
Registered: Mar 2005
Location: Chennai, India
Distribution: Ubuntu, CentOS
Posts: 72

Rep: Reputation: 15
which host file you mean to say under windows. If its %WINDIR%\System32\drivers\etc\hosts then

its /etc/hosts in linux.
 
Old 04-29-2005, 09:53 AM   #3
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
Many thanx..

To whether it would work I forwarded altavista to google :P
but no joy. Whats wrong with the bottom line:

127.0.0.1 localhost.localdomain localhost
127.0.0.1 Athene
66.218.71.198 216.239.37.99


Cheers
 
Old 04-30-2005, 04:18 AM   #4
apsivam
Member
 
Registered: Mar 2005
Location: Chennai, India
Distribution: Ubuntu, CentOS
Posts: 72

Rep: Reputation: 15
/etc/hosts file cannot be used for this kind of redirection it is there to map hostname to ip address translation it has to be

1.2.3.4 hostname.domainname
 
Old 05-07-2005, 06:25 PM   #5
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
Ah... ok. Many thanx..

So it more or less locally stores the host name and it's respective IP?
So in that case could you set the IP of a hostname to something else and thus redirect it?
E.g.
IPofAltavista www.google.com

That means one could still access the site by entering the IP instead of it's url.

Sorry but I have to stay true to my [descriptive] name...
 
Old 05-14-2005, 12:14 PM   #6
TotalLinuxNoob
Member
 
Registered: Apr 2005
Distribution: Ubuntu
Posts: 109

Original Poster
Rep: Reputation: 15
IF that's not it - is there anyway to block access to a site on a FC3 system? Without a 3rd party utility?

thanx
 
Old 05-14-2005, 05:38 PM   #7
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
Watch out, because most large websites have mulitple IPs -- there was a thread around here about that the other week, actually (blocking multiple IPs). If you want to give them a 404 error, you can just do "127.0.0.1 altavista.com"

Else, you can look into iptables, I believe
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
host file bong.mau Linux - Networking 1 09-01-2005 01:08 PM
host equiv ust Linux - Distributions 1 06-30-2005 11:22 AM
host file wooot Linux - Software 2 04-26-2005 10:27 AM
I need a file host wuya General 5 04-25-2005 12:33 AM
Need your etc/host file Zeth_htp Linux - General 5 03-04-2003 08:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration