Skip to content

Sophos Firewall: settings for XplicitTrust

The Sophos Firewall settings that most often break XplicitTrust connections, and how to change them. The common background is on Firewalls, Proxies and TLS Inspection.

In short

Check, in this order: the Application Filter (WireGuard), DoS & spoof protection (UDP flood), SSL/TLS inspection (exempt the XplicitTrust endpoints), source port preservation, and optionally UDP port forwarding for direct connections.

Steps below assume Sophos Firewall (SFOS) v20 or later. Earlier versions use slightly different menu paths but expose the same settings.

1. Application Control blocks WireGuard

SophosLabs classifies WireGuard as a controlled application. Depending on the Application Filter policy in use, WireGuard traffic is blocked either directly or as part of a broader category rule (typically VPN or Very High Risk).

Symptoms

  • XplicitTrust agent operates via the TCP relay instead of the preferred UDP relay path.
  • UDP relay sessions are blocked or torn down shortly after establishment.
  • The Application Filter log contains entries for the application "WireGuard" with action "Deny" or "Drop".
  • Changing the UDP port on the agent does not resolve the issue.

Verify

Open Monitor & analyze → Log viewer and select the Application Filter module. Filter for WireGuard. Matching block or deny entries indicate that Application Control is the cause.

Resolution

  1. Open Protect → Applications → Application filter and edit the Application Filter policy attached to the firewall rule used for client traffic.
  2. Click Add to create a new rule above the existing block rules.
  3. In the filter criteria, search for WireGuard and select the application from the list.
  4. Set the action to Allow and save the rule.
  5. Confirm that the allow rule is positioned above any rule that blocks the broader categories (VPN, Proxy and Tunnel, Very High Risk). Application Filter policies are evaluated top-down.
  6. Save the policy and confirm it is selected in the firewall rule that handles client traffic (Rules and policies → Firewall rules, under Security features → Application Control).

2. DoS & spoof protection drops UDP traffic

The UDP flood Apply flag in DoS & spoof protection drops sustained UDP traffic once a per-source or per-destination packet rate is exceeded. Sophos's own documentation notes that the default UDP flood values commonly disrupt VoIP and VPN traffic; the same applies to XplicitTrust UDP relay sessions under load.

Symptoms

  • UDP relay traffic is interrupted under load; the agent fails over to the TCP relay.
  • The IPS / DoS attack log contains entries for UDP flood attacks against the agent's source or the relay's destination address.
  • The issue correlates with throughput, not idle time.

Verify

Open Monitor & analyze → Log viewer and select the IPS module. Look for UDP flood entries during periods of degraded XplicitTrust performance.

Recommendation

Under DoS & spoof protection, clear the Apply flag checkbox in both the Source and Destination columns of the UDP flood row. Leave SYN flood, TCP flood, ICMP flood and spoof prevention settings enabled.

Steps (GUI)

  1. Open Protect → Intrusion prevention → DoS & spoof protection.
  2. In the DoS settings section, locate the row for UDP flood.
  3. Clear the Apply flag checkboxes in both the Source and Destination columns.
  4. Click Apply.

Alternative: keep UDP flood protection, raise the threshold

If policy requires UDP flood protection to remain enabled, raise the packet rate to a value well above the peak XplicitTrust traffic observed for the deployment. Sophos support typically suggests 1500 packets per second per source as a baseline; XplicitTrust traffic under sustained load can require considerably higher values. Monitor the IPS log after the change to confirm that XplicitTrust traffic is no longer flagged.

3. SSL/TLS inspection breaks the TCP relay

Symptoms

  • The TCP relay path fails to establish or is repeatedly torn down.
  • The agent log shows TLS handshake or certificate validation errors against the XplicitTrust relay endpoints.

Verify

From a client machine behind the Sophos Firewall:

xtna-util --connectivity

If SSL termination is reported, SSL/TLS inspection on the Sophos Firewall is the cause.

Recommendation

Create an SSL/TLS inspection rule with action set to Don't decrypt, scoped to the XplicitTrust endpoint FQDNs (or wildcard *.xplicittrust.com for standard SaaS deployments; adjust to your tenant). Position the rule above any rule that performs decryption.

Steps (GUI)

  1. Open Rules and policies → SSL/TLS inspection rules.
  2. Click Add to create a new rule. Give it a descriptive name (e.g. XplicitTrust-Exclude).
  3. Set Action to Don't decrypt.
  4. Under Destination networks, add an FQDN host object for the XplicitTrust relay endpoints, or use a URL group containing the relay FQDNs (e.g. *.xplicittrust.com). Source and services can be left at the broadest setting suitable for the deployment.
  5. Position the rule above any Decrypt rules in the table; SSL/TLS inspection rules are evaluated top-down.
  6. Save the rule.

Alternative: web exception (DPI mode only)

If HTTPS decryption is performed by the DPI engine through firewall rules rather than a dedicated SSL/TLS inspection rule, the equivalent exclusion is a web exception: Web → Exceptions → Add exception. Under URL pattern matches, add a regular expression matching the XplicitTrust endpoints (for example ^.*\.xplicittrust\.com$), and clear the HTTPS decryption checkbox.

