|
|
|
# DNS Server
|
|
|
|
You can find the Pi-Hole at [dns.mphslaats.com/admin](http://dns.mphslaats.com/admin) and as a silent DNS resolver which makes sure you get the correct websites.
|
|
|
|
|
|
|
|
## Table of contents
|
|
|
|
- [DNS Server](#dns-server)
|
|
|
|
- [Table of contents](#table-of-contents)
|
|
|
|
- [Resources](#resources)
|
|
|
|
- [Installation](#installation)
|
|
|
|
- [Pi-Hole](#pi-hole)
|
|
|
|
- [DNS server](#dns-server)
|
|
|
|
|
|
|
|
## Resources
|
|
|
|
Pi-Hole is a really [lightweight server](https://discourse.pi-hole.net/t/hardware-software-requirements/273) and only needs 512 MB RAM. Remember it is able to run on a Raspberry Pi.
|
|
|
|
The DNS server is also a lightweight server so it does not need much either. Therefore the server gets 512 MB RAM and 1 CPU core.
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
### Pi-Hole
|
|
|
|
First Pi-Hole needs to be installed because it uses the dnsmasq service.
|
|
|
|
* Pi-Hole can be installed using `curl -sSL https://install.pi-hole.net | bash` or by downloading it:
|
|
|
|
* `wget install.pi-hole.net -O pihole.sh`;
|
|
|
|
* Make it executable by using `chmod +x pihole.sh`;
|
|
|
|
* Start the installation by using `./pihole.sh`;
|
|
|
|
* Select custom DNS provider and use x.x.x.4 and 8.8.8.8 as IP-address;
|
|
|
|
* Change the password by using `pihole -a -p "****"`;
|
|
|
|
|
|
|
|
### DNS server
|
|
|
|
* Now let's install resolvconf from the aptitude using `apt-get install resolvconf`;
|
|
|
|
* Now it is time to configure the DNS lookup places, so edit the `/etc/resolvconf/resolv.conf.d/base` file:
|
|
|
|
```bash
|
|
|
|
nameserver 8.8.8.8 # Ask Google
|
|
|
|
nameserver 8.8.4.4 # If Google does not work, take a look at the secondary server from Google
|
|
|
|
```
|
|
|
|
* Now it is time to install dnsmasq, a.k.a. the DNS server, using `apt-get install dnsmasq`;
|
|
|
|
* Backup the configuration file by using `cp /etc/dnsmasq.conf /etc/dnsmasq.conf.bak`;
|
|
|
|
* Change the following variables in the `/etc/dnsmasq.conf` file:
|
|
|
|
```bash
|
|
|
|
resolv-file=/etc/resolvconf/resolv.conf.d/base
|
|
|
|
|
|
|
|
interface=eth0
|
|
|
|
|
|
|
|
listen-address=127.0.0.1
|
|
|
|
listen-address=x.x.x.4 # My IP-address
|
|
|
|
```
|
|
|
|
* Change `IGNORE_RESOLVECONF` into `yes` in `/etc/default/dnsmasq`;
|
|
|
|
* Fill in the [`/etc/hosts`]() file to suit the networkdesign;
|
|
|
|
* Restart the dnsmasq and resolvconf by using `service dnsmasq restart && service resolvconf restart` or restart the system for the full effect;
|
|
|
|
* **NOTE:** Do not forget to set the DNS server IP-address on Proxmox and on the router.
|
|
|
|
|
|
|
|
[Home](https://git.mphslaats.com/mphslaats/server-documentation/wikis/home) |
|
|
|
\ No newline at end of file |