Network

DNS

You can configure which DNS servers to query when HAProxy ALOHA needs to resolve a server’s hostname. This is necessary, for example, when you want to specify a hostname instead of an IP address when defining a backend server. Also, features like Single Sign-on depend on resolving hostnames. Typically, these DNS servers will reside within the local network.

Changes affect the system’s /etc/resolv.conf file.

  1. In the Services tab, click system setup next to the system service.

    System Setup

  2. Use the dns_servers directive to specify the IP addresses of your DNS servers, where each IP address is separated by a space.

    haproxy
    service system
    dns_servers 192.158.0.10 192.168.0.11
    haproxy
    service system
    dns_servers 192.158.0.10 192.168.0.11
  3. Optional: Use the dns_domain directive to specify the search list, which is equivalent to setting a search directive in /etc/resolv.conf. This allows you to use a server’s hostname in your configuration instead of its fully qualified domain name.

    If you specify the DNS suffix example.com, you will only have to type app in your configuration, which will expand to app.example.com.

    haproxy
    service system
    dns_servers 192.158.0.10 192.168.0.11
    dns_domain example.com
    haproxy
    service system
    dns_servers 192.158.0.10 192.168.0.11
    dns_domain example.com
  4. Optional: Use the hostname directive to change the HAProxy ALOHA hostname.

    haproxy
    service system
    dns_servers 192.158.0.10 192.168.0.11
    dns_domain example.com
    hostname aloha1
    haproxy
    service system
    dns_servers 192.158.0.10 192.168.0.11
    dns_domain example.com
    hostname aloha1
  5. Reload the system service.

  6. In the Setup tab, click Save under Local Configuration to persist your changes after a reboot.

Do you have any suggestions on how we can improve the content of this page?