4. Source port preservation for direct connections

XplicitTrust direct peer-to-peer connections require that the firewall's source-NAT preserves the agent's UDP source port (see the FortiGate section for the underlying broker mechanics – the same requirement applies on every vendor). Sophos Firewall implements outbound NAT as a Masquerade (MASQ) rule and does not expose an explicit Preserve source port or Consistent NAT toggle in the GUI. The default Masquerade behaviour is endpoint-dependent: the public (IP, port) the agent appears on can change per destination, which the XplicitTrust NAT classifier reports as Non-Collaborative NAT.

Symptoms

  • XplicitTrust agents behind the Sophos Firewall consistently end up on a UDP or TCP relay, even when direct connectivity should be possible based on the network topology.
  • xtna-util --status on an affected client reports the local NAT type as Non-Collaborative NAT.
  • The same agents successfully establish direct connections from other networks (mobile hotspot, residential connection, a different site).

Verify

Run xtna-util --status on a client behind the Sophos Firewall. To confirm, take a brief packet capture on the WAN interface filtered on the agent's UDP traffic: the source port observed on the outside should equal the agent's peering port shown in the Admin Console under Assets → [select asset] → Edit → Advanced → Port. If it differs, the Sophos Firewall is rewriting it.

Recommendation

Sophos Firewall does not expose a setting that makes Masquerade behave as endpoint-independent (cone) NAT. If xtna-util --status reports Non-Collaborative NAT and direct connections are required, configure the per-asset UDP port forwarding described in the next section. A 1:1 SNAT (Translated source set to a dedicated IP Host rather than MASQ) on the outbound rule that carries the agent's traffic is an alternative when a spare public IP per asset is available; this is rarely practical at scale.

5. Direct connections via UDP port forwarding

If an asset behind the Sophos Firewall should accept direct inbound connections from peers but is not reachable because of NAT type or restrictive firewall behaviour, configure a service object, a DNAT rule and the matching firewall rule so that direct connections to the asset become possible.

Step 1: Look up the agent UDP port

  1. Sign in to the XplicitTrust Admin Console.
  2. Open Assets, select the relevant asset and click Edit.
  3. Switch to the Advanced tab. The UDP listening port is shown in the Port field.

Step 2: Create a UDP service object

  1. Open System → Hosts and services → Services and click Add.
  2. Name: xtna-<hostname> or any descriptive name.
  3. Type: TCP/UDP. Protocol: UDP.
  4. Source port: 1:65535. Destination port: the UDP port from Step 1. Save.

Step 3: Configure DNAT and firewall rule

On Sophos Firewall, port forwarding requires two objects: a DNAT rule that performs the address and port translation, and a firewall rule that permits the inbound traffic. The Server access assistant can create both in one workflow; the manual procedure is given below it for reference.

Option A – Server access assistant (recommended)

  1. Open Rules and policies → NAT rules and click Add NAT rule → Server access assistant (DNAT).
  2. Internal server IP address: the internal IP host of the XplicitTrust asset.
  3. Public IP address: the WAN interface or the public IP host.
  4. Services: the UDP service object from Step 2.
  5. External source networks and devices: Any (or restrict as required by policy).
  6. Click Save and finish. The assistant creates the DNAT rule, the firewall rule and, where applicable, loopback and reflexive rules.

Option B – Manual (DNAT rule + firewall rule)

DNAT rule:

  • Rules and policies → NAT rules → Add NAT rule → New NAT rule.
  • Original source: Any. Original destination: the WAN IP host or interface.
  • Original service: the UDP service from Step 2.
  • Translated source (SNAT): Original. Translated destination (DNAT): the asset's internal IP host.
  • Translated service (PAT): Original (port stays the same). Inbound and outbound interface: Any. Save.

Firewall rule:

  • Rules and policies → Firewall rules → Add firewall rule → New firewall rule.
  • Source zones: WAN. Source networks and devices: Any (or restricted).
  • Destination zones: LAN or DMZ (whichever holds the asset). Destination networks: the asset's internal IP host.
  • Services: the UDP service object from Step 2. Action: Accept.
  • Under Security features, attach the Application Filter policy that allows WireGuard (see section 1). Save.

Step 4: 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 firewall is not forwarding.

Order matters

Enable Fixate Port only after Steps 2 and 3 are complete. Enabling it before the firewall is forwarding the port will lock the agent to a port that is not yet permitted, breaking direct connectivity until the Sophos Firewall side is configured.

One service object, one DNAT rule and one firewall rule are required per asset that should be directly reachable. If the WAN IP is dynamic, configure DDNS so the public hostname remains stable.

Managed service providers

If the Sophos Firewall is operated by a managed service provider, the relevant change requests are:

  1. Application Filter allow rule for the WireGuard application.
  2. Clearing the Apply flag for UDP flood under DoS & spoof protection.
  3. Adding the XplicitTrust relay endpoints to an SSL/TLS inspection exclusion (action Don't decrypt).

In HA setups, apply the changes on the primary unit only. They are synchronised to the auxiliary unit automatically.

See also