Restricted networks and blocked connections
What a firewall actually breaks, what the agent does about it on its own, and how to tell the failure modes apart.
Hotel Wi-Fi, a conference network, a hardened corporate egress filter, a captive portal. These break different things, and the symptoms look similar from the outside - so the useful skill is telling them apart quickly rather than guessing.
The agent depends on four things: the management service, which hands out keys, access rules and the network map; Discovery, through which two devices agree on a path; a relay; and a direct path to each device. The management service is at mgmt.sxaccess.com on TCP 443. It hands each agent its Discovery and relay endpoints, which use TLS on TCP 443 as well. The four fail independently, and the consequences are very different.
The failure modes
| What is blocked | What still works | What breaks | How it looks |
|---|---|---|---|
| Outbound UDP | Everything. Tunnels use a relay over TCP 443 instead | Direct device-to-device paths | Every device shows Path: Relayed; latency rises |
| The relay endpoints as well | Devices you already have a direct path to | Any device that needs a relay | Some devices reachable, others not, with no pattern by name |
| Discovery | Tunnels that are already up | New tunnels, including every tunnel after the device restarts | Discovery shows Disconnected with a reason; on a running device the headline says Partly connected |
TCP 443 to mgmt.sxaccess.com | Tunnels that are already up. If the relay endpoints are blocked as well, relayed tunnels stop | Enrolment, access rule changes, new devices | Service shows Disconnected. Nothing changes at first, then new devices and edits never arrive |
What the agent does on its own
When the management service is unreachable, the agent does not give up and does not hammer the network. Every wait below is randomized, so a single one can be anywhere up to twice the figure given.
- Connecting. A device that is starting, or connecting again from scratch, retries after about a second and waits 1.7 times longer each time, up to 15 seconds between attempts.
- Losing a running connection. When an established connection drops, for example because a laptop was closed on one network and opened on another, the agent retries after 0.8 seconds, growing by the same factor up to 10 seconds. Tunnels stay up meanwhile.
- The long tail. Both keep that up for three months. After that, the agent service starts the connection again at intervals of 30 to 60 minutes for up to 14 more days.
In practice a laptop closed on a blocked network and opened on a working one reconnects within seconds, with no action from the person using it.
Two refusals are handled differently. When the management service refuses the device itself, retrying could never succeed: its session expired, it was deleted, or the member it belongs to was blocked. The agent stops, and sxaccess info says This device is not signed in until sxaccess start signs it in again. When the whole organization is suspended, the agent keeps trying about every 5 minutes and reconnects on its own once the organization is active again.
Telling them apart
Start with sxaccess info -d. The headline and the Service, Discovery and Relays rows say which dependency is missing, and each device's Path: line says whether it is direct (P2P) or Relayed. The filters exist for exactly this, because you want the count, not the wall of text. Each of them switches the detail view on by itself.
Three commands narrow it down. First, is anything direct at all? List the connected devices that have a direct path, then the ones on a relay:
sxaccess info --filter-by-status connected --filter-by-connection-type P2Psxaccess info --filter-by-status connected --filter-by-connection-type RelayedAll relayed and none direct means that outbound UDP is blocked, or that both ends sit behind strict NAT. Next, check whether this host reaches the management service:
curl -sS -o /dev/null -w '%{http_code}\n' https://mgmt.sxaccess.comThe command prints an HTTP status code. Any three-digit code, usually 404, means this host reaches the management service over TLS on TCP 443: the service answered, and its root path has nothing to return. 000 means no answer arrived. The error curl prints above it says why, for example a timeout when a firewall drops the traffic, or a certificate error when something inspects TLS on the way.
Last, see which devices are in the map, and in what state:
sxaccess info --filter-by-status connectedsxaccess info --json | jq '.devices.items[] | {dnsName, address, state, path}'Reproducing a relayed path on purpose
Before you tell a network team that relaying is the problem, confirm that relaying actually is the problem. With SX_RELAY_ONLY=true in its environment, the agent service sends every tunnel through a relay and skips direct paths, so you can measure the restricted network's behaviour on a network that is not restricted.
The agent service reads the variable, not the sxaccess command, so set it with sudo sxaccess agent reconfigure --service-env. That command restarts a running agent by itself; once the agent has reconnected, sxaccess info -d shows every connected device as Path: Relayed. The command also replaces the service's whole environment each time: if you set other variables this way, list them in the same command, separated by commas. To undo it, reconfigure again without SX_RELAY_ONLY.
If the application is fine on a forced relay, the firewall is costing you latency, not function, and the fix is a conversation about priorities rather than an outage.
sudo sxaccess agent reconfigure --service-env SX_RELAY_ONLY=truesxaccess info -dsudo sxaccess agent reconfigureWhat to ask the network team for
In order of how much it buys you. The first row alone makes the product work.
| Ask | Effect if granted |
|---|---|
Direct outbound TCP 443 to mgmt.sxaccess.com and app.sxaccess.com, and to the Discovery and relay endpoints listed by sxaccess info -d | The network works. Everything relays, which costs latency. It has to be direct: the agent has no proxy setting |
Direct outbound TCP 443 to pkgs.sxaccess.com | The CLI can be installed and upgraded on this network: the install script downloads it from there. Devices do not need it to connect |
| Outbound UDP, unrestricted destination | Direct tunnels become possible; most devices stop relaying |
| No TLS inspection on those connections | Keeps a substituted certificate from breaking them. The apps trust only the certificate authorities they ship with, so for them inspection always breaks the connection |
| UDP between devices on the same LAN | Two machines in the same office talk over the LAN instead of leaving the building. The CLI agent listens on UDP 51820, or on another port if that one is taken; the apps use a random port |
Collecting evidence that survives the conversation
A capture taken over the failure is worth more than a description of it. sxaccess diagnose capture 5m switches the agent to trace logging, reconnects the device, runs for the time you give and bundles that window, so the log covers the moment the connection failed rather than the whole day. Because it reconnects, sessions running over SXAccess drop.
Add -A to replace public addresses and outside domains before the archive leaves your machine. Private ranges, overlay addresses and device names stay visible, so open the archive and check it before attaching it anywhere.
sxaccess diagnose capture 5m -Asxaccess diagnose collect -A
