-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdns_server.service
More file actions
36 lines (31 loc) · 1021 Bytes
/
dns_server.service
File metadata and controls
36 lines (31 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[Unit]
Description=NX9 DNS Server
After=network.target
[Service]
User=dnsuser
Group=dnsuser
WorkingDirectory=/var/nx9-dns-server
ExecStart=/var/dns-server/nx9-dns_server
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
Restart=always
Environment=DNS_BIND=0.0.0.0:53
Environment=DNS_ENABLE_IPV6=1
Environment=DNS_MAX_PACKET_SIZE=4096
Environment=DNS_DB_PATH=/var/nx9-dns-server/dns.db
Environment=DNS_NS_RECORDS=ns1.yourdomain.tld.,ns2.yourdomain.tld.
Environment=DNS_AUTHORITATIVE=1
Environment=DNS_CACHE_TTL=300
Environment=RUST_LOG=info
Environment=DNS_DEFAULT_DOMAIN=yourdomain.tld
Environment=DNS_DEFAULT_IP=<YOUR-PUBLIC-IP4>
Environment="DNS_RECURSIVE=1" # Enable recursive resolution
Environment="DNS_CACHE_SIZE=10000"
Environment="DNS_FORWARDERS=8.8.8.8:53,1.1.1.1:53,9.9.9.9:53"
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
ReadWritePaths=/var/nx9-dns-server
ProtectSystem=full
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target