Product SiteDocumentation Site

6.2. Adding Host Entries

A host entry is always created when a client is configured. On Fedora systems, this is done automatically with the ipa-client-install script. On other platforms — and in alternative enrollment scenarios, as in Section 6.3, “Enrolling Clients Manually” — the host entry is created manually.

6.2.1. Adding Host Entries from the Web UI

  1. Open the Identity tab, and select the Hosts subtab.
  2. Click the Add link at the top of the hosts list.
  3. Fill in the machine name and select the domain from the configured zones in the drop-down list. If the host has already been assigned a static IP address, then include that with the host entry so that the DNS entry is fully created.
    DNS zones can be created in FreeIPA, which is described in Section 8.5, “Adding DNS Zones”. If the FreeIPA server does not manage the DNS server, the zone can be entered manually in the menu area, like a regular text field.

    NOTE

    Select the Force checkbox to add the host DNS record, even if the hostname cannot be resolved.
    This is useful for hosts which use DHCP and do not have a static IP address. This essentially creates a placeholder entry in the FreeIPA DNS service. When the DNS service dynamically updates its records, the host's current IP address is detected and its DNS record is updated.
  4. Click the Add and Edit button to go directly to the expanded entry page and fill in more attribute information. Information about the host hardware and physical location can be included with the host entry.

6.2.2. Adding Host Entries from the Command Line

Host entries are created using the host-add command. This commands adds the host entry to the FreeIPA Directory Server. The full list of options with host-add are listed in Section B.4, “ipa Host Commands”. At its most basic, an add operation only requires the client hostname to add the client to the Kerberos realm and to create an entry in the FreeIPA LDAP server:
$ ipa host-add client1.example.com
If the FreeIPA server is configured to manage DNS, then the host can also be added to the DNS resource records using the --ip-address and --force options.
Example 6.1. Creating Host Entries with Static IP Addresses
$ ipa host-add --force --ip-address=192.168.166.31 client1.example.com

Commonly, hosts may not have a static IP address or the IP address may not be known at the time the client is configured. For example, laptops may be preconfigured as FreeIPA clients, but they do not have IP addresses at the time they're configured. Hosts which use DHCP can still be configured with a DNS entry by using --force. This essentially creates a placeholder entry in the FreeIPA DNS service. When the DNS service dynamically updates its records, the host's current IP address is detected and its DNS record is updated.
Example 6.2. Creating Host Entries with DHCP
$ ipa host-add --force client1.example.com

Host records are deleted using the host-del command. If the FreeIPA domain uses DNS, then the --updatedns option also removes the associated records of any kind for the host from the DNS.
$ ipa host-del --updatedns client1.example.com