Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I'm making a new lightweight linux disribution for educational purposes. I can connect to the internet via ethernet but I can only get to places via IP address. Trying ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Location
    England
    Posts
    28

    Linux won't resolve domain names


    Hi,

    I'm making a new lightweight linux disribution for educational purposes. I can connect to the internet via ethernet but I can only get to places via IP address. Trying to browse to "google.com" will fail but browsing to googles IP will work.

    So here is the contents and outputs of all relevant things:
    resolv.conf:
    Code:
    # Generated by dhcpcd from eth0
    # /etc/resolv.conf.head can replace this line
    nameserver 192.168.1.1
    # /etc/resolv.conf.head can replace this line
    nsswitch.conf:
    Code:
    passwd: files
    groups: files
    
    hosts: dns files
    networks: files
    host google.com:
    Code:
    google.com        A        173.194.36.104
    ping google.com:
    Code:
    ping: google.com: Resolver Error 0 (no error)
    wget google.com:
    Code:
    --2010-10-02 20:53:44-- http://google.com/
    Resolving google.com... failed: No address associated with hostname.
    wget: unable to resolve host address 'google.com'
    Any help would be greatly appreciated.

    Regards,

    James

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    nameserver 192.168.1.1
    It looks like you have a router and it is giving its address
    as a name server to dhcp clients. For some reason, it isn't
    working right. Open a web browser on your computer
    and enter the address 192.168.1.1
    This will allow you to configure the router. You may be able to
    make it pass on name server addresses supplied by your ISP,
    or other addresses, if you know an address of a good name server.
    The ISP ones are the usual choice.

  3. #3
    Just Joined!
    Join Date
    Aug 2010
    Location
    England
    Posts
    28
    The router is working fine as a dns server. It works in windows and ubuntu. I have tried changing it to opendns's address but this does not fix the problem.

  4. #4
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    How did you build this OS? Maybe there is a missing component.

    It is odd that the host command resolves google correctly
    but other programs fail. Try checking addresses with nslookup
    and dig.

Posting Permissions

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