Skip to content

Instantly share code, notes, and snippets.

@faizal2007
Last active June 26, 2021 11:45
Show Gist options
  • Save faizal2007/dac73b810102a77f6c4a86fc7e3c2aef to your computer and use it in GitHub Desktop.
Save faizal2007/dac73b810102a77f6c4a86fc7e3c2aef to your computer and use it in GitHub Desktop.
Bind9 basic config
; create file in /var/named/example.com
; example.com
$TTL 3600
example.com. IN SOA ns1.example.com. dnsmaster@example.com. (
2021062601 ; Serial
3H ; refresh after 3 hours
1H ; retry after 1 hour
1W ; expire after 1 week
1D) ; minimum TTL of 1 day
; Name Server
IN NS ns1.example.com. ;
; Mail Exchanger
IN MX 50 mail.example.com. ; Your Mail Server
ns1 IN A 192.168.1.52
example.com. IN A 192.168.1.52
mail IN A 192.168.1.52
// append zone config at /etc/named.conf
zone "example.com" {
type master;
file "example.com.conf";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment