Changing Domain Name Servers (DNS) and Host Names on an SL1 Appliance

Download this manual as a PDF file

This section describes how to change domain name servers (DNS) and hostnames on an SL1 appliance.

Use the following menu options to navigate the SL1 user interface:

  • To view a pop-out list of menu options, click the menu icon ().
  • To view a page containing all of the menu options, click the Advanced menu icon ().

Changing Name Servers on an SL1 Appliance

SL1 appliances include a local Domain Name Server (DNS) cache to improve performance. You can use the /etc/dnsmasq-resolv.conf file to change the DNS server information for the following SL1 appliance types:

  • Database Servers

  • Data Collectors

  • Message Collectors

  • All-In-One Appliances

You do not need to edit the /etc/resolv.conf file, which should have a single entry of nameserver 127.0.0.1.

The following change procedure does not apply if you are running SL1 on a cloud-based service like AWS or Azure. In that scenario, the DNS settings are provided automatically by DHCP, and configuration changes must be made in the DHCP provider’s settings.

Additionally, the following procedure does not apply to Administration Portals.

To update the name servers on most SL1 appliance types:

  1. Edit the /etc/dnsmasq-resolv.conf file by entering the following command:

    sudo vi /etc/dnsmasq-resolv.conf

  2. Change the nameserver entry in the file to the IP address of the new DNS or add new DNS entries to the file.

  3. Save and quit to commit the changes. This change immediately causes the OS to use the new DNS, with no reboot or service restarts required. If you have multiple nameservers listed in the file, the system will try each entry in the list until it gets a response or runs out of nameservers.

Changing Name Servers on Administration Portals

For SL1 Administration Portals, the Domain Name Server (DNS) server settings are configured at installation. You cannot adjust the DNS settings later through the Web Configurator. Instead, you must use the command line interface (CLI) to change the DNS server information. This action requires no downtime.

If you are running SL1 on a cloud-based service like AWS or Azure, the following change procedures do not apply. The DNS settings are provided automatically by DHCP, and configuration changes must be made in the DHCP provider’s settings.

To change the DNS settings for SL1 Administration Portals:

  1. Edit the /etc/resolv.conf file by entering the following command:

    sudo vi /etc/resolv.conf

  2. Change the nameserver entry to the IP address of the new DNS or add new DNS entries to the file.

  3. Save and quit to commit the changes. This change immediately causes the OS to use the new DNS, with no reboot or service restarts required. If you have multiple nameservers listed in the file, the system will try each entry in the list until it gets a response or runs out of nameservers.

Next, add the DNS to the interface configuration file so that the change will persist if the network service is restarted or the Administration Portal is rebooted.

To add one or more domain name servers to the interface configuration file:

  1. Either go to the console of the Administration Portal or use SSH to access it.

  2. Log in as user em7admin with the appropriate password.

  3. Determine the name of your primary interface (not the "lo" interface) by running the following command:

    ip addr

  4. Edit the corresponding interface configuration file in the /etc/sysconfig/network-scripts directory:

    sudo vi /etc/sysconfig/network-scripts/ifcfg-{interface name}

  5. Find the "DNS1" entry and change the IP address to the IP address of the new DNS.

    You can enter additional DNS servers and define them as DNS2, DNS3, and so on.

  6. Save and quit to commit the changes.

Changing Hostnames on an SL1 Appliance

To change hostnames on an SL1 appliance:

  1. Either go to the console of the SL1 appliance or use SSH to access the server.

  2. Set the hostname by running the following command:

    sudo hostnamectl set-hostname <host.example.com>

  3. Verify that the hostname was set:

    hostnamectl 
    
     hostnamectl
       Static hostname: host.example.com
             Icon name: computer-vm
               Chassis: vm
            Machine ID: 59013338cba643ec8ed2ec9883dfddf4
               Boot ID: dde124fbc75c484ea7d71443277af659
        Virtualization: vmware
      Operating System: Oracle Linux Server 7.9
           CPE OS Name: cpe:/o:oracle:linux:7:9:server
                Kernel: Linux 3.10.0-1160.36.2.el7.x86_64
          Architecture: x86-64

    The em7 service will notice this change and update the Appliances page (System > Settings > Appliances) in a few minutes.

  4. Edit the /etc/hosts file to replace the old hostname with the new one:

    sudo vi /etc/hosts

  5. Restart the mysql service to update the database @@hostname, which is how the command-line Message of the Day (MOTB) pulls the active Database Server:

    sudo systemctl restart mysql

  6. You can also restart the task manager service to get the changes picked up more quickly:

    sudo systemctl restart em7.service