Results 1 to 10 of 10

Thread: resovl.conf / resolvconf

  1. #1
    Join Date
    Nov 2004
    Beans
    558
    Distro
    Ubuntu 12.04 Precise Pangolin

    resovl.conf / resolvconf

    i'm a bit lost with the new resolv.conf handling in ubuntu. can someone please answer my questions?

    1. there seems to be a package that both depends on resolvconf and dnsmasq (which is used for caching and as local nameserver). what is the name of that package?

    2. what script creates the resolv.conf symlink (pointing to ../run/resolvconf/resolv.conf)? can i call that script manually?

    3. on a FAI install of a client, i saw that tere is no /run/resolvconf/resolv.conf file (the directory exists). what script puts that file there?

    4. are there more questions about the new resolv.conf handling i forgot to ask?

  2. #2
    Join Date
    Nov 2004
    Beans
    558
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: resovl.conf / resolvconf

    by the way: i'm talking about a server setup here; no window manager installed. so nm-tool or NetworkManager are no options.

  3. #3
    Join Date
    Nov 2004
    Beans
    558
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: resovl.conf / resolvconf

    bump...

    on my desktop machine, i saw that the dnsmasq-base package is installed. but (as far as i see) without any init.d or upstart script.

    ok, on the desktop it looks like the network manager is starting dnsmasq:
    Code:
    $ ps -elf | grep dns
    4 S nobody    3730   993  0  80   0 -  8253 poll_s 14:12 ?        00:00:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.0.1 --conf-file=/var/run/nm-dns-dnsmasq.conf --cache-size=0 --proxy-dnssec
    how would i achieve the same on a server?

    or is there just no point in having such a setup on a server, as a server will very rarely change its networking environment?

  4. #4
    Join Date
    Apr 2012
    Beans
    5,059

    Re: resovl.conf / resolvconf

    I can't answer any of your questions but there's some general info on manually configuring here

    https://help.ubuntu.com/community/Dnsmasq

  5. #5
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    19,879
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: resovl.conf / resolvconf

    or is there just no point in having such a setup on a server, as a server will very rarely change its networking environment?
    I think there is no point in having such a setup on a server because the server is not typically recalling the IP address of www.google.com, www.ebay.com, www.amazon.com, etc. Dnsmasq accepts DNS queries and either answers them from a small, local cache or forwards them to a real, recursive, DNS server.

    Other than periodic updates, I think a server just sits there and waits for an inquiry from the network and responds.

    If you are simply trying to set up DNS nameservers, I suggest you set them in /etc/network/interfaces:
    Code:
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
    address 192.168.1.108
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8
    If you are trying to do something more complicated, I probably don't know the answer.
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D.

  6. #6
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: resovl.conf / resolvconf

    Quote Originally Posted by surfer View Post
    i'm a bit lost with the new resolv.conf handling in ubuntu. can someone please answer my questions?

    1. there seems to be a package that both depends on resolvconf and dnsmasq (which is used for caching and as local nameserver). what is the name of that package?
    On desktops this is Network Manager. On 12.04 Server there is no Network Manager but the package resolvconf is still installed.

    2. what script creates the resolv.conf symlink (pointing to ../run/resolvconf/resolv.conf)? can i call that script manually?

    3. on a FAI install of a client, i saw that tere is no /run/resolvconf/resolv.conf file (the directory exists). what script puts that file there?

    4. are there more questions about the new resolv.conf handling i forgot to ask?
    The resolvconf app creates the /etc/resolv.conf file dynamically. It uses the data in the /etc/network/interfaces file (i.e.dns-nameservers) for the DNS name server IP addresses on a Ubuntu 12.04 Server with static IP addressing.

    Note: there are other locations that can hold hooks to the information if using DHCP or other dynamic IP addressing.

    From the resolvconf man page
    Code:
     Normally  resolvconf  is  run  only by hook scripts attached to network
           interface configurers such as pppd(8) (for  ppp  interfaces),  to  DHCP
           clients  such  as dhclient(8), to ifup(8) and ifdown, and to DNS caches
           such as dnsmasq(8) (for the loopback interface).   These  hook  scripts
           furnish  resolvconf  with  information about nameservers.
    -BAB1

  7. #7
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,527
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: resovl.conf / resolvconf

    I'm not a big fan of the new dnsmasq/resolvconf system on clients and would certainly not use it on servers. I'd just use apt-get to purge both dnsmasq and resolvconf and write a static copy of /etc/resolv.conf. Furthermore, you might want to run bind9 on a server; having dnsmasq around would just get in the way.

  8. #8
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: resovl.conf / resolvconf

    Quote Originally Posted by SeijiSensei View Post
    I'm not a big fan of the new dnsmasq/resolvconf system on clients and would certainly not use it on servers. I'd just use apt-get to purge both dnsmasq and resolvconf and write a static copy of /etc/resolv.conf. Furthermore, you might want to run bind9 on a server; having dnsmasq around would just get in the way.
    DNSmasq is used with Network Manager and as such is not installed with Ubuntu 12.04 Server. I agree that the resolvconf package is not needed on the Server. A static file (resolv.conf) is more reliable.
    -BAB1

  9. #9
    Join Date
    Mar 2005
    Beans
    211

    Re: resovl.conf / resolvconf

    Quote Originally Posted by surfer View Post
    i'm a bit lost with the new resolv.conf handling in ubuntu. can someone please answer my questions?

    1. there seems to be a package that both depends on resolvconf and dnsmasq (which is used for caching and as local nameserver). what is the name of that package?
    NetworkManager

    2. what script creates the resolv.conf symlink (pointing to ../run/resolvconf/resolv.conf)? can i call that script manually?
    It is created by the resolvconf package postinst.

    You should not call this script manually. Instead do

    dpkg-reconfigure resolvconf

    3. on a FAI install of a client, i saw that tere is no /run/resolvconf/resolv.conf file (the directory exists). what script puts that file there?
    /sbin/resolvconf does.

  10. #10
    Join Date
    Mar 2005
    Beans
    211

    Re: resovl.conf / resolvconf

    Quote Originally Posted by bab1 View Post
    The resolvconf app creates the /etc/resolv.conf file dynamically.
    Actually it writes /run/resolvconf/resolv.conf, to which /etc/resolv.conf is generally symlinked.

Tags for this Thread

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
  •