pfSense: settings for XplicitTrust
The pfSense settings that most often break XplicitTrust connections, and how to change them. The common background is on Firewalls, Proxies and TLS Inspection.
In short
In a default install only Outbound NAT source port randomisation matters. Snort or Suricata (WireGuard signature) and Squid with SSL bump matter only when installed. Optionally forward UDP ports for direct connections.
Tested against pfSense Plus 23.X and pfSense CE 2.7.X. Both expose the same data-path mechanisms; menu paths are identical unless noted.
pfSense differs from the commercial vendors in one important respect: it ships without an integrated Application Control or HTTPS Inspection feature. By default outbound LAN → WAN traffic is accepted and not subject to deep packet inspection, so the only mechanism that consistently affects XplicitTrust in a default install is source-port randomisation on Outbound NAT, covered first. The remaining sections apply only when the corresponding optional package (Snort, Suricata or Squid with SSL bump) is installed.
1. Source port preservation for direct connections
pfSense uses pf as its NAT engine. In the default Outbound NAT mode (Automatic) pfSense rewrites the source port on every outbound connection to a random value, with one hard-coded exception for UDP/500 (IKE). For every other UDP source port — including XplicitTrust agent traffic — the public (IP, port) the agent appears on changes per destination, which the XplicitTrust NAT classifier reports as Non-Collaborative NAT. UDP hole punching to peers behind another NAT then fails, and the agent falls back to the relay.
pfSense exposes an explicit toggle to preserve the source port on selected outbound flows, called Static Port. Enabling it on the outbound NAT rule that covers the agent's traffic is the direct equivalent of FortiGate's Source Port Translation: When Port Conflicts or SonicWall's Disable Source Port Remap.
Symptoms
- XplicitTrust agents behind the pfSense consistently end up on a UDP or TCP relay, even when direct connectivity should be possible based on the network topology.
xtna-util --statuson 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 pfSense. To confirm,
take a brief packet capture on the WAN interface (Diagnostics →
Packet Capture) 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, pfSense is rewriting it.
Recommendation
Switch Outbound NAT to Hybrid Outbound NAT and add a rule above the automatic rules that covers the agent's traffic with Static Port enabled. Hybrid mode keeps the existing automatic rules for everything else; only the matched XplicitTrust flow is affected.
Steps (WebUI)
- Open Firewall → NAT → Outbound and switch the mode from Automatic outbound NAT rule generation to Hybrid outbound NAT rule generation. Save.
- Under Mappings, click Add (the Add at top button) to insert a new manual rule above the automatic block.
- Interface: WAN. Address Family: IPv4 (add a second rule for IPv6 if applicable). Protocol: UDP.
- Source: the network of XplicitTrust clients (or a specific client host). Destination: Any. Destination Port: Any.
- Translation → Address: Interface Address (or a specific WAN IP host if using non-default NAT). Port: leave blank.
- Tick Static Port: Use static port (do not randomize source port). Save and Apply.
- From a client behind the pfSense, re-run
xtna-util --statusand confirm the local NAT type is no longer Non-Collaborative NAT.
Scope the Static Port rule
Static Port rules should be scoped as tightly as the deployment allows. When two internal hosts use the same source port to the same destination through the same external IP, pf cannot resolve the conflict and one flow will fail. Limiting Source to the XplicitTrust client subnet and Protocol to UDP keeps the rule narrow.
2. IDS/IPS (Snort or Suricata) may match a WireGuard signature
pfSense does not have a built-in Application Control engine, but the optional Snort and Suricata packages can match WireGuard handshakes through signatures shipped in the Emerging Threats Open ruleset (typically in the ET POLICY category). These rules are disabled by default in a fresh install; they are commonly enabled when an IPS-Balanced or IPS-Security policy template is selected or when the policy category is enabled wholesale.
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 Snort or Suricata alert log on the WAN interface contains entries referencing WireGuard, ET POLICY or VPN tunnel around the failure window.
- Changing the UDP port on the agent does not resolve the issue.
Verify
Open Services → Snort → Alerts (or Services → Suricata →
Alerts), select the WAN interface and filter for WireGuard. If
matching block or drop entries appear, the IDS/IPS is the cause.
Resolution
- Open the IDS package (Services → Snort or Services → Suricata) and edit the relevant interface.
- Switch to the Rules tab and locate the category that contains the matching SID (typically emerging-policy under ET Open, or the appropriate Snort VRT category).
- Use SID Management to disable the specific SID, or set its action to Alert only instead of Drop. Per-SID overrides survive ruleset updates; disabling categories does not.
- Restart the package on that interface and confirm no further WireGuard alerts appear.
If Snort/Suricata is not installed, skip this section.
3. HTTPS interception (Squid + SSL bump) breaks the TCP relay
Stock pfSense does not intercept HTTPS. The optional Squid package with SSL bump ("HTTPS / SSL interception" in the Squid GUI) is the only configuration in which pfSense terminates TLS on outbound HTTPS, which would in turn break the XplicitTrust TCP relay. SSL bump requires a custom CA on every client, so it is uncommon in SMB deployments.
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 pfSense:
xtna-util --connectivity
If SSL termination is reported, Squid SSL bump (or another HTTPS proxy in the path) is the cause.
Recommendation
Add the XplicitTrust relay FQDNs (or the wildcard
*.xplicittrust.com for standard SaaS deployments; adjust to
your tenant) to the Squid SSL/MITM Whitelist (also labelled
SSL Bump Direct Sites depending on Squid version) so that the
TCP relay traffic is excluded from interception. Leave SSL bump
active for the remaining HTTPS traffic.
Steps (WebUI)
- Open Services → Squid Proxy Server → ACLs.
- Add the XplicitTrust endpoint FQDNs to the SSL/MITM Whitelist (or Whitelist when SSL bump is not configured). Wildcard entries (
.xplicittrust.com) are accepted. - Apply, then re-run
xtna-util --connectivityfrom the client to confirm SSL termination is no longer reported.
If Squid is not installed (or SSL bump is not enabled), skip this section.
4. Direct connections via UDP port forwarding
If source-port preservation cannot be enabled (for example because another NAT policy on the same outbound interface conflicts with Static Port), an asset that should accept direct inbound connections from peers can be made reachable by forwarding its tenant-specific UDP listening port. pfSense's port-forward workflow creates both the NAT entry and the matching firewall rule in one step.
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: Create the port-forward
- Open Firewall → NAT → Port Forward and click Add.
- Interface: WAN. Address Family: IPv4 (add a separate rule for IPv6 if applicable). Protocol: UDP.
- Destination: WAN address (or a specific WAN IP host when multiple are assigned). Destination port range: From and To set to the UDP port from Step 1.
- Redirect target IP: the internal IP of the XplicitTrust asset. Redirect target port: the same UDP port from Step 1.
- Filter rule association: leave the default Add associated filter rule so pfSense creates the inbound WAN rule automatically.
- Save and Apply. Verify under Firewall → Rules → WAN that the associated allow rule is present and enabled.
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 pfSense is not forwarding.
Order matters
Enable Fixate Port only after Step 2 is complete. Enabling it before pfSense is forwarding the port will lock the agent to a port that is not yet permitted, breaking direct connectivity until the pfSense side is configured.
One port-forward entry plus its associated firewall rule is required per asset that should be directly reachable. If the WAN IP is dynamic, configure DDNS (Services → Dynamic DNS) so the public hostname remains stable.
Managed service providers
If the pfSense is operated by a managed service provider, the relevant change requests are:
- Switching Outbound NAT to Hybrid mode and adding a Static Port rule for the XplicitTrust client subnet (UDP, source = client subnet, destination = any).
- If Snort or Suricata is active on the WAN interface, ensuring the WireGuard / ET POLICY signature is set to alert-only (or disabled) for the rule set in use.
- If Squid SSL bump is active, adding the XplicitTrust relay endpoints to the SSL/MITM whitelist.
In CARP / HA setups, apply the changes on the primary node and let them synchronise via XMLRPC sync to the secondary; confirm the secondary picked up the Outbound NAT mode change before failover testing.
See also
- Concept: Connection Paths and NAT
- Guide: Firewalls, Proxies and TLS Inspection, Logs and Diagnostics
- Reference: Network requirements, xtna-util