Hi pihole,
I noticed that there is no way in the webinterface to add a dns record or atleast i didnt find it yet.
Can you add something so i can easly add dns records to my pihole using the webinterface?
Currently i just add them using the terminal and edit the /etc/pihole/local.list file and restarting dnsmasq after.
Just a simple text editor in the webinterface would work fine.
If you can add this it would be greatly appreciated!
kind regards,
Dylan.
Are you talking about client hostnames or something else?
There are two ways to accomplish this:
use Pi-hole's built in DHCP server
use your router's DHCP server and modify /etc/hosts on your Pi-hole machine
Use Pi-hole's DHCP server
When you enable Pi-hole's DHCP server, you have the option to assign DHCP reservations and pair them with a hostname. Just make a reservation for every device on your network.
[image]
Edit /etc/hosts on your Pi-hole
The other option is useful if you want to keep your existing DHCP server (usually your router) and …
Or perhaps this is what you are asking for:
pi-hole:development
← pi-hole:new/host-record
opened 01:47PM - 22 Feb 17 UTC
**By submitting this pull request, I confirm the following (please check boxes, … eg [X]) _Failure to fill the template will close your PR_:**
***Please submit all pull requests against the `development` branch. Failure to do so will delay or deny your request***
- [X] I have read and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md).
- [X] I have checked that [another pull request](https://github.com/pi-hole/pi-hole/pulls) for this purpose does not exist.
- [X] I have considered, and confirmed that this submission will be valuable to others.
- [X] I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
- [X] I give this submission freely, and claim no ownership to its content.
**How familiar are you with the codebase?:** 10
---
Implementation of a feature request on [Discourse](https://discourse.pi-hole.net/t/domain-redirect/1826/) .
Curent behavior: The Android OpenVPN client is not able to connect to the VPN server when the Android device is within the internal network.
```plain
pi@raspberrypi:~# pihole -a hostrecord home.mydomain.de 192.168.1.10
Setting host record for home.mydomain.de -> 192.168.1.10
pi@raspberrypi:~# grep 'home' /etc/dnsmasq.d/01-pihole.conf
host-record=home.mydomain.de,192.168.1.10
```
Afterwards: The Android OpenVPN client is able to connect to the VPN server and shows its internal IP (`192.168.1.10`).
---
This command is IPv6-aware. Use:
```plain
pi@raspberrypi:~# pihole -a hostrecord home.mydomain.de 192.168.1.10,2003:89:xxxx:xxxx::xxx
Setting host record for home.mydomain.de -> 192.168.1.10,2003:89:xxxx:xxxx::xxx
```
`dig aaaa home.mydomain.de` will return the IPv6 address on the corresponding device in the internal network. Note that should not be necessary when using the proper global scope IPv6 address.
---
It is also possible to remove the configuration by not specifying any host/IP:
```plain
pi@raspberrypi:~# pihole -a hostrecord
Removing host record
pi@raspberrypi:~# grep 'home' /etc/dnsmasq.d/01-pihole.conf
```
Result: The configuration has been removed. The OpenVPN server is, again, not able to connect.
---
_This template was created based on the work of [`udemy-dl`](https://github.com/nishad/udemy-dl/blob/master/LICENSE)._