Solved

DNS trouble

Posted on 2004-10-24
235 Views
Last Modified: 2010-03-18
My linux server cannot resolve domain names, though it has no trouble connecting to remote ip addresses. The router between it and the internet seems to providing the server with the addresses of valid DNS servers, and the server successfully stores these addresses in /etc/resolv.conf. I'm fairly sure the router is correctly configured, because another machine (this one a windows machine) I've connected to the router has no trouble resolving domain names. Any suggestions as to which of my servers settings need to be modifed?

Thanks.
0
Question by:bobwood2000
    7 Comments
     
    LVL 38

    Accepted Solution

    by:
    Hi,

        What do you mean the remote IP addresses? Are those internet IP addresses or private addresses such your router?

       First, please try to ping the IP address of www.yahoo.com (66.94.230.38) to see if your Linux server can ping the ineternet.
    If not, please check your default gateway setting by typing "netstat -rn". Make sure you can ping 66.94.230.38 first.

       Second, can your Linux server ping the IP address of DNS server which are in the /etc/resolv.conf? If you can ping the internet
    IP addresses but can not ping DNS server, then either the DNS server down or the IP of DNS server is wrong. Since the Linux server
    use DHCP to get address, you may need to check the DHCP server(on router?) to make sure you can ping the DNS server on the
    DHCP server.

       If those steps cannot fix your problem, then please provide your content of /etc/resolv.conf and the output of "netstat -rn" as well as your
    router's IP address. Those can help to trace the problem.

       One more thing, please check /etc/nsswitch.conf. Make sure there is "dns" in "hosts: files dns" so it will querry the dns.

    Regards,

    Wesly
    0
     

    Author Comment

    by:bobwood2000
    I should have said "external ip addresses" rather than "remote ip addresses". I have no trouble pinging or otherwise connecting to any ip addresses, internal or external. I also have no trouble pinging the dns servers in /etc/resolv.conf. The gateway router (192.168.1.1) appears to be correctly reported by netstat.

    # cat /etc/resolv.conf
    search
    nameserver 199.166.28.10
    nameserver 199.5.157.128
    nameserver 199.166.29.3

    # netstat -rn
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
    0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0

    Also, my /etc/resolv.conf file contains the line "hosts: files dns".
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    Can you comment out "search" in /etc/resolv.conf?

    Wesly
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    Can you comment out "search" in /etc/resolv.conf?

    By the way, I assume that it's the typo when you mentioned "hosts: files dns" in /etc/resolv.conf means "/etc/nsswitch.conf".

    Wesly
    0
     

    Author Comment

    by:bobwood2000
    Okay, I removed "search" from /etc/resolv.conf. No difference made.

    Indeed, I meant /etc/nsswitch.conf with respect to the line hosts: files dns.
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    Ok, the next step is check the firewall setting on your Linux box if you have one.
    iptables or ipchains are the softwares to limit the network access in/out your Linux box.
    Please turn it off by the following commands:
    service iptables stop
    service ipchains stop
    And then turn then off on the boot-up
    chkconfig --level 2345 iptables off
    chkconfig --level 2345 ipchains off

    Wesly
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    One more check,
    Are the namesever in /etc/resolv.conf the same as you got in the Windows (ipconfig /all)?

    Wesly
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

     Java Android Coding Bundle

    Whether you're an Apple user or Android addict, learning to code for the Android platform is an extremely valuable, in-demand skill. It all starts with Java, the language behind the apps and games that make Android the top platform it is today.

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    Want to pick and choose which updates you receive? Feel free to check out this quick video on how to manage your email notifications.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    857 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now