HAProxy Enterprise Documentation 12.5

DNS

You can configure which DNS servers to query when the 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 setup_icon next to the system service.

    https://cdn.haproxy.com/documentation/aloha/12-5/assets/system-setup-6d662d8799137e7044827a85ae421c3572df638181d6a4ced67ffa5b4deadcce.png
  2. Use the dns_servers directive to specify the IP addresses of your DNS servers, where each IP address is separated by a space.

    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, rather than 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.

    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 ALOHA's hostname.

    service system
      dns_servers 192.158.0.10 192.168.0.11
      dns_domain example.com
      hostname ALOHA1
  5. Reload reload_icon the system service.