Names (custom) or device name instead of IP's

Hey guys
it would be cool if we could change an ip that we know to something like my iPhone or examples_Laptop
that would be way easier to see where some problems or other things come from than locking up the ip each time i wonder...

a simple small Pen button would be great :wink:

Hi,

this is discussed several times here and not a big problem, if you have not so much clients. Simply edit the hosts file: /etc/hosts

But maybe this can also be implemented in dashboard, if this is what you mean?

After editing hosts file it looks like this for me:

3 Likes

If you use the Pi-hole DHCP server this should work out-of-the-box (it will use the host name the device reported). You can override that when you specify a host name in a static assignment.

1 Like

thanks for theese quick responses
so [quote="DL6ER, post:3, topic:3459"]
If you use the Pi-hole DHCP server this should work out-of-the-box
[/quote]

that is sadly not an option i knew that this was a thing that i could do but i think that is a bit of an problem fore some users...

I do also remember this option but as you say that's not a good option for many clients cause its very time-consuming

Exactly :wink: i would be very easy and no users would have any problems anymore :bananadance:
@DL6ER is this a possibility to make?
its not verry much right? just that the name is then written from the web-interface in the /etc/hosts would be really cool tho
the button could be the same as the one before the Whitelist button :wink:

1 Like

Doing this in an more automated fashion is not easy - the reason being permissions!

/etc/hosts is a file that is owned by the operating system and should only be modified with sudo permissions. Hence, our current (and future) API won't be able to do this. Please understand this rather as a security feature than a limitation, because it means the the API cannot (also not if there would be e.g. a bug) mess around with your system's most precious config files (which is a good thing!).

1 Like

ooooh okay yeah i see what the problem is there.
(idea)
is it possible to let the host-files like they are but on the web-interface show an name etc.? like if the web-interface wants to show something like 192.168.10.10 it shows NB-Kint like it would store the name in an other file..?
maby something like that would work ^^

That may work but I don't think that it is a good idea (will add a lot of complexity with litte to no gain in usability). Please modify the hosts file as thir is the historic place where this kind of information should be stored.

2 Likes

yeah you'r right ^^
maby in the future there an easier way :wink:

1 Like

I too think it would be a great option if added under a heading like dns advanced settings etc

There may be people that can install pi-hole as you have a nice easy install script, but some people may have trouble editing system files.

The main issue some things don’t work on the network if pi-hole is not used as the dhcp server. I have to use the dhcp server built into a server I run but wish to use pi-hole as dns, I have clients that could use your nice web interface but not edit files, just as others have explained in the same post.

Just thought of another plus point ,
Your web interface works great on mobile or tablet, if added to gui you could enter details on a mobile device as there is no way to edit hosts file via tablet or mobile :wink:

Next to the ideas provided above , since v5.0 one can set "Local DNS records" which can be used to "show names" instead of IPs in Pihole's web interface.

1 Like