Skip to content
Snippets Groups Projects
Commit 10b290f4 authored by Martin Larsson's avatar Martin Larsson
Browse files

Update file README.md

parent 2d64ae26
No related branches found
No related tags found
No related merge requests found
......@@ -9,14 +9,14 @@ This guide provides step-by-step instructions to set up a local DNS server using
```shell
sudo apt update
sudo apt install bind9 bind9utils bind9-doc
```
### 2. Configure Local Zone
- Create and configure a zone file (e.g., 'db.drones.local') in '/etc/bind/':
```shell
sudo nano /etc/bind/db.drones.local
```
- Add basic DNS records. Example zone file contents:
```shell
;
; BIND data file for local drones
;
......@@ -30,34 +30,35 @@ $TTL 604800
;
@ IN NS ns.drones.local.
ns IN A 127.0.0.1
```
### 3. Update BIND9 Configuration
- Update '/etc/bind/named.conf.local' to include the local zone:
```shell
sudo nano /etc/bind/named.conf.local
```
- Add:
```shell
zone "drones.local" {
type master;
file "/etc/bind/db.drones.local";
};
```
### 4. Start and Enable BIND9
```shell
sudo systemctl start named
sudo systemctl enable named
```
### 5. Test DNS Resolution
- Add a drone record to 'db.drones.local':
```shell
drone1 IN A 192.168.1.2
```
- Test thee DNS resolution with 'dig':
```shell
dig @localhost drone1.drones.local
```
- Expected output should include:
```shell
;; ANSWER SECTION:
drone1.drones.local. 604800 IN A 192.168.1.2
\ No newline at end of file
drone1.drones.local. 604800 IN A 192.168.1.2
```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment