Tool to edit custom conf (/etc/dnsmasq.d/*)

Given that pi-hole is a DNS/DHCP server solution, it would be very nice to have a way to edit/create custom configuration files from within the AdminLTE UI.

Pi-hole already uses the files within /etc/dnsmasq.d/, allowing the user to create for instance a 02-custom.conf file in order to add things like custom dns entries, servers, override config settings, etc. It is a little bit of a drag to have to SSH into the box/docker container to add/edit custom config. :blush:

I am suggesting something along the lines of webproc, a webui editor that is bundled with jpillora's dnsmasq solution. Very, very simple, but you can edit the file and issue a DNS server restart command:

It could be put under the Tools section of the AdminLTE UI.

This would be extremely helpful to those of us who use pi-hole as our primary DNS server for our local network. I tried bundling pi-hole and jpillora's solution in one docker stack but ended with unpredictable consequences. :frowning:

Do you envision this tool allowing users to edit other files that are typically modified to change Pi-Hole behavior, or is the tool limited to dnsmasq files.

For example, users frequently make changes to /etc/pihole-FTL.conf, /etc/hosts and others.

While a global ability would be cool to have, one would have to consider the different environments pihole can be installed in, etc. As such perhaps you'd want to limit it to only areas that pi-hole primarily deals with, plus, with care not to expose things that an inexperienced user might change resulting in a system break. I suppose a big disclaimer in red saying "Do not make configuration changes unless you know what you are doing" could help.

But like in the instance of dnsmasq, if it were to be a tool for just that, I would not show 01-pihole.conf for those same reasons. Maybe just creating/editing a file like 02-custom.conf.

If global, I guess a list of available files could be shown for editing. The trick would be to be able to show the user the controls necessary to apply those changes.

I second this request. If you want to use YonderTV to cover some stuff separate from the normal traffic this would be a useful feature. With the growing cord-cutting having smart TV devices which use internet access might want to follow a different traffic path than standard PC browser.

Hello, just a thought - make a folder, make symlinks of some custom.conf / host/ dns/ everythingelse files in there and give access to edit them only.

Did this ever got anywhere?
I too would love to see this integrated to the admin interface.
Alternatively have you tried the jpillora's method listed above on a pi-hole?

1 Like

I'd love to see capability to manage/edit custom conf files added. After implementing pi-hole (I'd used dnsmasq prior to this) - I personally found a number of issues with DNS where geo-location was occurring. Because of this I've rewritten some of the code to provide a page to add/remove custom server mappings (e.g. map specific domain -> dns server). This has made my life a lot easier (although not too hard to shell in and add a row to the custom file).

3 Likes

Hi, can you show me how to have this on my pihole?