Anyone know of a good way to automatically clean up MS DNS records for VPN users? Our users are never on for more than eight hours at a time and aging/scavenging just isn’t the best solution for such an aggressive timeframe.
I find myself constantly going into DNS and looking for duplicates and deleting them so PDQ will work correctly. We use Pulse Secure for VPN.
I managed to successfully resolve this. This may be useful to others having this issue, it’s not clear and the documentation on use cases aren’t great.
So basically our VPN appliance doesn’t just relay DHCP requests, it proxies them so that all lease requests appear to come from the inside interface of the appliance entirely. This severs the link between the requestor and provider and dynamic DNS cannot remove the entry once the lease is removed.
The solution was to move DHCP inside to a MS DHCP server. But that wasn’t all. I also had to create a service account and on the advanced tab of IPV4 for the server enable “DNS Dynamic Update Registration Credentials” This option will allow the DHCP server to add an ownership entry to the DNS record so that it has permission to delete the record when the lease is removed. (If you run Failover for DHCP these settings need to be on each scope/server)
At first, I enabled Dynamic updates to always dynamically update DNS records and to remove the lease when done. And it still wasn’t working. I checked the DHCP log and saw the DNS record update was failing. I checked the security of the DNS entry and saw my registration account wasn’t there.
I had to enable DHCP name protection on the scope. It turns out that the VPN appliance orphans the DHCP/DNS update relationship completely. MY DHCP scope has to completely own the DNS record created by the DHCP lease. Once I enabled name protection, the records started to show ownership from the service account and DNS entries are removed instantly on lease termination/expiration.
It took a good amount of labbing and staring at wireshark captures to figure this out, I hope someone finds this useful.
Can you use a different DHCP server for the VPN subnet? I use checkpoint as our VPN and I have the option to configure a scope just for VPN users and checkpoint deletes the lease after the max login time, in our case its 12 hrs.
PDQ should handle stale addresses - it will test all addresses it finds. In Options->Preferences->Scanning, make sure “Ping before scanning” is enabled, and Wake-on-LAN scanning is disabled.