Routing connectionless UDP traffic (such as DNS query proxies, Syslog collectors, or real-time gaming streams) across reverse proxy infrastructure requires configuring dedicated UDP entrypoints and services. Traefik supports native Layer 4 UDP proxying. Windows Sandbox on Windows 11 provides a secure, disposable container for validating UDP routing configurations safely without touching host network adapters.
Why Test UDP Routing in Windows Sandbox
Testing UDP packet forwarding directly on developer workstations can conflict with existing DNS client resolvers or local VPN tunnels. Launching Traefik inside an isolated Windows Sandbox enables engineers to test UDP packet forwarding, timeout thresholds, and multi-backend load balancing safely.
Authoring the Windows Sandbox WSB XML
Save the following XML document as TraefikUDPSandbox.wsb on your Windows 11 machine:
<Configuration>
<VGpu>Default</VGpu>
<Networking>Default</Networking>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\TraefikUDPLab</HostFolder>
<SandboxFolder>C:\TraefikUDPLab</SandboxFolder>
<ReadOnly>true</ReadOnly>
</MappedFolder>
</MappedFolders>
<LogonCommand>
<Command>powershell.exe -ExecutionPolicy Bypass -NoExit -File C:\TraefikUDPLab\setup-udp.ps1</Command>
</LogonCommand>
</Configuration>
PowerShell Deployment Bootstrapper
Save the bootstrapping script as C:TraefikUDPLabsetup-udp.ps1:
Write-Host "Setting up Traefik UDP Routing Lab..." -ForegroundColor Cyan
$Dir = "C:Traefik"
New-Item -ItemType Directory -Force -Path $Dir | Out-Null
$ZipUrl = "https://github.com/traefik/traefik/releases/download/v3.0.0/traefik_v3.0.0_windows_amd64.zip"
Invoke-WebRequest -Uri $ZipUrl -OutFile "$Dir raefik.zip"
Expand-Archive -Path "$Dir raefik.zip" -DestinationPath $Dir -Force
$Config = @"
entryPoints:
udpproxy:
address: ":5353/udp"
udp:
routers:
dns-router:
entryPoints:
- "udpproxy"
service: "dns-backend"
services:
dns-backend:
loadBalancer:
servers:
- address: "1.1.1.1:53"
"@
Set-Content -Path "$Dir raefik.yml" -Value $Config
Write-Host "Traefik UDP Router Configured for Port 5353 Forwarding." -ForegroundColor Green
Testing UDP Forwarding
Launch the sandbox configuration and run DNS resolution queries via PowerShell using Resolve-DnsName -Name example.com -Server 127.0.0.1 -Port 5353. Confirm that Traefik proxies the UDP datagram and returns valid DNS answers. Closing the sandbox leaves no residual configuration files.