SonicWall: settings for XplicitTrust
The SonicWall settings that most often break XplicitTrust connections, and how to change them. The common background is on Firewalls, Proxies and TLS Inspection.
In short
Start with Consistent NAT (source port remapping prevents direct connections). Then check App Control Advanced, DPI-SSL and UDP-blocking rules, and optionally UDP port forwarding for direct connections.
Tested against SonicOS 7. Earlier versions expose the same settings but use slightly different menu paths.
1. Source-NAT port translation prevents direct connections
By default, SonicWall remaps the source port on every new SNAT flow, taking a (usually random) port from the NAT pool. The external mapping additionally changes per destination, because Consistent NAT is disabled by default. From the broker's perspective this is textbook symmetric NAT: the XplicitTrust NAT classifier reports Non-Collaborative NAT, UDP hole-punching to peers behind another NAT fails, and the agent falls back to the relay.
Symptoms
xtna-util --statuson a client behind the SonicWall reports the local NAT type as Non-Collaborative NAT.- XplicitTrust agents consistently end up on the UDP or TCP relay, even when direct connectivity should be possible.
- The same agents establish direct connections from other networks (mobile hotspot, residential connection, a different site).
Recommended resolution – Enable Consistent NAT (lower-touch)
Consistent NAT uses an MD5 hash of the internal (IP, port) so the same internal endpoint always maps to the same external (IP, port) regardless of destination. This is endpoint-independent (cone) mapping and is on its own sufficient to flip the classifier from Non-Collaborative NAT to Collaborative NAT.
- Open Network → Firewall (in SonicOS 7, Network → Firewall / VoIP Settings depending on the build).
- Enable Consistent NAT and apply.
SonicWall notes a "slight decrease in overall security" with Consistent NAT enabled because the external (IP, port) pairs become more predictable. The trade-off is normally acceptable in environments where direct peer-to-peer connectivity is desired.
Alternative – Disable Source Port Remap (more targeted)
If Consistent NAT must not be enabled box-wide, the source port can be preserved per NAT policy instead:
- Open Network → NAT Policies and edit the LAN → WAN NAT policy that covers traffic from the agent.
- On the Advanced tab, enable Disable Source Port Remap.
- Apply.
SonicWall's documentation recommends also disabling Consistent NAT when Disable Source Port Remap is in use, since the two interact.
Option 1 (Consistent NAT) is the lower-touch fix; option 2 is more surgical and is appropriate when only the XplicitTrust outbound flow should be exempted.
2. App Control Advanced may match a VPN signature
SonicWall App Control Advanced can match VPN signatures by
category (e.g. VPN → OpenVPN, named VPN clients). There is no
dedicated WireGuard signature surfaced in the SonicWall knowledge base
today, but signatures are configurable per-signature and similar
engines on other vendors detect the WireGuard handshake.
Verify
Check the App Control logs for VPN-category drops on the broker or peer port range around the failure window.
Resolution
If a VPN-category drop is observed, either allow the matching signature for the egress policy that carries XplicitTrust traffic, or use a Bypass DPI rule in App Rules for that traffic. The change is only required if matches are actually observed; SonicWall does not block WireGuard by default.
3. DPI-SSL and aggressive UDP-blocking rules
SonicWall DPI-SSL is TCP-only and therefore does not directly affect the XplicitTrust UDP relay. However, some deployments deploy aggressive hardening rules that block UDP on common encrypted-traffic ports in order to force traffic onto TCP where DPI-SSL can decrypt it. When such a rule is active, the WireGuard handshake or data UDP can be silently dropped; the XplicitTrust NAT classifier then reports Full Block and the agent falls back to the TCP relay on TCP/443.
Verify
xtna-util --connectivity and xtna-util --status together indicate
whether UDP is being blocked outright on the path. If UDP cannot
reach the broker or relays but TCP/443 can, an outbound rule on the
SonicWall is the likely cause.
Resolution
Confirm that outbound UDP from the client subnets to the XplicitTrust
broker and relay endpoints is permitted. WireGuard needs outbound UDP
to the broker, the UDP relay and to peer port ranges (starting at the
tenant's BasePort 51821 and spanning roughly 5000 ports). Add an
explicit allow rule for these destinations, ordered above the
hardening rule that otherwise blocks UDP.
4. Direct connections via UDP port forwarding
If source-port preservation is not achievable on the SonicWall, an asset that should accept direct inbound connections from peers can still be made reachable by forwarding its tenant-specific UDP listening port.
Step 1: Look up the agent UDP port
- Sign in to the XplicitTrust Admin Console.
- Open Assets, select the relevant asset and click Edit.
- Switch to the Advanced tab. The UDP listening port is shown in the Port field.
Step 2: Configure port forwarding on the SonicWall
On SonicWall, port forwarding is typically built from three objects:
- Network → Address Objects — create a host object for the internal IP of the XplicitTrust asset.
- Object → Services — create a custom service of type UDP with the port from Step 1.
- Network → NAT Policies — create an inbound NAT policy: Original Source = Any, Original Destination = the WAN public IP (or WAN Interface IP), Original Service = the service from step 2, Translated Destination = the host object from step 1, Translated Service = Original.
- Policy → Rules and Policies → Access Rules — add a rule from the WAN zone to the zone of the interface the asset is connected to, permitting the same UDP service. Set the destination to the public address object used as Original Destination in step 3 — not the internal host object.
The access rule destination is the public address, not the internal host
SonicOS matches the access rule's destination address against the original, pre-NAT destination — the public WAN IP — while it derives the destination zone from the post-NAT path, that is, the zone the internal asset sits in. An access rule pointed at the internal host object therefore never matches, even though the NAT policy translates the packet correctly.
The failure is easy to misread. The NAT policy fires — a packet capture
shows the destination already rewritten to the asset's internal IP — but
the access rule's hit counter stays at 0, no entry appears in
Monitor → Connections, and Packet Monitor reports the packet as
DROPPED by the policy module with an empty (--) egress interface,
meaning no forwarding decision was ever made. Raising the rule's
priority, widening it to any/any/any, or re-checking the zones changes
nothing, because the rule is never consulted.
SonicWall's Public Server Wizard (Quick Configuration) creates the address object, service object, NAT policy and access rule in a single flow. On some firmware versions the wizard generates the access rule with the internal host object as its destination; if the forward does not work, open the generated rule and change the destination to the public address object as described above.
Step 3: Fixate the port in the Admin Console
Return to the Admin Console: Assets → [select asset] → Edit → Advanced → Port and enable Fixate Port. This locks the agent to the configured UDP port, so it does not renegotiate to a different port that the SonicWall is not forwarding.
Order matters
Enable Fixate Port only after the NAT and access rule entries are in place. Enabling it before the SonicWall is forwarding the port will lock the agent to a port that is not yet permitted, breaking direct connectivity until the SonicWall side is configured.
Asks for a SonicWall customer
When working with a customer or managed service provider running a SonicWall, the three change requests that resolve the vast majority of cases are:
- Enable Consistent NAT (or disable Source Port Remap on the relevant LAN → WAN NAT policy) and re-run
xtna-util --statusto confirm the NAT class flips from non-collaborative to collaborative. - Confirm App Control Advanced is not matching a VPN signature on the egress policy — check logs around the failure window.
- Confirm outbound UDP to the broker, relay and peer port ranges is not blocked by a hardening rule.
See also
- Concept: Connection Paths and NAT
- Guide: Firewalls, Proxies and TLS Inspection, Logs and Diagnostics
- Reference: Network requirements, xtna-util