Pfsense / NextDNS cli - client names
I've receintly setup the cli on pfsense. All is working as expected with the blocking and logging except some of the client names are showing in the logs with just a device number while others show the correct id.
All clients have static dhcp leases with their own client id's setup on pfsense . I did make some entries in the hosts file which cured the issue, but only temporarily as the hosts file enteries are lost whenever a config change is made on pfsense. I know another workaround would be to install the nextdns app on a device but thats not possible with some devices like IoT or cameras.
Anyone have any idea's ?
This solution using the discovery-dns feature reported by a user on github resolved it for me:
I used unbound (DNS Resolver) in pfsense instead of dnsmasq but it works the same way.
In the pfsense resolver settings, make sure this is checked if you want static IPs (enabled):
"Register DHCP static mappings in the DNS Resolver"
The only thing that is still quirky sometimes is when a device favors an IPv6 address. I'll still usually get a random client name logged in nextdns then.
This is how I did it:
Install NextDNS cli. After that do the ff:
1. Goto Dashboard -> Service -> DNS Resolver
1.1 Set DNS Resolver IP to somethin else, e.g. 5555
1.2 Check "Register DHP Leases in the DNS Resolver"
1.3 Check "Register Static mappings in DNS Resolver"
2. Goto Dashboard -> Diagnostics -> Edit File
2.1 Browse "user/local/etc/nextdns.conf"
2.1 Make sure the contents are the ff:
listen LAN ip:53
listen Opt1 ip:53
listen Opt2 ip:53
listen OPt3 ip:53
Stop and Restart DNS Resolver and NextDNS
1. Only Host Names are logged.
2. "Dashboard -> Status -> DHP Leases" may not work