My dedicated IP: xx.xxx.xxx.59
Am I doing this correctly by having 2 PTR records (ns1 and domain) for my IP?
Reverse DNS Zone file 59.xxx.xxx.xx.in-addr.arpa.db
$TTL 86400
@ IN SOA ns1.example.com. admin.example.com. (
2020040201 ; Serial
3600 ; Refresh
7200 ; Retry
1209600 ; Expire
86400 ) ; Negative Cache TTL
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
;Reverse lookup for Name Server
59 IN PTR ns1.example.com.
;PTR Record IP address to HostName
59 IN PTR example.com.
And my actual DNS zone:
$TTL 86400
@ IN SOA ns1.example.com. admin.example.com. (
2020040201 ; Serial
3600 ; Refresh
7200 ; Retry
1209600 ; Expire
86400 ) ; Negative Cache TTL
; name servers - NS records
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
; name servers - A records
ns1.example.com. IN A xx.xxx.xxx.59
ns2.example.com. IN A xx.xxx.xxx.59
; All other A records
@ IN A xx.xxx.xxx.59
mail IN A xx.xxx.xxx.59
www IN A xx.xxx.xxx.59
@ IN MX 10 mail.example.com.
@ IN TXT "v=spf1 a mx ip4:xx.xxx.xxx.59 ?all"
And my /etc/named.conf
options {
listen-on port 53 { 127.0.0.1; xx.xxx.xxx.59; };
# listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { localhost; xx.xxx.xxx.0/24};
recursion no;
dnssec-enable yes;
dnssec-validation yes;
bindkeys-file "/etc/named.root.key";
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
zone "example.com" {type master; file "/var/named/example.com.db";};
zone "59.xxx.xxx.xx.in-addr.arpa" {type master; file "/var/named/59.xxx.xxx.xx.in-addr.arpa.db";};