Results 1 to 6 of 6

Thread: Who is my DNS server?

  1. #1
    Join Date
    Mar 2007
    Beans
    790

    Who is my DNS server?

    this annoys me to no end.
    Code:
    ant2ne@ant2ne-desktop ~ $ nslookup google.com
    Server:		127.0.1.1
    Address:	127.0.1.1#53
    
    Non-authoritative answer:
    Name:	google.com
    Address: 173.194.46.98
    Name:	google.com
    Address: 173.194.46.99
    Name:	google.com
    Address: 173.194.46.97
    Name:	google.com
    Address: 173.194.46.100
    Name:	google.com
    Address: 173.194.46.104
    Name:	google.com
    Address: 173.194.46.110
    Name:	google.com
    Address: 173.194.46.101
    Name:	google.com
    Address: 173.194.46.96
    Name:	google.com
    Address: 173.194.46.102
    Name:	google.com
    Address: 173.194.46.105
    Name:	google.com
    Address: 173.194.46.103
    
    ant2ne@ant2ne-desktop ~ $ cat /etc/rc.local
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    
    exit 0
    ant2ne@ant2ne-desktop ~ $
    Loopback address is not a name server, and someone decided to scrap a perfectly good resolv.conf.
    Last edited by ant2ne; April 30th, 2014 at 05:07 PM. Reason: said rc.local instead of resolv.conf. IDK where that came from.
    Registered Linux User: 450747 Registered Ubuntu User: 16269

  2. #2
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,050
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Who is my DNS server?

    There are good reasons for why things are done this way. I just don't know why.

    tgalati4@Mint14-Extensa ~ $ nslookup www.google.com
    Server: 127.0.1.1
    Address: 127.0.1.1#53

    Non-authoritative answer:
    Name: www.google.com
    Address: 74.125.224.208
    Name: www.google.com
    Address: 74.125.224.212
    Name: www.google.com
    Address: 74.125.224.209
    Name: www.google.com
    Address: 74.125.224.210
    Name: www.google.com
    Address: 74.125.224.211

    tgalati4@Mint14-Extensa ~ $ cat /etc/resolv.conf
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 127.0.1.1

    # OpenDNS Fallback (configured by Linux Mint in /etc/resolvconf/resolv.conf.d/tail).
    nameserver 208.67.222.222
    nameserver 208.67.220.220

    ----------------

    You are not supposed to edit /etc/resolv.conf either.

    My guess is for the gui-settings and network negotiation, a different framework is used which relies on legacy configuration files. You just can't edit them anymore like in linux distros of old.

    rc.local has always been reserved for locally-produced scripts that need to be run. In older distros a lot more services were started from this script, but they have been moved to /etc/init.d or /etc/rcX.d. Again this was done to add more flexibility to how a system is booted and to automatically add services when new applications are installed on the system. If you have one massive rc.local file and several installations poke it to add services, eventually it will become like the Windows Registry--bloated and broken.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  3. #3
    Join Date
    Apr 2012
    Beans
    6,688

    Re: Who is my DNS server?

    What version of Ubuntu are you running? newer (desktop) versions use dnsmasq via NetworkManager as a local relaying DNS server - you should see it running if you look at the port with netstat or lsof:

    Code:
    $ sudo lsof -i :53
    COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
    dnsmasq 2222 nobody    4u  IPv4  12335      0t0  UDP localhost:domain
    dnsmasq 2222 nobody    5u  IPv4  12336      0t0  TCP localhost:domain (LISTEN)
    Code:
    DESCRIPTION
           dnsmasq  is  a lightweight DNS, TFTP and DHCP server. It is intended to
           provide coupled DNS and DHCP service to a LAN.
    
           Dnsmasq accepts DNS queries and  either  answers  them  from  a  small,
           local,  cache  or  forwards  them  to a real, recursive, DNS server. It
           loads the contents of /etc/hosts so that local hostnames which  do  not
           appear  in  the global DNS can be resolved and also answers DNS queries
           for DHCP configured hosts.
    If it annoys you, afaik you can remove it (at least on 12.04 that was possible). Not sure what you mean by scrapping rc.local?

  4. #4
    Join Date
    Mar 2007
    Beans
    790

    Re: Who is my DNS server?

    So if you have a GUI installed, but choose to use a CLI only run level (ie a server that occasionally needs an X, but not normally) then you don't get to control your DNS? If the gui network manager is now in complete control then nslookup needs to be modified to work correctly. Frankly, network manager should get its fingers out of nslookup and resolv.conf. These DNS techniques that have been working just fine for decades now suddenly isn't good enough for network manager?
    Registered Linux User: 450747 Registered Ubuntu User: 16269

  5. #5
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    11,404
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Who is my DNS server?

    Quote Originally Posted by tgalati4 View Post
    tgalati4@Mint14-Extensa ~ $ cat /etc/resolv.conf
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 127.0.1.1

    # OpenDNS Fallback (configured by Linux Mint in /etc/resolvconf/resolv.conf.d/tail).
    nameserver 208.67.222.222
    nameserver 208.67.220.220
    Follow tgalati4's suggestion and place the name server addresses in either /etc/resolvconf/resolv.conf.d/head or ../tail.) I place them in the "head" file so they will be consulted before dnsmasq at 127.0.1.1. If you put them in "tail" like the above, they will only be consulted if the local nameserver is not running or is otherwise unavailable.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  6. #6
    Join Date
    Mar 2007
    Beans
    790

    Re: Who is my DNS server?

    I meant resolv.conf. Not sure why that other file came out.
    Registered Linux User: 450747 Registered Ubuntu User: 16269

Bookmarks

Posting Permissions

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