https://github.com/solairen/bind9
Install Bind9 DNS server using Ansible
https://github.com/solairen/bind9
asnible bind9 docker raspberry-pi
Last synced: 3 months ago
JSON representation
Install Bind9 DNS server using Ansible
- Host: GitHub
- URL: https://github.com/solairen/bind9
- Owner: solairen
- License: gpl-3.0
- Created: 2023-08-25T09:03:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-14T22:01:26.000Z (3 months ago)
- Last Synced: 2026-01-15T03:09:09.323Z (3 months ago)
- Topics: asnible, bind9, docker, raspberry-pi
- Language: Jinja
- Homepage:
- Size: 77.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# About
This ansible script installs [Bind9](https://bind9.readthedocs.io/en/latest/index.html#).
Docker image is available on [DockerHub](https://hub.docker.com/r/moleszek/bind9).
Supported OS:
- Debian 12
- Ubuntu 22.04
- Raspberry Pi 4/5
## Ubuntu
In Ubuntu OS `DNSStubListener` should be set to `no`:
```bash
vim /etc/systemd/resolved.conf
```
uncomment and change to `no`:
```bash
DNSStubListener=no
```
Save and restart `systemd-resolved.service`
```bash
sudo restart systemd-resolved.service
```
## Configuration
Open `configuration.yml` that is located in `group_vars/bind9` and set proper values:
```yml
addresses:
first: 127.0.0.0
second: 127.0.1.0
dns1: 9.9.9.9
dns2: 149.112.112.112
```
Here:
```yml
addresses:
first: 127.0.1.0
second: 127.0.2.0
```
there is an option to add more addresses that will be added to `acl` configuration in `named.conf.options` e.g:
```yml
addresses:
first: 127.0.0.0
second: 127.0.1.0
third: 127.0.2.0
fourth: 127.0.3.0
```
and the output for `named.conf.options` will be:
```conf
acl internal {
127.0.0.0/24;
127.0.1.0/24;
127.0.2.0/24;
127.0.3.0/24;
};
```