Select Page
View Categories

Reverse Proxy

The EagleSafe ZTB Reverse Proxy lets you expose internal services running on peers or behind network resources to the public internet. TLS termination, optional authentication, and access restrictions are handled automatically — without opening ports or configuring firewalls on your internal machines.

Note: This feature is currently in beta. In EagleSafe's self-hosted deployment, the reverse proxy requires Traefik as the external reverse proxy in front of the management server — it is the only supported option because it provides TLS passthrough, which is required for this feature to function correctly.

How it works

When you create a reverse proxy service, a public domain with an automatic TLS certificate is provisioned. Incoming traffic to that domain is received at the proxy, then forwarded through the encrypted ZTB tunnel to the target peer or network resource. The target service only needs to be reachable within your ZTB network — no public IP address or open ports are required on the backend.

Service modes

ModeLayerDescription
HTTPL7TLS terminated at the proxy, HTTP forwarding to the backend. Supports path-based routing, host header forwarding, redirect rewriting, and browser-based authentication (SSO, password, PIN).
TCPL4Raw TCP relay on a dedicated port. No application-layer inspection.
UDPL4UDP relay with session tracking. Sessions are reaped after an idle timeout.
TLSL4SNI-based routing with TLS passthrough. The encrypted connection is forwarded to the backend without termination.

L4 services (TCP, UDP, TLS) do not support browser-based authentication. Use access restrictions (IP CIDR, country) to protect them.

Targets

A target defines where proxied traffic is sent within your ZTB network. Supported types:

  • Peer — a device running the ZTB agent directly.
  • Host — a network resource identified by IP address.
  • Domain — a network resource identified by domain name.
  • Subnet — a network resource within a CIDR range; specify the exact IP within the range.

HTTP services support path-based routing across multiple targets. L4 services forward all traffic to the configured target port.

Authentication (HTTP services only)

MethodDescription
SSOAuthenticate via your Identity Provider (OIDC). Optionally restrict to specific user groups.
PasswordProtect with a shared password.
PIN CodeProtect with a numeric PIN.
Header AuthenticationRequire a specific header value (API key, Bearer token, Basic auth). For machine-to-machine access.
Access RestrictionsRestrict by IP CIDR range or country. Applies to all service modes. Evaluated before authentication.

Multiple authentication methods can be enabled simultaneously — users pick one. If no authentication is configured, the service is publicly accessible to anyone who knows the URL.

Service statuses

StatusMeaning
pendingService is being provisioned.
certificate_pendingTLS certificate is being issued.
activeService is live and routing traffic.
tunnel_not_createdThe proxy has not yet established a tunnel to the target.
certificate_failedTLS certificate issuance failed. Verify that port 443 is publicly reachable and the domain resolves correctly.
errorGeneric error. Check service configuration and target availability.

Create a reverse proxy service

  1. Go to Reverse Proxy → Services and click Add Service.
  2. Select the service mode (HTTP, TCP, UDP, or TLS).
  3. Enter a subdomain and select the base domain.
  4. Click Add Target, select the target type and the peer or network resource.
  5. For HTTP services, set the protocol (HTTP/HTTPS) and port. Optionally set a path for path-based routing.
  6. Switch to the Authentication tab and configure the desired authentication method.
  7. Switch to the Access Control tab to restrict by IP or country if needed.
  8. Switch to the Settings tab for advanced options (Pass Host Header, Rewrite Redirects for HTTP; PROXY Protocol for TCP/TLS).
  9. Click Add Service. Monitor the status until it shows active.

Path-based routing

HTTP services with multiple targets support path-based routing. Assign a unique path prefix to each target to route different URL paths to different backends:

PathTarget
/Main web application (port 3000)
/apiAPI service (port 8080)
/docsDocumentation server (port 80)

Integration with Networks

If you have already configured Networks with resources and routing peers, you can expose a resource directly from the Networks page by clicking Expose Service on any resource. This opens the reverse proxy creation modal with that resource pre-populated as a target.

Managing services

  • Edit: click on a service in the list to modify its configuration.
  • Enable/Disable: use the toggle to pause a service without deleting it.
  • Delete: permanently removes the service, its domain, and TLS certificate. Cannot be undone.
  • Targets: add, remove, or individually enable/disable targets within a service.

What's next?