DNS Manager Not Working ? aaPanel pdns Alternative and fix namesevers [Tutorial]
After a few days, I realized that DNS Manager not working at all. I don't know this problem is only for [ .ir ] (Iranian) domains or maybe other domains like ( .com | .net ) and etc not working too. Anyway I used the bind9 instead of default panel DNS Manager (pdns) to solve namesever problem. I don't want to make this article long, so I will explain it very simply.
1 - open termial and type:
apt install bind9
apt install bind9 dnsutils
3 - make sure if bind9 installed successfully (it must print bind9 version):
named -v
3 - open (files) from panel and then type (/var/cache/bind
) to navigate there.
Note 1 : create a file and file name must be like db.ibehrooz.ir format and copy below contents into it .
Note 2 : replace your domain name instead of ibehrooz.ir and 121.80.123.124 instead of your server ip .
Note 3 : make sure there is a new empty line in the end of file (look at line 24 in the picture).
Note 4 : if you have another domain, just make a new file like this format in /var/cache/bind
directory and fill it with your own website info .
file content is:
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns1.ibehrooz.ir. root.ibehrooz.ir. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN A 121.80.123.124
@ IN NS ns1.ibehrooz.ir.
ns1 IN A 121.80.123.124
@ IN NS ns2.ibehrooz.ir.
ns2 IN A 121.80.123.124
@ IN MX 10 mail
mail IN A 121.80.123.124
www IN A 121.80.123.124
4 - open (files) from panel and then type (/etc/bind/
) to navigate this directory and open named.conf.local file.
Note 1 : open named.conf.local and copy below contents into it .
Note 4 : if you have another domain, just make a new zone for it .
zone content is:
zone "ibehrooz.ir" {
type master;
file "db.ibehrooz.ir";
};
5 - open terminal and type :
systemctl restart bind9
dig @121.80.123.124 ibehrooz.ir any
dig @121.80.123.124 ibehrooz.ir any +noall +answer
Note 1 : replace your own ip and domain into that cmd .
Note 4 : if you have another domain, just run cmd 2 and 3 again for your second domain .
Be sure to complete below first 3 step before doing this article Tutorial:
doc.aapanel.com/web/#/3?page_id=180
END.
Best Regards. iBehrooz.ir