so I have a ubuntu 20.04 vps and a website running on it, I wanted to point my domain to it. but nslookup railnet.ir
gives ** server can't find railnet.ir: SERVFAIL
the vps ip is 87.236.210.159
and the domain is railnet.ir
the thing I did:
apt install bind9
and then the configs: /etc/bind/named.conf.options
:
options {
directory "/var/cache/bind";
allow-query { any; };
forwarders {
8.8.8.8;
8.8.4.4;
};
dnssec-validation auto;
listen-on{
87.236.210.159;
};
listen-on-v6 { none;};
};
and /etc/bind/named.conf.local
:
zone "railnet.ir" {
type master;
file "/etc/bind/db.railnet.ir";
allow-transfer { 87.236.210.159; };
also-notify { 87.236.210.159; };
};
and eventually /etc/bind/db.railnet.ir
:
$TTL 604800
@ IN SOA ns1.railnet.ir. myemail.gmail.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns1.railnet.ir.
@ IN A 87.236.210.159
and also in my domain provider website I did set server name
to ns1.railnet.ir
and ip address
to 87.236.210.159
this is my first time doing such thing, so obviously I'm doing something wrong, but can't figure it out