This page describes the process of installing Atomia DNS and its components on new RHEL8 platform.
Overview
Atomia DNS consists of the following components:
- Atomia DNS Master server,
- Atomia DNS PowerDNS Nameserver and
- Atomia DNS Bind Nameserver (for slave zones).
Atomia DNS Master server
The Atomia DNS master server is the main API that contains all the master and slave zones but does not run on port 53. All data is served by the master, and the sync applications periodically pull the latest changes and provision them on PowerDNS or Bind nameservers. The end user communicates via DNS protocol on port 53 with PowerDNS or Bind nameservers.
Requirements
- RedHat Enterprise 8, AlmaLinux 8 or other RHEL 8 compatible distro
- EPEL repository
- codeready-repo repository
- PostgreSQL database (installed locally or remotely)
Installation
If you are performing a clean installation follow the steps below:
- Add the Atomia RPM repository:
wget http://rpm.atomia.com/rhel8/atomia-repository-setup-1.0-1.el8.noarch.rpm rpm -i atomia-repository-setup-1.0-1.el8.noarch.rpm
- Prepare atomiadns.conf file by editing the /etc/atomiadns.conf file:
db_name = zonedata db_hostname = 127.0.0.1 db_username = atomiadns db_password = atomiadns123 soap_uri = http://192.168.182.104/atomiadns soap_username = atomiadns soap_password = atomiadns123
Make sure to change the soap_uri parameter to match your servers IP address or hostname, but keep
/atomiadns
in URI. Modify the db_password parameter to a desired one. During installation these parameters will be used to initialize the DB and other configurations. - Make sure that postgresql database is running or reachable, depending on what you have set in the previous step.
service postgresql status
- Perform the installation of AtomiaDNS master server:
yum install atomiadns-masterserver
- Optionally you should install atomiadns-client on the same server for easier administration:
yum install atomiadns-client
Troubleshooting
- HTTPd is not able to access the PostgreSQL database due to SELinux policy:
setsebool -P httpd_can_network_connect_db 1
- Access to the database is not working as expected (denied):
- Make sure that your postgresql database is configured to allow access via TCP protocol and authenticated via md5. Edit the file /var/lib/pgsql/data/pg_hba.conf and replace:
host all all 127.0.0.1/32 ident
with:
host all all 127.0.0.1/32 md5
- Restart postgresql service:
service postgresql restart
- Make sure that your postgresql database is configured to allow access via TCP protocol and authenticated via md5. Edit the file /var/lib/pgsql/data/pg_hba.conf and replace:
Atomia DNS PowerDNS Nameserver
AtomiaDNS PowerDNS sync is a package that synchronises AtomiaDNS master server database with PowerDNS database.
Requirements
- RedHat Enterprise 8, AlmaLinux 8 or other RHEL 8 compatible distro
- EPEL repository
- codeready-repo repository
- database (e.g. mysql or mariadb database)
yum install mysql-server
or
yum install mariadb-server
- PDNS server package
yum install pdns
- PDNS backend
yum install pdns-backend-mysql
Installation
- Add the Atomia RPM repository:
wget http://rpm.atomia.com/rhel8/atomia-repository-setup-1.0-1.el8.noarch.rpm rpm -i atomia-repository-setup-1.0-1.el8.noarch.rpm
- Perform the installation of AtomiaDNS powerdns sync application:
yum install atomiadns-powerdnssync
- Connect to the database to add schema and user:
CREATE DATABASE powerdns; CREATE USER 'powerdns'@'localhost' IDENTIFIED BY 'atomiadns123'; GRANT ALL PRIVILEGES ON powerdns.* TO 'powerdns'@'localhost'; FLUSH PRIVILEGES;
- Import tables to the database:
mysql -u root powerdns < /usr/share/atomia/powerdns.sql
- Create and set atomiadns.conf file:
touch /etc/atomiadns.conf
powerdns_db_database = powerdns powerdns_db_hostname = localhost powerdns_db_username = powerdns powerdns_db_password = atomiadns123 servername = powerdns_server soap_uri = http://192.168.182.104/atomiadns soap_username = atomiadns soap_password = atomiadns123
You should make sure that servername is the same as one of the nameservers that are set in AtomiaDNS masterserver database. AtomiaDNS masterserver should, also, have nameserver groups set up correctly.
- Start the service:
service atomiadns-powerdnssync start
Troubleshooting
- dig command doesn’t return the answer section:
- Is pdns service running?
- Did you configure pdns to use mysql as backend in /etc/pdns/pdns.conf?
launch+=gmysql gmysql-host=localhost gmysql-port=3306 gmysql-dbname=powerdns gmysql-user=powerdns gmysql-password=atomiadns123 gmysql-dnssec=yes
Atomia DNS Bind Nameserver
AtomiaDNS Bind sync is a package that synchronises zone data between AtomiaDNS master server and a bind server. Currently the bind sync supports only Slave zone synchronization, no master zones can be synchronized.
Requirements
- RedHat Enterprise 8, AlmaLinux 8 or other RHEL 8 compatible distro.
- EPEL repository
- codeready-repo repository
- If you use DNSSEC, you need to install package
bind-utils
Installation
- Add the Atomia RPM repository:
wget http://rpm.atomia.com/rhel8/atomia-repository-setup-1.0-1.el8.noarch.rpm rpm -i atomia-repository-setup-1.0-1.el8.noarch.rpm
- Create atomiadns.conf configuration file:
soap_uri = http://192.168.182.104/atomiadns soap_username = atomiadns soap_password = atomiadns123 servername = vagrant_nameserver
You should make sure that servername is the same as one of the nameservers that are set in AtomiaDNS masterserver database. AtomiaDNS masterserver should, also, have nameserver groups set up correctly.
- Install the package:
yum install atomiadns-bindsync
- Restart the bind service:
service named restart
- Start the service:
service atomiadns-bindsync start