Outbound-only Sage transport (the default network posture)¶
ForgeSync's app server never reaches INTO your network. The bridge on your
Sage box listens on its own loopback only, and the Sage box dials OUT to
the app server over SSH, offering the bridge on the app server's loopback.
Result: zero inbound firewall holes on your LAN, no VPN, and the app talks
to 127.0.0.1 as if the bridge were local. Measured overhead is ~20 ms per
request - noise against normal bridge call times.
The app server side is already prepared by provisioning: a restricted
fe-tunnel account that can do exactly one thing - accept a reverse
forward of the bridge port on loopback. No shell, no other forwards.
One-time setup on the Sage box¶
- Keep the bridge off the LAN. The service listens on every
interface (there is no bind-address setting), so add a Windows Firewall
inbound rule that blocks TCP 8587 from everything except loopback:
New-NetFirewallRule -DisplayName "ForgeSync bridge loopback only" -Direction Inbound -Protocol TCP -LocalPort 8587 -RemoteAddress 127.0.0.1 -Action Allowfollowed by a matching rule with-RemoteAddress Any -Action Block(allow rules win over block rules only when more specific; keep both). After this nothing on the LAN can reach it, including the app server, until the tunnel is up. -
Create a key pair (no passphrase; this runs as a service):
ssh-keygen -t ed25519 -f C:\ProgramData\forgesync\tunnel_key -N ""
Send the .pub file to ForgeSync - it goes into the fe-tunnel
account's authorized_keys on the app server. The private key never
leaves your Sage box.
-
The tunnel command (Windows Server 2019+ ships OpenSSH client;
ssh.exelives in System32\OpenSSH):ssh.exe -N ^ -R 127.0.0.1:8587:127.0.0.1:8587 ^ -o ExitOnForwardFailure=yes ^ -o ServerAliveInterval=15 -o ServerAliveCountMax=3 ^ -i C:\ProgramData\forgesync\tunnel_key ^ fe-tunnel@
-N is required: the account has no shell, and a connection that asks
for one is refused.
- Run it as a service so it survives reboots and reconnects:
- Recommended: wrap the command with NSSM (
nssm install ForgeSyncTunnel ...), set restart-on-exit with a few seconds of throttle. - Alternative: a Scheduled Task, trigger "At startup", with "Restart on failure" every minute.
-
Linux stand-ins (labs): a systemd unit with
Restart=always, or autossh. -
First-connection host key: run the command once interactively to accept the app server's host key (or pre-seed
known_hostswith the fingerprint ForgeSync provides). The service will not answer prompts.
Verifying¶
- On the Sage box: the service is running and stays running.
- On the app server:
curl -sk https://localhost:8587/health(the bridge speaks HTTPS only on 8587, and/statusneeds a signed request) returns the bridge status.php artisan fe:verifyexercises the same path.
Failure behavior¶
If the tunnel is down, the app's Sage calls fail fast and the normal watchdog/alerting reports the bridge unreachable - orders queue and drain when the tunnel returns (same behavior as any bridge outage). The tunnel service reconnecting is the fix; nothing needs attention on the app side.
Fallback: inbound listener¶
Labs and single-box installs may instead keep the bridge listening on a LAN interface with the app server allowed through the firewall (the earlier posture). This is a documented exception, not the default; it requires an inbound rule on your network and TLS pinning stays mandatory.