Domain Name Change
In case you want your customers with CPE's having a public IP be reachable from the internet you need to configure your own domain and domain name server.
This page provides a step-by-step guide for changing your domain e.g. from the default 'nmsprime.test' to your own publicly reachable domain name when your system is already a production environment with a lot of devices monitored by icinga and cacti.
Note: The examples show a domain change from 'nmsprime.test' to 'nmsprime.your-domain.com'.
Preparation
- Add the domain / subdomain
- Add the NS Record for NMSPrime name server at your provider
Change Domain globally
# Check your NMSPrime server's hostname as we want to change the internal FQDN (fully qualified domain name) back later hostnamectl
Adapt name server configuration
Synchronize named
# Sync zone files rndc sync -clean && systemctl stop named # Adapt names mv /var/named/dynamic/nmsprime.test.zone /var/named/dynamic/nmsprime.zone sed -i 's/nmsprime.test/nmsprime.your-domain.com/g' /var/named/dynamic/in-addr.arpa.zone sed -i 's/nmsprime.test.zone/nmsprime.zone/' /etc/named-nmsprime.conf sed -i 's/zone "nmsprime.test"/zone "nmsprime.your-domain.com"/' /etc/named-nmsprime.conf systemctl start named sed -i 's/cpe.nmsprime.test/cpe.nmsprime.your-domain.com/' /etc/named-ddns.sh
Cacti
# Get cacti password grep "CACTI_DB_PASSWORD" /etc/nmsprime/env/provmon.env # Change DB entries mysql -u cactiuser -p cacti UPDATE host set hostname=REPLACE(hostname, '.test', '.your-domain.com') where hostname like 'cm-%nmsprime.test%'; UPDATE data_input_data set value=REPLACE(value, '.test', '.your-domain.com') where value like '%cm-%nmsprime.test%'; UPDATE poller_item set arg1=REPLACE(arg1, '.test', '.your-domain.com') where arg1 like '%cm-%nmsprime.test%'; quit
Firewall
# Add DNS Service to firewall firewall-cmd --add-service=dns --zone=public firewall-cmd --add-service=dns --zone=public --permanent