I set up Pi-hole to use its own DHCP Server (as it's 'tricky' on my router) and set up static IP addresses for most of my devices through it.
So now I'm wondering if it's possible to backup these settings so I don't have to to re-enter the static IP addresses again if I have problems with my Raspberry Pi, set up Pi-hole on a different device etc.
I noticed Pi-hole Teleporter in Pi-hole's settings, but that only backs up the whitelist and blacklists.
Is it possible to backup the DHCP Server settings? (Or maybe just backup Pi-hole's config/settings files) so they're easy to restore later down the line?
I'm running Pi-hole in a docker container. In a running system, what's the path to “04-pihole-static-dhcp.conf”? (If DHCP static leases are used in the docker, the conf file will need to be mapped to the host, to make it persistent between container reboots.)
I have two paths that are persistent /etc/pihole and /etc/dnsmasq.d
If DHCP static leases are used, will the above config file (04-pihole-static-dhcp.conf) appear in one of these two locations? If not, where would it be?
Was thinking, I have no experience with Docker but if you need to tell Docker which folders need to keep persistent data, shouldn't the log files used by the Pi-hole web dashboard be included as well ?
pi@noads:~ $ ll /var/log/
drwxr-x--- 2 www-data www-data 4096 Nov 19 06:25 lighttpd
-rw-r--r-- 1 root pihole 32360 May 11 2017 pihole_debug.log
-rw-r--r-- 1 pihole pihole 415801 Nov 24 00:00 pihole-FTL.log
-rw-r--r-- 1 dnsmasq root 50665 Nov 24 01:25 pihole.log
Its not really static addressing but rather just a reservation for when a particular MAC address comes knocking at the door.
It doent proxy but does forwarding and caching for DNS lookups.
Pi-hole (dnsmasq) forwards client DNS lookups to upstream DNS servers if it doesnt have the particular DNS record cached already.
When I said static addressing, I meant at the client. If a DNS entry is set, that's it.
Anyway, as I have PI-Hole configured, it first parses name requests against it's lists, then forwards them upstream to 8.8.8.8. Locally, my router is set to bounce name requests to Pi-hole. This is given.
On the other hand, with DHCP settings;
If Pi-hole answers a DHCP request, an IP address is handed out. (In addition to that.) What I'm asking is, if the DNS entry on the DHCP client is set to "Auto", does Pi hole set the DNS address (as it's own) as part of the DHCP process, or is the "Auto" DNS address set later by the gateway/router?
I know this is exhaustive, but I'm looking at an odd use case.
P-hole's dnsmasq will give the clients an IP address, subnet mask, gateway and DNS servers through the DHCP process.
DHCP can hand out man more types of options like for example NTP for time server or "workgroup" for windows.
Have a look here for what options DHCP can push to the clients:
Ps, had to lookup exact definition of proxy again as I was mistaken.
Yes it is a caching DNS proxy.
Partly true.
If configure dnsmasq, you can push any IP address for DNS resolution to the clients using the DHCP options from the wiki.
It doesnt need to be Pi-hole's own one (but you break Pi-hole if you do).
Oh the humor thing, it's surprising to see a forum that's so responsive (to NOOB questions ).
On the NOOB thing, we may be in competition.
Even after pecking around the periphery of Linux for awhile, the guru's still never cease to amaze. As it seems, one or two I know could gin up a single command line (with switches, arguments, etc.) that could output a hot stock pick.
While it wasn't my field (just a very closely related aspect) I wasted a lot of time in the Windows graphical environment. Unfortunately, M$ can, and did, alter the environment and how things were done, on several occasions. (As a result, expertise / experience gained was, for the most part, a throw away.)
The command line is where it's at. While more capabilities are added regularly, in the basic's, CLI commands rarely, if ever, change.