nanobox tunnel command has been updated with added flexibility in configuring ports used in the port-forward between your local machine and a live component. The tunnel command binds to a port on your local machine and securely forwards requests and data up to a port on your live component over a TLS connection.
Previously, you were only able to specify the local port to which the tunnel would bind. The remote port to which requests and data were forwarded was the default port of the component (
3306 for MySQL,
5432 for Postgres, etc.). With this update, you can now specify both the local port to which the tunnel binds and the remote port to which it forwards.
# Pattern nanobox tunnel [<remote-alias>] <component.id> [-p <local-port>[:[<remote-port>]]] # Examples ## Forwards local port 1234 to default component port nanobox tunnel data.db -p 1234 ## Forwards local port 1234 to remote port 1234 nanobox tunnel data.db -p 1234: ## Forwards local port 1234 to remote port 5678 port nanobox tunnel data.db -p 1234:5678
Some services provide different functionality on different ports. With this update, you can now take advantage of this functionality by forwarding to different remote ports.
RethinkDB's default port for client driver connections is
28015, but it also offers an admin UI on port
8080. By forwarding a local port to
8080 on the remote RethinkDB server, you'll be able to access the RethinkDB Admin panel.
Note: We've been unable to successfully load the admin panel through a tunnel. HTML headers are sent and received, but assets never seem to load. We're currently looking into it.
In order to use the
tunnel command's added flexibility, you must have to most recent version of the Nanobox CLI. To update, run:
Subscribe to Nanobox News
Get the latest posts delivered right to your inbox