DNS
Configure a DNS server on OpenBSD.
nsd
# rcctl enable nsd
Create configuration file:
# cat > /var/nsd/etc/nsd.conf << EOF
remote-control:
control-enable: yes
control-interface: /var/run/nsd.sock
server:
hide-version: yes
zone:
name: "triaxx.xyz"
zonefile: "master/triaxx.io.zone"
EOF
Check that configuration is correct:
# nsd-checkconf /var/nsd/etc/nsd.conf
# echo $?
0
Create zone file:
# cat > /var/nsd/zones/master/triaxx.io.zone << EOF
$TTL 86400
$ORIGIN triaxx.io.
@ IN SOA ns0.triaxx.io. hostmaster.triaxx.io. (
2026043000 ; serial
1800 ; refresh (30 mins)
900 ; retry (15 mins)
604800 ; expire (7 days)
1200 ) ; minimum (20 mins)
@ IN NS ns0
@ IN NS ns1
@ IN MX 10 mx
@ IN A 175.52.128.39
mx IN A 175.52.128.39
ns0 IN A 175.52.128.39
ns1 IN A 105.7.42.123
EOF
Check that zone is correct:
# nsd-checkzone triaxx.io /var/nsd/zones/master/triaxx.io.zone
zone triaxx.io is ok
# rcctl start nsd
nsd(ok)
# ps aux | grep nsd | grep -v grep
_nsd 40086 0.0 0.1 37976 4452 ?? Spc 8:45AM 0:00.01 nsd: xfrd (nsd)
_nsd 29469 0.0 0.8 33856 33428 ?? Spc 8:45AM 0:00.02 nsd: main (nsd)
_nsd 29244 0.0 0.1 50084 2116 ?? Spc 8:45AM 0:00.00 nsd: server 1 (nsd)
Test
dig @localhost triaxx.io SOA
Tags: