Find the answer to your Linux question:
Results 1 to 2 of 2
I have the following line added to /etc/hosts: Code: 192.168.0.253 centos When I navigate to "centos" in a browser, a DNS lookup for "centos" is performed before it resolves the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2008
    Posts
    9

    Linux does DNS lookup before it looks at hosts file.


    I have the following line added to /etc/hosts:
    Code:
    192.168.0.253 centos
    When I navigate to "centos" in a browser, a DNS lookup for "centos" is performed before it resolves the IP in my hosts file. Is this normal behavior?

    Edit: It seems that only Opera does this...wget goes straight to the host file. Strange, will have to investigate Opera further.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    What does your file '/etc/host.conf' have?

    Code:
    etc $ cat host.conf
    order hosts,bind

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •