Results 1 to 2 of 2

Thread: Configure dns-nameservers only in interface file

  1. #1
    Join Date
    Oct 2015
    Beans
    1

    Configure dns-nameservers only in interface file

    Hi everybody

    I'm pretty new to Linux and I have a problem to configure my network settings..
    I have red that for network configuration you should edit the /etc/network/interfaces file.
    So I tried to configure only my dns servername what does not work as I expected.
    First I tried to make a static entry where I only inserted the dns-nameservers line, what ofc did not work.
    Then I tried to add it to a dynamic entry, what also doesn't work (see quote below).
    And now I'm not sure if it's even possible to set only the dns-servernames and let the other data apply through DHCP.
    When I changed the ip in the resolv.conf it could not resolve any other URL in the browser, so I recovered the original state of the file.
    So is there a way that I catch my aim?

    # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback

    iface wlan0 inet dhcp
    dns-nameservers 192.168.0.1

  2. #2
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Configure dns-nameservers only in interface file

    The NetworkManager GUI has an entry where you can set the nameservers you want to use and override any provided by DHCP.

    A better solution, though, is to edit the DHCP server configuration on your router and specify the name server addresses you want it to distribute there.
    If you ask for help, do not abandon your request. 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

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
  •