Installing the DNS-over-HTTPS (User Context) Tool on Windows

Installing the DNS-over-HTTPS (User Context) Tool on Windows

The Barracuda SecureEdge DoH Tool is a lightweight Windows service that encrypts a device’s DNS queries. The SecureEdge DNS over HTTPS (DoH) tool is a Windows service that routes all device DNS queries via DoH to enforce your organization's policies transparently. No changes to individual applications or network adapters are required. Once installed, the service (SecureEdgeDoHTool) auto-starts on boot and restarts on failure.

The following installation methods are supported. Choose the option that best matches your deployment scenario.

Installation method

Recommended use

Deployment approach

Installation method

Recommended use

Deployment approach

Standalone installer

Single-machine installation or manual testing.

Run the signed executable directly on the target Windows device.

Microsoft Intune

Fleet-wide deployment across multiple managed devices.

Package and deploy the installer as a Win32 app in Microsoft Intune.

PowerShell script from ZIP

Installation from extracted package files when you prefer to manage the extracted contents manually.

Extract the ZIP package and run Install-SecureEdgeDoHTool.ps1 directly from the extracted folder.

All three methods install the same LocalSystem service (SecureEdgeDoHTool) and use the same configuration parameters.

Installed file locations

Item

Path

Item

Path

Program Files

C:\Program Files\Barracuda\SecureEdge DoH Tool

Service Log

C:\ProgramData\Barracuda\SecureEdge DoH Tool\service.log

Install Transcript

C:\ProgramData\Barracuda\SecureEdge DoH Tool\install.log

Windows Service Name

SecureEdgeDoHTool

Before You Begin

  • You need administrator privileges because the installer creates a Windows service and intercepts DNS, both of which require Administrator or SYSTEM rights. If you run the installer without elevation, it exits with an error.

  • Download the SecureEdge EXE, PowerShell script and Intune package from the Barracuda Networks download portal.

  • Identify your DoH endpoint: In SecureEdge Manager, go to Infrastructure > DNS Locations and open the DNS location for your device:

    • Copy the DNS over HTTPS URL value (for a fixed endpoint) or the DNS over HTTPS URL (User Context) value (for a per-user template). Keep the <user_email> placeholder literal, the agent substitutes the signed-in user's email at runtime.

    • Copy the DNS Server IP address. You must supply this as the -DohIp parameter when installing in intercept mode (the default). The agent intercepts all UDP/53 traffic, so the DoH endpoint must be reachable by IP rather than resolved through the interceptor, which can create bootstrap deadlocks for hostname endpoints. Pinning the IP prevents this, while the URL hostname still supports SNI, certificate validation and templates.
      For more information, see How to Add a DNS Location in SecureEdge.

       

      user-context.png

       

  • List local domains must be bypassed. This is necessary for authentication sites that only the local domain controller can resolve.

  • Co-ordinate with your AV/EDR/XDR and VPN teams before a wide rollout. The tool loads a kernel-level DNS interception driver. Endpoint detection tools commonly flag driver-loading services.

Method 1. Install with SecureEdgeDoHToolSetup-<version>.exe

Use this method to install the DoH Tool on a single Windows machine. A single self-contained executable that embeds the entire payload: the SecureEdgeDoHTool.exe, the WinDivert driver and the install scripts, and forwards your parameters to the installer.

Step 1. Copy the Exe to the Target Machine

Download SecureEdgeDoHToolSetup-<version>.exe from the Barracuda download portal and copy it to the target machine.

Step 2. Open an Elevated Terminal

Right-click PowerShell (or Command Prompt) and select Run as administrator. The exe does not self-elevate. If you run it from a non-elevated session, it prints an error and exits.

Step 3. Run the Exe with Your Endpoint

Navigate to the folder containing the exe and run one of the following commands. Choose the example that matches your deployment:

# Per-user template endpoint, DoH host IP pinned (recommended for intercept mode) .\SecureEdgeDoHToolSetup-<version>.exe -DohTemplate "https://dns.example.com/dns/<tenant-guid>/user/<user_email>/dns-query" -DohIp "10.20.0.10,10.20.0.11" -ExemptNetworks "10.0.0.0/8" -BypassDomains "corp.local,internal.example.com"
doh1.png

 

# Minimal: a fixed public resolver, no per-user template .\SecureEdgeDoHToolSetup-<version>.exe -DohUrl "https://1.1.1.1/dns-query" -DohIp "1.1.1.1"
# Fail-closed: drop queries if DoH fails instead of leaking to plaintext DNS .\SecureEdgeDoHToolSetup-<version>.exe -DohTemplate "https://.../user/<user_email>/dns-query" -DohIp "10.20.0.10" -Failsafe:$false
# Deploy a ready-made appsettings.json verbatim (a relative path resolves against this folder) .\SecureEdgeDoHToolSetup-<version>.exe -AppSettingsFile ".\appsettings.json"

Note: On first run, the exe prints unpacking components, please wait ... while it extracts the embedded payload. This can take up to a minute. Do not close the terminal window during this step.

Step 4. Verify the Installation

Run the following commands to confirm the service is running and resolving queries through DoH:

Get-Service SecureEdgeDoHTool

The service status should show Running.

doh4.png
  • After the service starts, run the following command:

nslookup www.cnn.com
doh7.png
  • To verify the DNS-over-HTTPS service, open C:\ProgramData\Barracuda\SecureEdge DoH Tool\service.log and confirm the query appears with the [doh] tag.

doh6.png
  • To confirm the user's email, the service resolves per-user template substitution. Run the following command:

& "C:\Program Files\Barracuda\SecureEdge DoH Tool\SecureEdgeDoHTool.exe" --whoami
doh2.png

You can find the install log at C:\ProgramData\Barracuda\SecureEdge DoH Tool\install.log.

Example of a Successful/Unsuccessful Configuration

Successful Validation

Run the command below to verify that DNS queries resolve through the configured DNS-over-HTTPS service and that the SecureEdge DoH Tool works correctly.

nslookup -q=TXT pingdom.bcs.barracudanetworks.com
good-nslookup.png

Failed Validation

The DNS query times out and no TXT record is returned. This indicates that DNS traffic is not reaching the SecureEdge DoH service and may be redirected, intercepted, or blocked by another component.

bad-nslookup.png

 

Uninstall (with the Same Exe)

Run the same installer with --uninstall as the first argument.

Run from an elevated terminal:

.\SecureEdgeDoHToolSetup-<version>.exe --uninstall # remove service + files + WinDivert driver (keeps logs) .\SecureEdgeDoHToolSetup-<version>.exe --uninstall -RemoveWinDivertDriver:$false # keep the WinDivert driver in place
doh8.png

Note: By default, uninstalling removes the WinDivert driver and releases any lock on WinDivert64.sys, helping prevent “file in use” errors during a later reinstall. Use -RemoveWinDivertDriver:$false only if you need to keep the shared WinDivert driver service in place, for example because another tool on the machine depends on it.

Show Help

.\SecureEdgeDoHToolSetup-<version>.exe --help

 

Method 2. Deploy with Microsoft Intune

Use this method to deploy the payload fleet-wide as a Win32 app. The DoH template and exemptions are set in the install command, so one app definition provisions every assigned device.

Step 1. Download the Files

Download the SecureEdge EXE and Intune package from the Barracuda Networks download portal.

Step 2. Create the Win32 app in Intune

  1. In the Microsoft Intune admin center, go to Apps > Windows.

  2. In the Windows apps tab, click + Create.

    click-create.png
  3. The Select app type window opens. Select Windows app (Win 32) from the drop-down menu and click Select.

  4. The Add App window opens. Click Select app package file.

  5. Upload the “SecureEdgeDoHTool-<version>.intunewin” as the app package file and click Ok.

    upload.png
  6. On the App information tab, specify the values for the following:

    • Name – Enter a name e.g., SecureEdge DoH Tool <version>.

    • Description – Enter a brief description, such as SecureEdge DoH Tool <version>.
      Under Preview, enter SecureEdge DoH Tool <version>.

    • Publisher – Enter your organization e.g., Barracuda Networks.

      app-info-intune.png
  7. On the Program tab, specify the values for the following:

    • Install command – Enter install command e.g., powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\Install-SecureEdgeDoHTool.ps1 -DohTemplate
      "<https://dns.example.com/dns/<tenant-guid>>/user/<user_email>/dns-query" -DohIp "10.20.0.10,10.20.0.11" -ExemptNetworks "10.0.0.0/8,172.16.0.0/12" -BypassDomains "corp.local,internal.example.com"
      Note: In the Install command, enter the “DNS over HTTPS URL (User Context)” template, and DohIP retrieved in DNS location setup after the -DohTemplate parameter.

    • Uninstall command – Enter uninstall command e.g., powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\Uninstall-SecureEdgeDoHTool.ps1

    • Uninstall behavior – Ensure that System is selected.

    • Device restart behavior – Select No specific action from the drop-down menu.

      prg-intune.png
  8. Click Next.

  9. On the Requirements tab, specify the values for the following:

    • Check operating system architecture – Select Yes and check the box Install on x64 system.

    • Minimum operating system – Select minimum operating system. E.g., Windows 10 1809 / Windows 11.

      requirment-intune.png
  10. Click Next.

  11. On the Detection rules tab, specify the values for the following:

    • Rules format – Select Use a custom detection script.

    • Script file – Upload the “Detect-SecureEdgeDoHTool.ps1".

    • Run script as 32-bit Select – Select No. Note: The script reads the service's install path and checks the installed version — running as 32-bit may cause it to read the wrong registry hive. Update the $MinVersion variable in the script each time you deploy a new version. Intune uses this to identify devices that need an upgrade.

      detection-rule.png

       

  12. Click Next.

  13. On the Dependencies and Supersedence tab, skip them and click Next.

  14. On the Assignments tab, assign the script to the required device group (not a user group). The service runs as LocalSystem and does not require user context to install.

  15. Click +Add group, add the group and click Select. Click Next.

    addroup.png
  16. On the Review + create tab, review the configuration, and click Create.

  17. You can see application “SecureEdge DoH Tool <version>” created successfully.

    se-doh.png

 

Important note related to Install command:

The install command is where the DoH endpoint and exemptions are configured. Enter the entire command on one line in the Install command field. Replace the placeholder values with your organization's settings:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\Install-SecureEdgeDoHTool.ps1 -DohTemplate "https://dns.example.com/dns/<tenant-guid>/user/<user_email>/dns-query" -DohIp "10.20.0.10,10.20.0.11" -ExemptNetworks "10.0.0.0/8,172.16.0.0/12" -BypassDomains "corp.local,internal.example.com"

Angle brackets in the install commands:

The <user_email> placeholder includes angle brackets (< and >) in the install command. This is acceptable in the Intune install-command field because it is not interpreted as shell redirection. If you wrap the command in cmd.exe, quote it so < and > are not treated as redirection operators.

Step 4. Verify Deployment

After Intune deploys the app to a test device:

  • On the device, run the following commands:

    • Run Get-Service SecureEdgeDoHTool to confirm the service is running.

    • Run nslookup example.com.

    • Verify C:\ProgramData\Barracuda\SecureEdge DoH Tool\service.log for the [doh] tag on the query.

  • In Intune, the app shows Installed once the detection script exits 0 and outputs confirmation that the service exists at the expected version.

  • Per-user identity under SYSTEM: confirm that the per-user DoH endpoint resolved the correct user email by running the following from an elevated terminal:

psexec -s "C:\Program Files\Barracuda\SecureEdge DoH Tool\SecureEdgeDoHTool.exe" --whoami

Uninstall

For an Intune Win32 app deployment, run the scripts from an elevated terminal as:

powershell.exe -ExecutionPolicy Bypass -File .\Uninstall-SecureEdgeDoHTool.ps1.

Method 3. Install SecureEdgeDoHTool.ps1 Using the PowerShell Script (from the zip)

Use this method to run the install script directly from the extracted zip, without the executable wrapper.

Step 1. Download and Extract the Zip

Download SecureEdgeDoHTool-x.x.x-win-x64.zip from the Barracuda Download Portal and extract it to a local folder.

Step 2. Open an Elevated PowerShell Terminal

Right-click PowerShell and select Run as administrator. Navigate to the folder where you extracted the zip.

Step 3. Run the Install Script with your Endpoint Parameters

Run Install-SecureEdgeDoHTool.ps1 from the extracted folder. The parameters are identical to the other installation methods replace the placeholder values with your organization's settings:

.\Install-SecureEdgeDoHTool.ps1 ` -DohTemplate "https://dns.x.barracudanetworks.com/dns/<tenant-id>/user/<user_email>/dns-query" ` -DohIp "4.158.236.109" ` -ExemptNetworks "10.0.0.0/8" ` -BypassDomains "corp.local"

If you have a pre-built configuration file, you can pass it directly instead:

.\Install-SecureEdgeDoHTool.ps1 -AppSettingsFile .\appsettings.json

Note: The -Doh* shaping parameters are ignored.

Step 4. Verify the Installation

Confirm the service is running and that DNS queries are being routed through DoH:

Get-Service SecureEdgeDoHTool

The service status should show Running.

nslookup -q=TXT pingdom.bcs.barracudanetworks.com

A successful result returns a TXT record in the form dns_proxy=x.x.x, confirming the DoH proxy is active.

Uninstall (Using PowerShell Script )

Use the PowerShell uninstall script to stop and remove the SecureEdgeDoHTool service and delete the installed application files (install and service logs preserved). By default, the script also removes the bundled WinDivert driver. If another application depends on the shared WinDivert service, use the -RemoveWinDivertDriver:$false parameter to retain the driver.

From the extracted folder, run this command in an elevated PowerShell terminal:

.\Uninstall-SecureEdgeDoHTool.ps1 or .\Uninstall-SecureEdgeDoHTool.ps1 -RemoveWinDivertDriver:$false # keep the driver

Note: The Uninstall-SecureEdgeDoHTool.ps1 script is included in the ZIP package and is installed alongside the SecureEdge DoH Tool executable.

Installation parameters

All parameters are optional except the DoH endpoint. Provide either -DohTemplate or -DohUrl, or use -AppSettingsFile to supply a complete configuration file. Parameters are identical for all installation methods. They apply to the setup exe, the Intune install command and Install-SecureEdgeDoHTool.ps1.

Parameter

Required

Default

Description

Parameter

Required

Default

Description

-DohTemplate

one of endpoint

user provided

Per-user DoH endpoint template. Keep the literal <user_email> placeholder; the agent substitutes the current user’s email at runtime. Ignored if -DohUrl is set.

-DohUrl

one of endpoint

user provided

Explicit DoH endpoint (no <user_email> substitution). Overrides -DohTemplate.

-DohIp

Yes

user provided

Fixed IP(s) to connect the DoH host to (comma-separated). Must be valid IPv4 or IPv6 literals - hostnames are rejected. Lets intercept mode reach the endpoint without a bootstrap DNS lookup (its interceptor would otherwise capture it). The URL keeps its hostname for SNI/cert.

-UserEmail

No

(none)

Pins the value substituted for <user_email>. If empty, the agent auto-detects it (see below). Set on shared or re-imaged devices to force a specific mailbox.

-ExemptNetworks

No

(none)

Comma-separated CIDRs/hosts (e.g. 10.0.0.0/8,10.20.0.53) whose DNS is never diverted. Use for VPN compatibility (exempt the VPN’s resolvers). Intercept mode only.

-BypassDomains

No

(none)

Comma-separated domain suffixes that bypass DoH and resolve via the client’s local DNS (e.g. corp.local). Matches the name or any subdomain.

-Intercept

No

$true

Transparent interception via WinDivert. Use -Intercept:$false for forwarder mode.

-Failsafe

No

$true

Intercept mode. $true releases a failed query to the client’s own DNS (fail-open; that query goes out as plaintext). $false drops it (fail-closed; no leak, client times out).

-DebugLogging

No

$true

Log one line per query (name + route + result) to service.log. $false = quiet. (Alias: -VerboseLogging.)

-WatchLogonAfterEnrollment

No

(off)

On shared or multi-user managed devices, keep watching for logons so the live signed-in user takes over the endpoint even after an enrollment identity was found. No effect when identity isn’t from enrollment.

-RequestTimeoutSeconds

No

10

Upstream timeout per query.

-AppSettingsFile

No

(none)

Path to a ready-made appsettings.json to deploy verbatim instead of generating one. When set, the config-shaping parameters above are ignored. -DohIp / endpoint are then not required.

-InstallDir

No

...\Barracuda\SecureEdge DoH Tool

Install location (64-bit Program Files).

-ServiceName

No

SecureEdgeDoHTool

Windows service name.

-DisplayName

No

Barracuda SecureEdge DoH Tool Service

Service display name.

-LogFile

No

%ProgramData%\Barracuda\SecureEdge DoH Tool\install.log

Install transcript path (timestamped, durable record of the run).

Note: The running SecureEdgeDoHTool service writes logs to service.log ((rolls over to service.log.old) in the installation directory, next to the EXE.

Troubleshooting

Issue

Resolution

Issue

Resolution

Service is not running after install

  1. Run Get-Service SecureEdgeDoHTool to verify the service status.

  2. Review C:\ProgramData\Barracuda\SecureEdge DoH Tool\install.log for installation errors.

  3. Review C:\ProgramData\Barracuda\SecureEdge DoH Tool\service.log and search for entries tagged with [doh].

Installer appears to hang on launch

The executable self-extracts its embedded payload when launched for the first time. This process can take up to one minute. Do not close the terminal window. The message "unpacking components, please wait..." indicates that extraction is in progress.

Installer exits with "Must run elevated"

Start the terminal as an administrator by right-clicking the terminal application and selecting Run as administrator. The installer does not automatically elevate privileges.


We value your feedback.
If you have questions, suggestions, or feedback on our documentation, contact the Campus Product Documentation team.
For general product inquiries or technical support, please contact the global Barracuda Support team.