alpacon tunnel
Create a secure TCP tunnel between your local machine and a remote server. This allows you to forward a local port to a remote port, enabling access to services running on the server (such as databases, web applications, or internal APIs) through a secure connection.
alpacon tunnel SERVER -l LOCAL -r REMOTE [flags]
Options
-h, --help help for tunnel
-l, --local string Local address to listen on (e.g., 8080 or 127.0.0.1:8080)
-r, --remote string Remote address to connect to (e.g., 3306 or 127.0.0.1:3306)
-u, --username string Specify username
-g, --groupname string Specify groupname
-v, --verbose Enable verbose output for debugging
Examples
Forward local port 8080 to remote port 80:
alpacon tunnel my-server -l 8080 -r 80
Access a remote database locally:
alpacon tunnel my-server -l 3306 -r 3306
Forward with specific local bind address:
alpacon tunnel my-server -l 127.0.0.1:5432 -r 5432
Enable verbose output for debugging:
alpacon tunnel my-server -l 8080 -r 80 -v
Tunnel as a specific user:
alpacon tunnel -u admin my-server -l 8080 -r 80