Last active
May 18, 2019 08:41
-
-
Save katoozi/3a6d0ce7b44480e49a21da63f3d8284f to your computer and use it in GitHub Desktop.
config bind9 steps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1: sudo apt-get install bind9 dnsutils -y | |
2: cd /etc/bind/ | |
3: mkdir zones | |
4: cp db.local zones/your_domain_name.com | |
5: nano named.conf.default-zones | |
6: put in the named.conf.default-zones this code : | |
// prime the server with knowledge of the root servers | |
zone "." { | |
type hint; | |
file "/etc/bind/db.root"; | |
}; | |
// be authoritative for the localhost forward and reverse zones, and for | |
// broadcast zones as per RFC 1912 | |
zone "your_domain_name.com" { | |
type master; | |
file "/etc/bind/zones/your_domain_name.com"; | |
}; | |
7: save file and exit | |
8: nano zones/your_domain_name.com or .com or evrything | |
9: and put this codes in file : | |
; | |
; BIND data file for local loopback interface | |
; | |
$TTL 604800 | |
@ IN SOA ns1.your_domain_name.com. root.your_domain_name.com. ( | |
2 ; Serial | |
3600 ; Refresh | |
7200 ; Retry | |
2419200 ; Expire | |
86400 ) ; Negative Cache TTL | |
; | |
@ IN NS ns1.your_domain_name.com. | |
@ IN NS ns2.your_domain_name.com. | |
@ IN A server_ip | |
ns1 IN A server_ip | |
ns2 IN A server_ip | |
www IN A server_ip | |
10: named-checkconf named.conf.default-zones | |
11: service bind9 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment