In this article
Clientless DNS filtering sends a Windows device's DNS queries to DNSFilter over DNS over HTTPS (DoH), with no Roaming Client installed. Setting up a Clientless deployment requires a DNSFilter dashboard role other than read-only or policy-only. Clientless filtering is available on Plus plans and above.
Prerequisites
Clientless DNS filtering on Windows requires:
- A device running a supported OS for Clientless
- Administrator access to the device
- A DNSFilter dashboard role other than read-only or policy-only
- For networks that filter outbound traffic: outbound TCP 443 to
103.247.36.150and103.247.37.150, so the device can reach DNSFilter - Block Page on HTTPS websites: blocked HTTPS sites show a certificate warning instead of the Block Page unless the DNSFilter SSL/TLS certificates are installed on the device.
Step 1: Create the Clientless deployment
To create a Clientless deployment for a Windows device:
- From the DNSFilter dashboard, navigate to Deployments > Clientless.
- Select Add Clientless Device.
- Enter the deployment details:
- Organization (MSP dashboard only): the Organization the Clientless Device belongs to
- Name: a name for the Clientless Device, which cannot be changed after the deployment is created
- Site: the Site the deployment connects to
- Policy/Schedule: leave as Inherit from Site, or select a different policy or schedule
- Block Page: leave as Inherit from Site, or select a different block page
- From DoH Type, select Windows.
- Select Generate DoH Endpoint.
- Copy the DoH address and the Preferred DNS and Alternate DNS resolver addresses.
The DoH address has the form https://doh.dnsfilter.com/<unique-id>, and the unique ID identifies the deployment. If the address is altered or trimmed, DNS stops working on the device.
Step 2 (Optional): Add local domains
Any internal domain, including a .local Active Directory domain or another split-DNS zone, needs a Name Resolution Policy Table (NRPT) rule that sends those names to the internal DNS server.
To add an NRPT rule for internal domains on a Windows device:
- Open PowerShell as an administrator.
-
Run the following command, replacing the namespace and IP address with the internal domain and internal DNS server:
Add-DnsClientNrptRule -Namespace '.corp.example.com' -NameServers '<internal-dns-ip>'
Queries that match the rule are sent unencrypted to the internal DNS server, because the Windows DNS Server role does not serve DoH. On a domain-joined device that is already running, cached state hides a missing rule until the next restart. A rule added after that restart restores DNS immediately, but Group Policy stays broken until the device restarts again.
Step 3: Configure DoH on the device
The Settings app and PowerShell store the DoH configuration separately, so a device configured in Settings shows nothing in Get-DnsClientDohServerAddress. Audit and remove the configuration with the same method that set it.
Warning: On a domain-joined device, add the NRPT rule in Step 2 (Optional): Add local domains before configuring DoH. Without it, domain authentication, Kerberos, and Group Policy fail, and the failure may not appear until the next restart.
Option 1: Configure in the Settings app
Caution: Use only
103.247.36.150 and 103.247.37.150 with the
Clientless template. DNSFilter's other resolver addresses, such as
103.247.36.36 and 103.247.37.37, accept the
template but run plain DNS with no deployment identity.
To configure Clientless DNS filtering on a Windows device in the Settings app:
- From Settings, navigate to Network & internet and select the active Ethernet or Wi-Fi connection.
- Next to DNS server assignment, select Edit, then select Manual.
- Turn on IPv4, enter
103.247.36.150in Preferred DNS, and enter103.247.37.150in Alternate DNS. - For both addresses, set DNS over HTTPS to On (manual template).
- In each DNS over HTTPS template, enter the DoH address exactly as copied from DNSFilter.
- Set Fallback to plaintext to Off for both, then select Save.
Clientless DNS filtering is active when queries for this deployment appear in Reporting > DNS Query Log, under Clientless in the Deployments filter. To test name resolution on the device, use Resolve-DnsName instead of nslookup, which times out with DoH on even when DoH is working.
Option 2: Configure with PowerShell
To configure Clientless DNS filtering on a Windows device with PowerShell:
- Open PowerShell as an administrator.
-
Run the following commands, replacing the template in each with the DoH address exactly as copied from DNSFilter:
Add-DnsClientDohServerAddress -ServerAddress 103.247.36.150 -DohTemplate "https://doh.dnsfilter.com/<unique-id>" -AutoUpgrade $true -AllowFallbackToUdp $false Add-DnsClientDohServerAddress -ServerAddress 103.247.37.150 -DohTemplate "https://doh.dnsfilter.com/<unique-id>" -AutoUpgrade $true -AllowFallbackToUdp $false
-
Run the following command, replacing
<index>with the interface index:Set-DnsClientServerAddress -InterfaceIndex <index> -ServerAddresses 103.247.36.150,103.247.37.150
Windows accepts a template with {?dns} appended or with http:// in place of https://, but either leaves the device with no DNS and no error. The -AutoUpgrade $true parameter is required. It defaults to $false, and without it the device sends no encrypted DNS, so DNS stops working with no error shown. The following commands correct existing entries without adding them again:
Set-DnsClientDohServerAddress -ServerAddress 103.247.36.150 -AutoUpgrade $true Set-DnsClientDohServerAddress -ServerAddress 103.247.37.150 -AutoUpgrade $true
Clientless DNS filtering is active when queries for this deployment appear in Reporting > DNS Query Log, under Clientless in the Deployments filter. To test name resolution on the device, use Resolve-DnsName instead of nslookup, which times out with DoH on even when DoH is working.
Note: To set whether Windows uses DoH through Group Policy, select Configure DNS over HTTPS (DoH) name resolution, and then select Allow DoH, Prohibit DoH, or Require DoH. Do not select Require DoH on domain-joined devices; the Windows DNS Server role does not answer DoH, so internal domain resolution stops.
Deploy to many devices with an RMM script
The RMM script sets up Clientless DNS filtering on many Windows devices through a remote monitoring and management (RMM) tool, in place of Steps 1 through 3. Each device gets its own Clientless deployment, named with the device's computer name. Running the script again does not create duplicates.
What the script requires
The script requires:
- A DNSFilter API key from an admin account, created in Account Settings > Security > API Keys. A dedicated API key for the script is recommended. When a key expires, devices that are already set up keep working, and new runs fail until a new key is supplied.
- The Site ID. From the DNSFilter dashboard, navigate to Deployments > Sites and edit the Site. The Site ID is the number at the end of the page address, such as
…/deployments/sites/edit/123456. - For Sites with local domains, such as an Active Directory domain: the local DNS servers listed on the Site
- An RMM that can run the script as SYSTEM
By default, each deployment inherits the Site's policy or schedule and Block Page. The script can also assign a different policy, schedule, or Block Page to each device.
What the script does
Each time the script runs on a device, it:
- Finds the device's Clientless deployment by computer name, or creates one.
- Adds the DNSFilter Root CA and DNSFilter Root CA G1 certificates to the device's trusted roots, so blocked HTTPS sites show the Block Page. The script skips any certificate that is already trusted, such as one deployed through Group Policy.
- Sends all DNS queries to DNSFilter over DoH with the device's own ID. Queries for the Site's local domains are sent to the local DNS servers listed on the Site instead of to DNSFilter. Network adapter settings do not change, so Wi-Fi and adapters added later are covered.
- Checks with DNSFilter that DNS is encrypted and identified as the device. If the check fails, the script undoes its DNS changes and the device returns to the network's normal DNS servers, so name resolution keeps working.
Run the script
To run the script with an RMM:
- Download the RMM script, add it to the RMM, and set it to run as SYSTEM.
- Provide the API key and Site ID in one of the following ways:
- As the script or environment variables
DNSFILTER_API_KEYandDNSFILTER_SITE_ID. This option keeps the key out of job logs. - As parameters:
-ApiKey <key> -SiteId <id> - In the two
FILL INlines at the top of the script, for tools that cannot pass values, such as Intune
- As the script or environment variables
- Run the script on the target devices.
The script returns one of the following exit codes:
-
0: Setup completed. -
1: Setup failed, and DNS was rolled back to the network's normal servers. -
2: DNS is encrypted but not yet recognized as the device. Wait a few minutes and run the script again.
The script logs each run to C:\ProgramData\DNSFilter\Clientless\install.log.
The script stops without making changes when Group Policy already deploys NRPT rules, or when another product or VPN already sends all DNS through its own rule. The log states the reason.
Remove Clientless DNS filtering
The Settings app and PowerShell store the DoH configuration separately, so remove it with the same method that set it.
Option 1: Remove in the Settings app
To remove Clientless DNS filtering from a Windows device in the Settings app:
- From Settings, navigate to Network & internet and select the active Ethernet or Wi-Fi connection.
- Next to DNS server assignment, select Edit.
- Set DNS over HTTPS to Off.
- Set DNS server assignment to Automatic (DHCP), then select Save.
Option 2: Remove with PowerShell
To remove Clientless DNS filtering from a Windows device with PowerShell:
- Open PowerShell as an administrator.
-
Set a working DNS server with the following command, replacing
<index>with the interface index and<dns-ip>with the DNS server address:Set-DnsClientServerAddress -InterfaceIndex <index> -ServerAddresses <dns-ip>
Set the DNS server explicitly rather than resetting it, because a reset leaves a statically addressed device with no DNS server.
-
Remove the DoH server entries with the following commands:
netsh dnsclient delete encryption server=103.247.36.150 netsh dnsclient delete encryption server=103.247.37.150
-
If an NRPT rule was added in Step 2 (Optional): Add local domains, run the following command to remove it, replacing the namespace with the internal domain:
Get-DnsClientNrptRule | Where-Object Namespace -eq '.corp.example.com' | Remove-DnsClientNrptRule -Force
-
Clear the DNS cache with the following command:
Clear-DnsClientCache
Removal takes effect immediately; no restart is required.
Option 3: Remove with the RMM script
To remove a configuration that was set up with an RMM script, run Install-DNSFilterClientless.ps1 with the -Uninstall parameter. No API key is required. DNS returns to the network's normal servers, and the Block Page certificates are removed only if the script added them. The Clientless deployment stays in the dashboard until it is deleted from Deployments > Clientless.
What to expect
When DNSFilter is unreachable, DNS stops entirely because Windows does not fall back to plain DNS. Captive Wi-Fi portals, such as hotel networks, and firewalls that block TCP 443 leave the device with no DNS. The network adapter still reports as healthy, so the failure does not look like a DNS problem. Windows resumes within about five seconds of DNSFilter becoming reachable, without a restart or clearing the DNS cache.
On dual-stack networks, the router's IPv6 DNS server can answer queries in plain text while DNSFilter is unreachable, so some queries may bypass filtering.
Comments
0 comments
Please sign in to leave a comment.