Skip to main content

Ports

Reserving static ports.

list

Overview

On the ports page you can reserve a static address in the desired region and use it in TCP, SSHd, Postgres, Redis and Trigger tunnels.

info

Available only with a subscription.

Click the Add button, select the desired region and enter an alias (name) by which you can later use the required port:

add

After adding, you will see a notification with a usage example:

notify

tip

Port 5432 is given as an example, the address and port of your application may differ.

You can view details later:

preview

Usage Examples

note

You will find more examples in the examples section.

PostgreSQL

  1. Reserve a port with the desired alias, for example postgres.
  2. Start the tunnel:
tuna postgres --port=postgres 5432
info

For PostgreSQL we have implemented a special type of tunnels - postgres with the ability to inspect SQL queries, but you can also use a regular TCP tunnel for connection.

tuna tcp --port=postgres 5432
  1. Connect to the database through the tunnel:
psql "postgres://<username>:<password>@ru.tuna.am:38400/<db_name>?sslmode=disable"

or

psql -h ru.tuna.am -p 38400 -U postgres postgres
note

When connecting through a postgres tunnel, SSL is not supported.

Redis

  1. Reserve a port with the desired alias, for example redis.
  2. Start the tunnel:
tuna redis --port=redis 6379
info

For Redis we have implemented a special type of tunnels - redis with the ability to inspect queries, but you can also use a regular TCP tunnel for connection.

tuna tcp --port=redis 6379
  1. Connect through the tunnel:
redis-cli -h ru.tuna.am -p 38400 -a <password>

SSH

  1. Reserve a port with the desired alias, for example ssh.
  2. Start the tunnel:
tuna ssh --port=ssh
info

We have implemented a special type of tunnels with a built-in SSH server, but you can also use a regular TCP tunnel to connect to a standard SSH server.

tuna tcp --port=ssh 22
  1. Connect through the tunnel:
ssh -p 38400 <login>@ru.tuna.am

Trigger

info

Read more about trigger tunnels in a separate guide.

  1. Reserve a port with the desired alias, for example trigger-http.
  2. Start the tunnel:
tuna trigger webhook --port=trigger-http /usr/local/bin/trigger.sh
  1. Connect through the tunnel:
curl -sSLf http://ru.tuna.am:38400

MySQL

  1. Reserve a port with the desired alias, for example mysql.
  2. Start the tunnel:
tuna tcp --port=mysql 6379
  1. Connect through the tunnel:
mysql --host=ru.tuna.am --port=38400 --user=<user_name> --password --database=<database_name> --ssl-mode=disabled

RTSP / IP camera

  1. Reserve a port with the desired alias, for example rtsp.
  2. Start the tunnel:
tuna tcp --port=rtsp 192.168.0.11:554
  1. Connect through the tunnel:
ffmpeg -rtsp_transport tcp -i rtsp://<login>:<password>@ru.tuna.am:38400/stream1

Minecraft

info

For Minecraft we have a detailed guide.

  1. Reserve a port with the desired alias, for example minecraft.
  2. Start the tunnel:
tuna tcp --port=minecraft 25565
  1. Connect in the launcher through the tunnel using the assigned address, for example - ru.tuna.am:38400