Entry in /etc/hosts not used

From: Roger Merritt (mcrogerm_at_stjohn.ac.th)
Date: 06/12/03

  • Next message: Alex de Kruijff: "Re: Lynx"
    Date: Thu, 12 Jun 2003 15:40:50 +0700
    To: freebsd-questions@FreeBSD.ORG
    
    

    I've been trying to install a Content Management System for evaluation
    purposes. The system needs to have some virtual domains set up and the docs
    recommend putting the dummy addresses in the /etc/hosts file. That's fine
    by me, because I use /etc/hosts for all the DNS queries for machines on my
    LAN, but I had not realized a single IP address could resolve to more than
    one name. The entries in /etc/hosts are:

    10.3.16.125 editor.imp.ac.th editor
    10.3.16.125 www.imp.ac.th www
    10.3.16.125 admin.imp.ac.th admin
    10.3.16.125 su.imp.ac.th su

    My resolv.conf file is:

    domain imp.ac.th
    nameserver 202.21.144.1

    My host.conf file is:

    # $FreeBSD: src/etc/host.conf,v 1.6 1999/08/27 23:23:41 peter Exp $
    # First try the /etc/hosts file
    hosts
    # Now try the nameserver next.
    bind
    # If you have YP/NIS configured, uncomment the next line
    # nis

    At this point, I'm baffled. Apache is running on the machine that acts as
    the server for the office lan as well as the gateway to the internet. I
    have two NIC's, ed0 set as 203.151.134.xxx, and ed1 set as 10.3.16.125.

    If I set all four names to the IP address 203.151.134.xxx, I'm able to ping
    three of them from machines on my LAN, but not editor.imp.ac.th. When I set
    the four names to the IP address 10.3.16.125, I'm not able to ping any of
    them from the LAN. When I changed the entries in /etc/hosts back to
    10.3.16.125, I'm still able to ping admin, www, and su, but ping shows
    their addresses as still being 203.151.134.xxx!

    When I point my browser (Mozilla, 1.3.1) at www, admin, or su.imp.ac.th, it
    displays the root document from the Content Management System I'm trying to
    configure, but it gives me an error message, "editor.imp.ac.th could not be
    found, please check and try again".

    I'm baffled and haven't been able to find anything from Google searches. I
    don't understand why the name editor.imp.ac.th is being treated differently
    from the other three, and I don't understand why I can ping the interface
    *not* in my LAN but not the interface that directly connects with the
    machines in my LAN.

    Can anyone suggest what to try next? Oh -- it's essential I be able to
    connect my browser to editor.imp.ac.th, because that's the only way to log
    in to the CMS.

    -- 
    Roger
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Alex de Kruijff: "Re: Lynx"

    Relevant Pages

    • Re: Router problems on Redhat 9.0 Linux 2.4.20-13.9.HOSTAP
      ... >> to LAN ... >> Your wlan range is inside that so no routing is performed. ... > 10.1.10.1, while the machines on LAN including the linux box/router, ... it looks like the you can ping from a machine on ...
      (RedHat)
    • Re: Entry in /etc/hosts not used
      ... > as the server for the office lan as well as the gateway to the internet. ... > ping three of them from machines on my LAN, ... > it displays the root document from the Content Management System I'm ...
      (freebsd-questions)
    • Re: Cant Navigate My LAN Or Ping
      ... Can't Navigate My LAN Or Ping ... Are both machines on the same subnet? ...
      (Ubuntu)
    • Re: Cannot ping machine
      ... you tried to ping the PC itself. ... LAN and yes a router is being used. ... Responses from other machines on the ...
      (microsoft.public.windowsxp.general)
    • Re: Lost Dialup, Lost LAN
      ... Jeffrey Randow (Windows Networking & Smart Display MVP) ... Couldn't remove it from the LAN, ... >> If you ping a known IP address on the LAN then there should be no reason ... All the machines in the office use not only ...
      (microsoft.public.windowsxp.network_web)