Client hostname querylog pivpn unbound pihole

Hi guys!

I'm newbie and got my pi hole up and running with unbound and pivpn.
However when I connect through vpn I see my ip in the pi hole query list as hostname like 10.8.0.7... It's not a big deal but just an annoyance.
I can't seem to get it right so a little help to put me in the right direction would be great!

The 10.8.0.7 is your client on the VPN. The VPN sets up network in that range and assigns clients to that range. There isn't a easy way that I know of for the pi.hole to associate this back to the hostname of the VPN at the end of that IP, it's sequentially assigned from a range of addresses in pivpn..

But you could use some of the methods of adding "unmanged" hosts pi-hole but It would take a lot of work on pivpn to make sure the IP address of the VPN client was statically assigned but I never explored that.

I've used https://git.io/vpn to set up VPN.

wget https://git.io/vpn -O openvpn-install.sh
sudo bash openvpn-install.sh

The created client configuration file, e.g. iphone.ovpn, is also the name I see in the 'Client' column in the Pi-hole Query Log. I don't see the clients IP (10.8.x.x) in the Query Log but "iphone".

Here is some bread crumbs on integrating hosts into DNSMASQ files when using OpenVPN. pivpn at the core is OpenVPN so with a few tweaks this may work for you.