Skip to main content

Tunnel Setup

Learn how to create and configure secure HTTPS tunnels.

Basic Tunnel

arm tunnel 3000

This creates a tunnel from a random subdomain to your local port 3000.

Custom Subdomain

arm tunnel 3000 --subdomain myapp

Your server is now accessible at https://myapp.free-tunnelapi.app

Tunnel Options

OptionDescriptionExample
--subdomain, -sCustom subdomain--subdomain myapp
--hostLocal hostname--host 192.168.1.100
--authRequire authentication--auth
--rate-limitRequests per minute--rate-limit 100
--ip-whitelistAllowed IPs--ip-whitelist "1.2.3.4"

How Tunnels Work

┌─────────────┐     ┌──────────────────┐     ┌─────────────┐
│ Browser │────▶│ TunnelAPI.in │────▶│ localhost │
│ │◀────│ (WebSocket) │◀────│ :3000 │
└─────────────┘ └──────────────────┘ └─────────────┘


┌──────────────┐
│ ARM CLI │
│ (Your PC) │
└──────────────┘
  1. CLI establishes WebSocket connection to tunnel server
  2. Incoming HTTP requests are forwarded through WebSocket
  3. CLI forwards requests to your local server
  4. Responses travel back through the same path

Supported Protocols

  • HTTP/HTTPS - Web traffic (default)
  • WebSocket - Real-time connections
  • Server-Sent Events - Streaming responses
  • TCP/SSH - Raw TCP connections and SSH tunneling

SSH Tunneling

Expose your local SSH server or any TCP service to the internet.

Expose Local SSH Server

# Expose local SSH server (port 22) with SSH protocol
arm tunnel 22 -p ssh -s my-ssh-server

Output:

============================================================
🎉 Tunnel Active!
============================================================
Public URL: https://my-ssh-server.free-tunnelapi.app
Local Port: 22
Subdomain: my-ssh-server
Protocol: ssh
============================================================
🔌 TCP/SSH Tunnel Info:
TCP Host: free-tunnelapi.app
TCP Port: 2222
============================================================
SSH Command Example:
ssh -o ProxyCommand="echo 'SUBDOMAIN:my-ssh-server' | nc %h %p" user@free-tunnelapi.app -p 2222
============================================================

Connect to Your SSH Server

Linux/Mac

With Password Authentication:

ssh -o ProxyCommand="echo 'SUBDOMAIN:my-ssh-server' | nc %h %p" your-user@free-tunnelapi.app -p 2222

With SSH Key (Passwordless):

ssh -i ~/.ssh/your_key.pem -o ProxyCommand="echo 'SUBDOMAIN:my-ssh-server' | nc %h %p" your-user@free-tunnelapi.app -p 2222

Add to ~/.ssh/config for easier access:

# With password
Host my-remote-server
HostName free-tunnelapi.app
Port 2222
User your-user
ProxyCommand echo 'SUBDOMAIN:my-ssh-server' | nc %h %p

# With SSH key (passwordless)
Host my-remote-server-key
HostName free-tunnelapi.app
Port 2222
User your-user
IdentityFile ~/.ssh/your_key.pem
ProxyCommand echo 'SUBDOMAIN:my-ssh-server' | nc %h %p

Then simply:

ssh my-remote-server        # with password
ssh my-remote-server-key # with key

Windows

On Windows, you need to install ncat (from Nmap) or use WSL.

With Password Authentication:

ssh -o ProxyCommand="ncat free-tunnelapi.app 2222" your-user@free-tunnelapi.app

With SSH Key (Passwordless):

ssh -i C:\Users\YourUser\.ssh\your_key.pem -o ProxyCommand="ncat free-tunnelapi.app 2222" your-user@free-tunnelapi.app

Using WSL:

# With password
ssh -o ProxyCommand="wsl bash -c \"echo 'SUBDOMAIN:my-ssh-server' | nc %h %p\"" your-user@free-tunnelapi.app -p 2222

# With key
ssh -i ~/.ssh/your_key.pem -o ProxyCommand="wsl bash -c \"echo 'SUBDOMAIN:my-ssh-server' | nc %h %p\"" your-user@free-tunnelapi.app -p 2222
SSH Key Permissions

Make sure your SSH key has correct permissions:

  • Linux/Mac: chmod 600 ~/.ssh/your_key.pem
  • Windows: Right-click → Properties → Security → Remove all users except your account

TCP Tunneling for Other Services

Expose any TCP service (MySQL, PostgreSQL, Redis, etc.):

# Expose MySQL (port 3306)
arm tunnel 3306 -p tcp -s my-mysql

# Expose PostgreSQL (port 5432)
arm tunnel 5432 -p tcp -s my-postgres

# Expose Redis (port 6379)
arm tunnel 6379 -p tcp -s my-redis

Use Cases

  • Remote Development: Access your development machine from anywhere
  • Database Access: Securely connect to local databases remotely
  • IoT Devices: Expose SSH on Raspberry Pi or other devices
  • Home Server: Access home server without port forwarding

Keep Tunnel Alive

The CLI automatically reconnects on network issues. For long-running tunnels:

# Run in background
nohup arm tunnel 3000 --subdomain myapp &

# Or use a process manager
pm2 start "arm tunnel 3000 --subdomain myapp" --name my-tunnel

Multiple Tunnels

Create multiple tunnels simultaneously:

# Terminal 1
arm tunnel 3000 --subdomain frontend

# Terminal 2
arm tunnel 5000 --subdomain api