Static DNS / IP correlation GUI under tools


#1

Hello!

I would like to humbly request an addition to the GUI to include a static DNS/IP mapping to be resolved by the pihole software.

At the moment this can easily be accomplished via the cmd line by editing the /etc/hosts or even /etc/dnsmasq.d/05-custom.conf

I would imagine more than just myself would benefit from this.

Thanks!!


#2

reddit link


#3

I agree.

I’d also suggest a URL shortener to create short links akin to bit.ly or something like that.

pi/foo for example that could point to some long URL. pi would take you to the interface that let’s you create those links.


#4

It would help us with deciding how to implement these requests if you could also explain a little how it would help us block ads more effectively, or what benefit it would bring to the users. Some features go a bit beyond the scope of ad-blocking and are better served by other utilities and software packages, so knowing what the end goal is can be really helpful to us.


#5

I will fully reply shortly . Thank you.


#6

The URL shortener is certainly a stretch when it comes to the primary goal of ad blocking. That totally makes sense and I consider that a “nice to have” and a neat feature.

The static DNS entries are a bit more fuzzy. To block ads most people are using the pi.hole as a replacement DNS server for their network. I’d put forth that since the pi.hole is used as a replacement DNS server, being a good DNS server is part of the core purpose of the project. Not the entire or primary purpose, but part of the method used to achieve that purpose.

Having the ability to set static DNS entries to hosts in an internal network would allow me to use the pi.hole as the source of truth for DNS on my network. That makes it a complete solution in regards to DNS entries and resolution and makes it a better all around solution. That means I don’t have to run separate infrastructure to supply those static and local entries. I hope that makes sense.


#7

Thanks for the comments, we’ll look in to the best way to edit the hosts files securely via the web interface. I think there’s been some talk about the feature and it’s something that is under consideration for a future release.


#8

Linuturk,

I could not have said it better myself. PiHole has taken over as my primary DNS server in my home and home lab, so it would be nice to be able to update static entries via the web gui. I realize if I used it for DHCP this would not be an issue but that service is handled elsewhere on the edge router.

Thanks Dan!


#9

Does this fill the need?


#10

yes, but not from the GUI which is my feature request. If this is currently in the master branch, then I/we can use it now :smiley: Thanks!!


#11

I would like this as well. I use my router as a DHCP server (already had it set up and have dozens of static DHCP and DNS assignments), and have it’s primary DNS point to PiHole, which then resolves/blocks the request, and forwards it to Google’s DNS.
However, doing so causes issues.

  1. All Hosts that the PiHole sees are from the router’s hostname, unless I manually set that computer’s DNS server to be the PiHole, which causes issue number 2.
  2. If I set a computer’s DNS server to the PiHole, all entries I set in the router are ignored, and go unresolved. I have many internal DNS records for multiple devices.
    I’m comfortable with the hosts file, but would rather not go there if I didn’t have to each time I make a change (quite often.)

#12

I would like to see this feature added too. I can kind of work around it by adding the device details to the DHCP leases section under Pihole settings but that’s not really a good solution IMO.