File tree Expand file tree Collapse file tree 1 file changed +77
-0
lines changed
Expand file tree Collapse file tree 1 file changed +77
-0
lines changed Original file line number Diff line number Diff line change 1+ How to Setup DNS Server with BIND on Ubuntu 22.04
2+
3+ Show ip
4+ ==================
5+ ip a
6+
7+ Set hostname
8+ ======================
9+ nano /etc/hostname
10+ nano /etc/hosts
11+
12+ Install Required package
13+ ====================================
14+ apt install -y bind9*
15+
16+ Change directory
17+ ==========================
18+ cd /etc/bind/
19+
20+ Setting up bind9
21+ =============================
22+ nano named.conf.options
23+
24+ forwarders {
25+ 8.8.8.8;
26+ 1.1.1.1;
27+ };
28+
29+ listen-on { any; };
30+ allow-query { any; };
31+ allow-query-cache { any; };
32+
33+ Configure zone
34+ ========================
35+ nano named.conf.local
36+
37+ zone "ripon.com" IN {
38+ type master;
39+ file "/etc/bind/forward.zone";
40+ };
41+
42+ zone "50.20.172.in-addr.arpa" IN {
43+ type master;
44+ file "/etc/bind/reverse.zone";
45+ allow-query { any; };
46+ };
47+
48+ Forward zone configuration
49+ ========================================
50+ cp db.local forward.zone
51+ nano forward.zone
52+
53+ Reverse zone configuration
54+ ========================================
55+ cp forward.zone reverse.zone
56+ nano reverse.zone
57+
58+ Check zones
59+ =====================
60+ named-checkzone forward.zone /etc/bind/forward.zone
61+ named-checkzone reverse.zone /etc/bind/reverse.zone
62+
63+ Set permission
64+ ========================
65+ chown bind: bind /etc/bind/
66+
67+ Restart the services
68+ ==================================
69+ systemctl restart bind9
70+
71+ Show services status
72+ =================================
73+ systemctl status bind9
74+
75+ Start services at boot
76+ ===================================
77+ systemctl enable bind9
You can’t perform that action at this time.
0 commit comments