Local forwards
Local forwarding is the most common type of SSH port forwarding. It lets you reach a service on or behind the SSH server by opening a listening port on your own device. Traffic flows from your device, through the encrypted SSH tunnel, and out to the destination on the remote side.
Local forwarding is free on every plan.
Equivalent SSH command: ssh -L [bind_address:]bind_port:remote_host:remote_port user@server
When to use local forwarding
Section titled “When to use local forwarding”Use local forwarding any time you want a service that is only reachable from the SSH server or its local network. Typical cases:
- Web UIs behind a firewall: Proxmox (8006), Grafana (3000), Home Assistant (8123), Portainer (9443), Cockpit (9090).
- Databases: PostgreSQL (5432), MySQL or MariaDB (3306), MongoDB (27017), Redis (6379). Connect your local database client through the tunnel instead of exposing the port to the internet.
- Remote desktop: VNC (5900), RDP (3389). Forward the port and point your viewer at localhost.
- Development servers: a dev server on the SSH host that only listens on its own 127.0.0.1.
- Network equipment admin pages: routers, switches or access points on the server’s network.
How ZestSSH implements it
Section titled “How ZestSSH implements it”When you start a local forward, ZestSSH opens a real TCP listener on the address and port you set. For each connection to it, ZestSSH opens a direct-tcpip SSH channel to the destination host and port, then relays data both ways. This matches OpenSSH’s -L, and several programs can use the same tunnel at once, up to 128 connections at a time per forward.
The port must be between 1 and 65535: ZestSSH does not pick a free port for you, so choose one that nothing else on your device uses.
Bind address options
Section titled “Bind address options”The Bind address decides which network interface on your device the listener uses, and so who can use the tunnel:
| Bind address | Who can connect | When to use |
|---|---|---|
127.0.0.1 (default) |
Only your device | Almost always. This is the safest option. |
0.0.0.0 |
Any device on your local network | When another device (a second laptop, a tablet) should use your tunnel. |
| A specific LAN IP of your device | Devices that can reach that IP | Rare. Useful if your device has several network interfaces and you want only one of them. |
Where you set it:
- Phone or tablet (and a computer’s pop-out window): the Bind address field of the forward (“Use 0.0.0.0 to allow LAN access”).
- Computer, Port forwarding page: in Advanced mode, the host field under Source. Simple mode listens on this device only. On either mode, Let other machines reach it (Simple) or Allow other devices on my network (Advanced) makes the forward listen on every address of this device, as
ssh -gdoes, after you allow it in Let other devices reach this forward?. See Letting other machines in. - Host editor’s Add port forward dialog: no bind address field; its forwards listen on
127.0.0.1.
The bind address, and that switch, are each device’s own. A forward that comes to another device by sync, or with a host shared with you, listens on 127.0.0.1 there until you change it on that device.
Security note: Binding to 0.0.0.0 exposes the tunnel to your whole local network. Anyone on that network can connect to the forwarded port on your device. Only do it on a network you trust.
Step-by-step example: reaching Proxmox on a private network
Section titled “Step-by-step example: reaching Proxmox on a private network”You have an SSH server at bastion.example.com. Behind it there is a Proxmox host at 192.168.10.10 with its web UI on port 8006.
On a phone or tablet
Section titled “On a phone or tablet”- Connect to
bastion.example.comin ZestSSH. - Tap the Port forward button (two arrows) in the session toolbar.
- Tap Add and fill in:
- Type: Local
- Nickname (optional):
Proxmox - Source port:
8006 - Destination host:
192.168.10.10 - Destination port:
8006 - Bind address:
127.0.0.1 - Auto-activate on connect: on
- Tap Add, then tap the play button to start the forward.
- Open your browser at
https://localhost:8006.
On a computer
Section titled “On a computer”- In the side rail, under Manage, click Port forwarding, then New rule.
- Switch to Advanced (Simple mode only reaches
localhoston the server). - Set Name
Proxmox, the Hostbastion.example.com, Type Local (-L), Source127.0.0.1and Source port8006, Destination192.168.10.10and Destination port8006. - Turn on Start automatically if you want it every time you connect.
- Click Save, then Start. If no session is open, choose Connect & start.
- Open your browser at
https://localhost:8006, or click Open localhost:8006 on the running rule. It openshttpsfor a service on port 443, 8006, 8443, 9443 or 10443, andhttpfor any other port.
You will see the Proxmox login page, served through your SSH tunnel.
More examples
Section titled “More examples”PostgreSQL on the server itself:
Source port: 5432Destination host: localhostDestination port: 5432Then connect your database tool to localhost:5432. localhost as the destination host means the SSH server’s own loopback, not your device. On a computer, Simple mode does this with Reach a service on the server, Port here 5432 and Port on server 5432.
Web app dev server on the SSH host:
Source port: 3000Destination host: localhostDestination port: 3000Browse to http://localhost:3000 to see the dev server running on the SSH host.
Internal wiki on another machine on the server’s network:
Source port: 8080Destination host: 192.168.10.25Destination port: 80Browse to http://localhost:8080. The SSH server connects to 192.168.10.25:80 for you.
- Source and destination ports do not have to match. If port 80 is in use on your device, forward from another source port like 8080. The destination port is what matters on the remote side.
- Use the presets on a phone. When you add a forward, the Web chip fills in port 8080 to
localhost:80and Database fills in 5432 tolocalhost:5432. On a computer, Simple mode’s cards do the same job. - Name your forwards. Names like “Proxmox” or “Prod DB” make it easy to tell tunnels apart.
- Start automatically saves time. Turn it on (Auto-activate on connect on a phone, Start automatically on a computer) so the forward starts as soon as you connect.
- If it does not start from a computer’s Port forwarding page, or when it starts by itself on connect, the notice says why, for example “Port 8006 on this device is already in use.” On a phone’s session screen the message names the forward and why, for example “Proxmox did not start: Port 8006 on this device is already in use.”
Related
Section titled “Related”- Port forwarding overview: the three types compared side by side.
- Remote forwards: the reverse direction.
- Jump host: combine a jump host with local forwarding to reach nested networks.