46 lines
896 B
Markdown
46 lines
896 B
Markdown
|
# Dnsmasq
|
||
|
|
||
|
|
||
|
To setup Dnsmasq you must be root ( `sudo -s` ) then install it with...
|
||
|
|
||
|
```
|
||
|
apt install dnsmasq
|
||
|
```
|
||
|
|
||
|
**When using systemd-resolved, you'll get a service start failure during install, so must disable DNS forwarding.**...
|
||
|
|
||
|
```
|
||
|
cp -iv disable-forwarding.conf /etc/dnsmasq.d/
|
||
|
```
|
||
|
|
||
|
---
|
||
|
|
||
|
Once installed, we want dnsmasq to serve addresses...
|
||
|
|
||
|
**You'll need to change the IP address range (in the file) to match your LAN configuration.**
|
||
|
|
||
|
```
|
||
|
cp -iv dhcp-server.conf /etc/dnsmasq.d/
|
||
|
```
|
||
|
|
||
|
---
|
||
|
|
||
|
Static IP addresses can be set, copy the file `dhcp-server-static.conf` in this directory to `/etc/dnsmasq.d/`...
|
||
|
|
||
|
**You'll need to add the MAC and IP addresses for your devices.**
|
||
|
|
||
|
```
|
||
|
cp -iv dhcp-server-static.conf /etc/dnsmasq.d/
|
||
|
```
|
||
|
|
||
|
---
|
||
|
|
||
|
Finally restart dnsmasq and check for errors.
|
||
|
|
||
|
```
|
||
|
systemctl restart dnsmasq
|
||
|
systemctl status dnsmasq
|
||
|
```
|
||
|
|
||
|
You should now have a running dnsmasq service!
|