MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: Spacedust on 2021-06-12, 22:12:32
-
1. Make sure to have pdns server selected in Kloxo -> Switch Program -> DNS -> pdns from the list
2. Run sh /script/fixdns
in SSH shell
3. Type in SSH shell:
yum -y install epel-release yum-plugin-priorities
curl -o /etc/yum.repos.d/powerdns-auth-44.repo https://repo.powerdns.com/repo-files/centos-auth-44.repo
curl -o /etc/yum.repos.d/powerdns-rec-45.repo https://repo.powerdns.com/repo-files/centos-rec-45.repo
yum -y update pdns*
yum -y install pdns-recursor
yum -y install dnsdist
3. Add a line nameserver 127.0.0.1
to your /etc/resolv.conf file at the beginning:
; generated by /usr/sbin/dhclient-script
nameserver 127.0.0.1
nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 8.8.4.4
4. Your /etc/pdns/pdns.conf should look like this:
setuid=pdns
setgid=pdns
launch=gmysql
gmysql-dnssec=yes
gmysql-host=127.0.0.1
gmysql-user=powerdns
gmysql-password=somepassword
gmysql-dbname=powerdns
#launch=bind
#bind-config=/etc/named.conf
#bind-check-interval=300
master=no
slave=no
version-string=anonymous
local-port=5300
local-address=127.0.0.1
5. Your /etc/pdns-recursor/recursor.conf should look like this - replace yourdomain.com with your domain name:
local-address=127.0.0.1
allow-from=127.0.0.1
forward-zones=yourdomain.com=127.0.0.1:5300
local-port=5301
setgid=pdns-recursor
setuid=pdns-recursor
version-string=none
6. Your /etc/dnsdist/dnsdist.conf file should look like this:
setLocal('0.0.0.0')
setACL({'0.0.0.0/0', '::/0'}) -- Allow all IPs access
newServer({address='127.0.0.1:5300', pool='auth'})
newServer({address='127.0.0.1:5301', pool='recursor'})
recursive_ips = newNMG()
recursive_ips:addMask('127.0.0.1') -- These network masks are the ones from allow-recursion in the Authoritative Server
addAction(NetmaskGroupRule(recursive_ips), PoolAction('recursor'))
addAction(AllRule(), PoolAction('auth'))
7. Restart everything:
service pdns restart
service pdns-recursor restart
service dnsdist restart
8. Check if your local or Internet domains are working well from your local DNS server:
nslookup google.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: google.com
Address: 172.217.20.174
9. Verify if DNS server is working fine on https://intodns.com/
Done !