Configuring your DNS resolvers

DNS servers are stored in /etc/resolv.conf. You can also manage this file using NetworkManager.

As with the previous recipe, and for the same reasons, this recipe won't go into the kickstart options.

How to do it…

Let's set the DNS resolvers for eth1 to point to Google's public DNS servers: 8.8.8.8 and 8.8.4.4.

Setting your DNS resolvers using nmcli

Perform the following steps:

  1. Set the DNS servers via the following command:
    ~]# nmcli connection modify System\ eth1 ipv4.dns "8.8.8.8,8.8.4.4"
    
  2. Now, use the following command to check your configuration:
    ~]# nmcli connection show System\ eth1
    

    Here is an example output of the preceding commands:

Setting your DNS resolvers using nmtui

The nmtui tool requires a bit more work to ...

Get Red Hat Enterprise Linux Server Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.