bind9/README.md

22 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

2025-01-22 23:36:55 +00:00
# bind9
2025-01-29 22:38:57 +00:00
This repo details the configuration for BIND DNS on Ubuntu 22.04.
You can set up your own DNS server by following this [guide](https://www.cherryservers.com/blog/how-to-install-and-configure-a-private-bind-dns-server-on-ubuntu-22-04]).
2025-01-22 23:36:55 +00:00
2025-01-29 22:38:57 +00:00
The basic configuration is as below:
1. Install bind9 and check its status
```bash
apt update -y && apt upgrade -y
apt install bind9 bind9utils bind9-doc -y
sudo systemctl status bind9
```
2. Edit `/etc/bind/named.conf.options` and check its syntax with `named-checkconf /etc/bind/named.conf.options`. There should be no output.
3. Edit `/etc/bind/named.conf.local` and check its syntax with `named-checkconf /etc/bind/named.conf.local`. There should be no output.
4. Create a directory for your zone files with `mkdir /etc/bind/zones` and create your zone file in it as `/etc/bind/zones/example.com`. Replace `example.com` with your domain name.
5. Check its syntax with `named-checkzone example.com /etc/bind/zones/example.com`.
6. Restart bind9 with `sudo systemctl restart bind9`.