Host Names From VLAN

I have DHCP Server running on my pfsense with both LAN and VLAN20, on my pi-hole I can see the names resolving for LAN hosts, but al the hosts from my VLAN20 only shows IP Addresses.

I have tried:
/etc/dnsmasq.d/03-vlan.conf

rev-server=192.168.20.0/24, 192.168.20.1
server=/192.168.20.in-addr.arpa/192.168.20.1

Still does not show names.

Run from your Pi-hole host machine, what do a lookup and a reverse lookup via your VLAN20 gateway address return for a VLAN20 client?

nslookup <some.hostname> 192.168.20.1
nslookup <some.vlan.20.ip> 192.168.20.1

Substitute <some.hostname> and <some.vlan.20.ip> as required, preferably for a known existing name / IP address association.

root@raspberrypi:~# nslookup FireTV_Main 192.168.20.1
Server:         192.168.20.1
Address:        192.168.20.1#53

** server can't find FireTV_Main: NXDOMAIN
root@raspberrypi:~# nslookup 192.168.20.10 192.168.20.1
** server can't find 10.20.168.192.in-addr.arpa: NXDOMAIN
root@raspberrypi:~# nslookup FireTV_Main 192.168.1.1
Server:         192.168.1.1
Address:        192.168.1.1#53

** server can't find FireTV_Main: NXDOMAIN
root@raspberrypi:~# nslookup 192.168.20.10 192.168.1.1
** server can't find 10.20.168.192.in-addr.arpa: NXDOMAIN

root@raspberrypi:~#

In pfsense VLAN 20 DHCP Server:
Client ID: FireTV_Main
IP Address: 192.168.20.10

Those results suggest that the DNS server on your 192.168.20.1 / 192.168.1.1 isn't aware of your VLAN20 hostnames.

What are the results when sending respective queries for a hostname and IP from your 192.168.1.0/24 network?

I can ping both Gateway IP's on LAN and VLAN 20, which is also each's DHCP Server.

root@raspberrypi:~# ping 192.168.20.1
PING 192.168.20.1 (192.168.20.1) 56(84) bytes of data.
64 bytes from 192.168.20.1: icmp_seq=1 ttl=64 time=0.341 ms
64 bytes from 192.168.20.1: icmp_seq=2 ttl=64 time=0.217 ms
64 bytes from 192.168.20.1: icmp_seq=3 ttl=64 time=0.250 ms
64 bytes from 192.168.20.1: icmp_seq=4 ttl=64 time=0.211 ms
^C
--- 192.168.20.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 90ms
rtt min/avg/max/mdev = 0.211/0.254/0.341/0.055 ms
root@raspberrypi:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.263 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.213 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.210 ms
^C
--- 192.168.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 108ms
rtt min/avg/max/mdev = 0.210/0.228/0.263/0.029 ms
root@raspberrypi:~# nslookup Pi400 192.168.1.1
Server:         192.168.1.1
Address:        192.168.1.1#53

** server can't find Pi400: NXDOMAIN
root@raspberrypi:~# nslookup Unifi_AP 192.168.1.1
Server:         192.168.1.1
Address:        192.168.1.1#53

** server can't find Unifi_AP: NXDOMAIN
root@raspberrypi:~# nslookup 192.168.1.254 192.168.1.1
** server can't find 254.1.168.192.in-addr.arpa: NXDOMAIN
root@raspberrypi:~# nslookup 192.168.1.2 192.168.1.1
** server can't find 2.1.168.192.in-addr.arpa: NXDOMAIN
root@raspberrypi:~# nslookup 192.168.1.1 192.168.1.1
1.1.168.192.in-addr.arpa        name = pfSense.home.arpa.

I do notice the "1.1.168.192.in-addr.arpa" address is turned around, not sure if this is normal?

Those results would further confirm that your 192.168.20.1 / 192.168.1.1 isn't aware of any of your hostnames, just its own.

A DHCP client may present a hostname during DHCP lease negotiation, but there is no requirement that a DHCP server must also register those names with a DNS server.
While the firmware of most routers would do so, there are those that won't (e.g. some of Ubiquiti's and Microtik's models that would use ISC's DHCP implementation).

There may be ways to work around this on your router, but they'd be specific for your router and firmware (I've provided two links to solution attempts I'm aware of for the manufacturers I've mentioned above :wink: ).

If you cannot find a way to educate your router, you could consider to create respective Local DNS Records within your Pi-hole.

EDIT:
Just to be sure, you probably should also check your pfSense settings for allowing port 53 UDP/TCP to your gateway addresses.
I don't actually think they are blocked, as that usually would result in a time-out, and not in NXDOMAIN as a valid answer, but that may also be fabricated by some clever firewall rules (e.g.by redirecting DNS requests rather than blocking them).

Thank you,

I will play around with it.

In past I had all the Amaxzon devices on the same network with static IP's, and DNS mapped to 192.168.1.254 that is my Pihole,at that time the host names showed up in pihole clients list. However recently I decided to split it and created a VLAN20 for all the Amazon Devices to keep them away from my LAN Network so the complete VLAN20 is pointing towards the Pihole.

So basically it is only VLAN20's IP's that are showing up in the table and the PiVPN Clients.

Not sure if it is related to my DNS Resolver on pfsense, although it should not since that is only for resolving upstream.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.