Results 1 to 5 of 5

Thread: How to use custom DNS ?

  1. #1
    Join Date
    Mar 2011
    Location
    India
    Posts
    303

    Default How to use custom DNS ?

    Hi,

    I am using mobile broadband (usb modem) to connect to the Internet.

    I want to use Google DNS. I have configured the connection like this

    https://paste.opensuse.org/77700669

    But when I view the resolv.conf I see this

    Code:
    ~> cat /etc/resolv.conf 
    ### /etc/resolv.conf file autogenerated by netconfig!
    #
    # Before you change this file manually, consider to define the
    # static DNS configuration using the following variables in the
    # /etc/sysconfig/network/config file:
    #     NETCONFIG_DNS_STATIC_SEARCHLIST
    #     NETCONFIG_DNS_STATIC_SERVERS
    #     NETCONFIG_DNS_FORWARDER
    # or disable DNS configuration updates via netconfig by setting:
    #     NETCONFIG_DNS_POLICY=''
    #
    # See also the netconfig(8) manual page and other documentation.
    #
    # Note: Manual change of this file disables netconfig too, but
    # may get lost when this file contains comments or empty lines
    # only, the netconfig settings are same with settings in this
    # file and in case of a "netconfig update -f" call.
    #
    ### Please remove (at least) this line when you modify the file!
    nameserver 122.160.237.197
    nameserver 59.144.127.117
    nameserver 8.8.8.8
    As you can see the system is still using my ISP's DNS servers.

    How to use custom DNS ?
    openSUSE Leap 15
    You aren't rich until you have something that money can't buy.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,012
    Blog Entries
    3

    Default Re: How to use custom DNS ?

    If you really want to set your own, you can just edit them into "/etc/resolv.conf"

    Make sure that you remove that line the comments say to remove. Or remove all comment lines. And make a backup of the version you like, just in case some other software changes it (some VPN software does that).

    And, if you change your mind and want to get the original "resolv.conf" back, you can just remove that file and reboot. It will be recreated during boot.
    openSUSE Leap 15.1; KDE Plasma 5;

  3. #3
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,349

    Smile Re: How to use custom DNS ?

    Or, read the comments in “/etc/resolv.conf”:
    • Edit the following parameters in “/etc/sysconfig/network/config”:
      • NETCONFIG_DNS_STATIC_SEARCHLIST
      • NETCONFIG_DNS_STATIC_SERVERS
      • NETCONFIG_DNS_FORWARDER


    “/etc/sysconfig/network/config” is fully commented with explanations of what these parameters do.
    There's also the “netconfig” (8) man page …
    There's also this openSUSE documentation: <https://doc.opensuse.org/documentati...st.change.host>.

  4. #4
    Join Date
    Mar 2011
    Location
    India
    Posts
    303

    Default Re: How to use custom DNS ?

    Edit the following parameters in “/etc/sysconfig/network/config”:

    • NETCONFIG_DNS_STATIC_SEARCHLIST
    • NETCONFIG_DNS_STATIC_SERVERS
    • NETCONFIG_DNS_FORWARDER
    This ^^ worked.

    Thanks to both.
    openSUSE Leap 15
    You aren't rich until you have something that money can't buy.

  5. #5
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,349

    Smile Re: How to use custom DNS ?

    @suse_kid:

    Thanks for the feedback.

Posting Permissions

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