Install packages and filesystem level changes

yum install bind mkrdns
mkdir -p /etc/named/master
mkdir -p /etc/named/slave
touch /var/named/dynamic/named.empty
touch /var/named/dynamic/named.localhost

Minimal Configuration files

Change or add at /etc/named.conf

options {
 listen-on port 53 { 127.0.0.1; 193.136.94.14; };
 // IPV6 OFF - listen-on-v6 port 53 { ::1; };
// This is an Authoritative Name Server
 allow-query { any; };

// This is an Authoritative Name Server
 recursion no;

include "/etc/named/streamline.conf";

Create at /etc/named/streamline.conf

////////////////////////////////////////////////////
// Master Zones
////////////////////////////////////////////////////


zone "myzone.pt" IN {
 type master;
 file "/etc/named/master/myzone.pt.zone";
 allow-update { none; };
 allow-transfer {
 13.136.92.65; // Slave Server 1
 13.136.92.61; // Slave Server 1
 };
 also-notify {
 13.136.92.65; // Slave Server 1
 13.136.92.61; // Slave Server 2
 };
};



zone "94.136.13.IN-ADDR.ARPA" IN {
 type master;
 file "/etc/named/master/13.136.94.zone";
 allow-update { none; };
 allow-transfer {
 13.136.92.65; // Slave Server 1
 13.136.92.61; // Slave Server 1
 };
 also-notify {
 13.136.92.65; // Slave Server 1
 13.136.92.61; // Slave Server 2
 };
};


////////////////////////////////////////////////////
// Secondary Zones
////////////////////////////////////////////////////

zone "secondary.pt" {
 type slave;
 file "/etc/named/slave/secondary.pt.zone";
 masters { 13.136.92.65; };
};

Create at /etc/named/master/myzone.pt.zone

$TTL 3600
@ IN SOA ns.myzone.pt. admin.myzone.pt (
 17011701
 1200
 7200
 604800
 86400 )

IN TXT "v=spf1 a ptr ?all"


 IN NS ns.myzone.pt.
 IN NS ns2.myzone.pt.
 
 IN MX 0 mx-f0.myzone.pt.
 IN MX 1 antispam.myzone.pt.
 IN MX 10 zimbra.myzone.pt.
 

IN A 13.136.94.10
ns IN A 13.136.94.14

www IN CNAME myzone.pt.

Now run mkrdns to create the reverse zone

Open firewall

firewall-cmd --zone=public --add-port=53/udp
firewall-cmd --zone=public --add-port=53/tcp
firewall-cmd --reload

Start services

systemctl enable named
systemctl start named
Advertisements