Network security

Alpacon connects your servers to the platform through an agent that makes only outbound connections. Alpacon never opens an inbound connection to your servers, so no inbound port needs to be open for Alpacon access — your own services keep whatever ports they require. This page covers how the connection works and how to configure your network, firewall, and proxy for it.

For transport encryption, certificate management, and platform-side protections, see Platform security and availability.

Connection model

Agent-based, outbound only

Traditional SSH access requires you to expose port 22 to incoming connections. Alpacon works the other way around: the Alpamon agent on each server opens an outbound connection to the platform, and all access flows back through that channel.

Traditional SSH:
Internet → Firewall (inbound port 22) → Server

Alpacon:
Server → Alpamon agent (outbound only) → Firewall → Platform

What this gives you:

  • No inbound ports for Alpacon: The agent only dials out; Alpacon never connects in.
  • Outbound only: The Alpamon agent initiates every connection.
  • Firewall friendly: Works with restrictive firewall policies and network address translation, with no inbound allowlisting.
  • Location-independent access: Network location alone never grants access; every session is authenticated and authorized.

How a connection is established

  1. Agent starts: The Alpamon agent starts on your server, opens an outbound connection to your workspace endpoint, authenticates with its server token, and keeps the connection alive with a heartbeat.
  2. User connects: You sign in to Alpacon through the web console or CLI. When you open a server, the platform checks your permissions and routes the session through the agent’s existing outbound channel.
  3. Session runs: There is no direct connection between you and the server. The platform relays the session, which is encrypted in transit. Closing either end ends the session.

Agent network requirements

The Alpamon agent needs outbound HTTPS and WebSocket (WSS) access to your workspace endpoint. It does not open any listening ports on the host.

Endpoints:

  • Outbound HTTPS (443) to <workspace>.<region>.alpacon.io
  • Outbound WSS (443) to <workspace>.<region>.alpacon.io for the persistent channel

Footprint: The agent is lightweight, typically using around 128 MB of memory and 150 MB of disk. It reconnects automatically with exponential backoff after a network interruption, and reattaches to sessions it had launched.

Proxy support:

# Configure an HTTP proxy
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080
 
# Configure a SOCKS proxy
export ALL_PROXY=socks5://proxy.company.com:1080
 
# Restart the agent to apply
sudo systemctl restart alpamon

Firewall configuration

Required outbound rules (server side)

For servers running the Alpamon agent:

ProtocolPortDestinationPurpose
HTTPS443<workspace>.<region>.alpacon.ioAgent connection
WSS443<workspace>.<region>.alpacon.ioPersistent channel
HTTPS443api.github.comAgent version checks
HTTPS443github.com, release-assets.githubusercontent.comAgent install and self-update
HTTPS443*.amazonaws.com (S3)WebFTP file transfer (optional)

Some optional features reach additional endpoints: the in-browser code editor downloads from code-server.dev and open-vsx.org on first use, and Linux package installs use packagecloud.io. Allow these only if you use those features.

Example iptables rules:

# Allow outbound HTTPS to your workspace
iptables -A OUTPUT -p tcp --dport 443 -d <workspace-ip> -j ACCEPT
 
# Allow established connections back in
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
 
# Drop all other inbound traffic
iptables -A INPUT -j DROP

Required outbound rules (client side)

For users accessing Alpacon from a web browser or the CLI:

ProtocolPortDestinationPurpose
HTTPS443alpacon.ioMain application
HTTPS443<workspace>.<region>.alpacon.ioWorkspace access
HTTPS443auth.alpacon.ioAuthentication
WSS443<workspace>.<region>.alpacon.ioTerminal sessions

Corporate firewall and proxy

Alpacon works behind corporate proxies.

Supported configurations:

  • HTTP/HTTPS proxy: Standard proxy using the CONNECT method
  • SOCKS proxy: SOCKS4 and SOCKS5
  • Authenticated proxy: Username and password authentication
  • Proxy auto-config (PAC): Automatic proxy configuration

Proxy bypass:

# Bypass the proxy for the local network
export NO_PROXY=localhost,127.0.0.1,10.0.0.0/8,192.168.0.0/16

IP allowlisting

🚧 Coming soon - planned for the Essentials plan or higher.

IP allowlisting will let you restrict access by source IP address for tighter control:

Workspace-level allowlist:

  • Restrict workspace access to specific IP ranges, such as office networks or VPN gateways
  • IPv4 and IPv6 addresses
  • CIDR notation for flexible ranges

Server-level allowlist:

  • Apply IP restrictions to individual servers
  • Useful for production databases that need extra protection
  • Override the workspace-level setting per server

Use cases:

  • Office-only access to a workspace
  • VPN-gateway-only access for production servers
  • Geographic restrictions for compliance
  • Partner and vendor access management
  • Locking production databases down to application servers only

Need this today? Contact support@alpacax.com and let us know your requirements.

Programmatic access can already be restricted per token: service tokens support IP allowlists and rate limits. See Service tokens.

Migrating from VPN

Because access is granted per user and per server rather than at the network level, many teams retire a VPN that existed only to reach their servers. A phased rollout keeps a fallback in place until you are confident:

  1. Run in parallel: Keep the existing VPN for emergency access, deploy Alpacon to your servers, and let the team get familiar with it.
  2. Migrate gradually: Move non-critical servers first, then teams one at a time, watching usage and gathering feedback.
  3. Decommission the VPN: Remove the VPN client from workstations and close its firewall rules. Keep the infrastructure available for a grace period as a fallback.
  4. Complete the transition: Retire the VPN infrastructure and update your network documentation.

Best practices

For network administrators

  1. Minimize attack surface: Block all inbound ports except essential services.
  2. Segment the network: Isolate servers in separate network segments.
  3. Monitor traffic: Use network monitoring to detect anomalies.
  4. Keep the agent updated: Run the latest Alpamon version.
  5. Log firewall rules: Enable logging on your firewall rules.

For server administrators

  1. Close SSH: Block port 22 once Alpacon is deployed.
  2. Monitor the agent: Watch agent status and connectivity.
  3. Use your proxy: Configure the corporate proxy where required.
  4. Centralize logs: Forward agent logs to your central logging system.

Troubleshooting

Agent shows as offline

Possible causes:

  • Firewall blocking outbound HTTPS or WSS
  • Incorrect proxy configuration
  • Network connectivity problems
  • Invalid agent token

What to check:

# Agent status
sudo systemctl status alpamon
 
# Connectivity to your workspace
curl -v https://<workspace>.<region>.alpacon.io/health
 
# Agent logs
sudo journalctl -u alpamon -f
 
# Test through a proxy
export HTTPS_PROXY=http://proxy:8080
curl -v https://<workspace>.<region>.alpacon.io/health

Slow terminal response

Possible causes:

  • Geographic distance from your workspace region
  • Network congestion
  • Proxy performance

What to try:

  • Choose the region closest to you when creating a workspace.
  • Bypass the proxy for the Alpacon endpoints where possible.
  • Trace the network path with traceroute.
  • Check the server’s own resource usage.

Contact

For network configuration help:

Last updated: