LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-17-2005, 06:01 PM   #1
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 50
Repoint DNS in /etc/hosts


AFAIK a dns lookup is first made in /etc/hosts and thereafter the request is sent to the default dns server. If I would add something like "1.2.3.4 foo.bar.org" in hosts and than type "foo.bar.org" into Firefox, shouldn't Firefox then try to go to 1.2.3.4? Even if foo.bar.org existed elsewhere on the Internet?
 
Old 07-17-2005, 06:26 PM   #2
demian
Member
 
Registered: Apr 2001
Location: Bremen, Germany
Distribution: Debian
Posts: 303

Rep: Reputation: 30
On a debian system you have a file called /etc/host.conf in which you can specify the order of lookups. Default is host,bind. So in that case, yes, whatever is in /etc/hosts overrides a dns lookup. Not sure if this is a debian thing or if it's available on other distros too.
 
Old 07-18-2005, 07:21 AM   #3
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Rep: Reputation: 30
On other distro's you could take a look in /etc/resolv.conf
This determines the order of resolving addresses
 
  


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
Virtual Hosts, DNS resolves, PLEASE HELP!! parasbshah Linux - Software 14 10-17-2005 01:38 PM
moving hosts and DNS branden_burger Linux - Networking 3 05-14-2005 09:55 AM
DNS required for Virtual Hosts? yellowjelly Red Hat 3 01-13-2005 03:43 PM
Problem with reaching hosts via DNS. Calabi-Yau Linux - Networking 1 06-09-2004 08:10 AM
DNS named and /etc/hosts Pollyanna Linux - Networking 0 03-22-2004 02:39 PM

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

All times are GMT -5. The time now is 12:49 PM.

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