Table of Contents
Introduction
IPA Server: In our last first guide, we have seen how to setup IDM server on Red Hat Enterprise Linux 7 using IPA. By following in this guide let’s create our reverse zone and first DNS entry for one of the server.
Initially while setting up we used auto reserve option to create the reserver zone. In case if it not created or you may need to create different zone lets see how to do the same.
Find previous articles related to the series:
Abbreviations Used
- GUI – Graphical User Interface
- CLI – Command Line Interface
- PTR – Pointer Record or Reverse Record
- FQDN – Fully qualified domain name
Step 1: Create Reverse DNS Zone from GUI.
To create the reserve DNS zone click on top menu “Network Services”
And select DNS Zones, It will list the existing zones. Here in our setup, we are able to see “linuxsysadmins.local” which we created during the initial setup.
To create a Reserve zone click “Add” in right side top corner.
It will pop-up a window to create a Reverse zone. By entering the IP range including subnet and click on “Add” will create the reverse zone.
By clicking on DNS Zones we are able to list the existing one along with created reverse zone and ready to use.
Network Services –> DNS Zones –> Add –> Reverse Zone IP Network –> Add.
Step 1:1 Create a new DNS Zone with Reverse lookup from CLI.
To create a DNS zone from command line we have to use “IPA” command by following available options and argument. Let’s create and new zone with Reverse Zone.
# ipa dnszone-add nixsysadmins.local # ipa dnszone-add 192.168.108.0/24
To confirm the same navigate to Network Services –> DNS –> DNS zones it will be listed here as shown in the figure.
It’s super easy to create from CLI though.
Step 2: Creating the first DNS entry in the IPA server (GUI).
To create our first DNS entry click on the existing zone “
By following enter the details to create the DNS entry.
- Click “Add” to start creating DNS.
- Name to resolve with any IP “docker”.
- Choose Record type to create “A” record. (To point the Hostname to IP)
- IP address for name record to resolve.
- Check to create a reverse (PRT) record without additional steps.
- Click “Add” to create the DNS entry.
Once created it will be listed in DNS resource record page.
By checking “Create Reverse” PRT will be created. Let us verify and confirm the same.
Network Services –> DNS –> DNS Zones –> Click on 107.168.192.in-addr.arpa
Click on PTR record to get more information.
- Click on Reverse Zone (107.168.192.in-addr.arpa.)
- Record name used for reverse lookup.
- Record type (PTR).
- IP address resolves an FQDN.
Step 2:1 Creating the first DNS entry in the IPA server (CLI).
To create a new DNS record from CLI we have to use with IPA command. First, create forward lookup by following create PTR record.
# ipa dnsrecord-add nixsysadmins.local repo --a-rec 192.168.108.10 # ipa dnsrecord-add 108.168.192.in-addr.arpa 10 --ptr-rec repo.nixsysadmins.local
Verify by clicking on created Forward and reverse entry from the graphical interface.
We have successfully created a DNS entry from IPA CLI.
Step 3: Configure Static IP and resolve DNS name.
Configure 192.168.107.120 IP to anyone of the Physical or virtual machine to verify the DNS.
In below figure, we are able to see the Transient Hostname as “docker.linuxsysadmins.local”.
Additional Zone/Subnet resolution
If you have a plan to setup an additional zone in future or to reach a different subnet we need to make below changes.
DNS lookups will not forwarded if they originate in a subnet not managed by IPA, Configure the DNS server to allow recursion by default.
Once the recursion enabled it will start to forward requests even from subnets it does not control.
allow-recursion { any; };
To make the changes effective, restart the service.
[root@idm1 ~]# ipactl restart
Restarting Directory Service
Restarting krb5kdc Service
Restarting kadmin Service
Restarting named Service
Restarting httpd Service
Restarting ipa-custodia Service
Restarting pki-tomcatd Service
Restarting ipa-otpd Service
Restarting ipa-dnskeysyncd Service
ipa: INFO: The ipactl command was successful
[root@idm1 ~]#
That’s it, we have successfully created DNS zones and creating DNS records from GUI and CLI in an IPA server.
Conclusion
Have seen two ways of creating DNS zones and DNS records in IPA server, let’s see more in next topic. Subscribe with us to get more related topics through email.
great and helpful. Thanks.