Setting Up Remote SSH Access via NAT Traversal

Deploying a NAT Traversal Tunnel for External SSH Connectivity

A NAT traversal service bridges the gap betwean a remote client and a server situated behind a firewall or NAT device. This walkthrough covers establishing an SSH pipe using a cloud-based relay platform.

Provisioning the Tunnel on the Management Console

  1. Navigate to the service dashboard and authenticate.
  2. From the left panel, open NAT Traversal > Internal Networks and create a new network.
  3. Open the newly created network, then provision a tunnel entry. Configure the destination as your local SSH port (typically 22) and save the settings.

The console will generate a unique token string used later for binding your on-premises device.

Installing the Tunnel Client on Ubuntu 22.04

Switch to the root account and download the client binary:

su - root
mkdir -p /opt/nattunnel && cd /opt/nattunnel
curl -fsSL -o nattunnel https://www.uulap.com/download/nattunnel.linux.amd64/nattunnel
chmod 755 nattunnel

Retrieve your network token from the web dashboard. Execute the binding command with your token, for example:

nohup /opt/nattunnel/nattunnel -t <YOUR_NETWORK_TOKEN> > /var/log/nattunnel.log 2>&1 &

Once the process logs confirmation and runs in the background, the tunnel endpoint becomes active.

Persistent Service Configuration

To ensure the tunnel re-establishes after a system reboot, install the startup helper script and ensert your token into the rc.local file:

curl -fsSL --no-check-certificate https://www.uulap.com/download/rc-local-install.sh | bash
sed -i 's/\*\*\*\*-\*\*\*\*-\*\*\*\*-\*\*\*\*/<YOUR_NETWORK_TOKEN>/g' /etc/rc.local

Manually verify the service file contains the correct token string.

Connecting via SSH

The dashboard provides a public IP address and a dynamically assigned port. Use them to initiate SSH sessions:

ssh user@<PROVIDED_IP> -p <EXTERNAL_PORT>

Upgrading to Premium Routes

The free tier allows a brief trial before requiring a subscription. Select the desired plan through the billing section—options range from monthly to annual commitments (e.g., ¥100/year). After purchasing, return to the tunnel configuration panel and choose a premium relay node for lower latency. Update your SSH target IP accordingly if the host address changes.

Diagnostics and Custom Ports

From the console’s tunnel list, the Diagnose button tests client connectivity, while Configuration lets you assign a static external port number. Switching relay nodes immediately updates the access endpoint.

Tags: ssh NAT Traversal Remote Access Linux Ubuntu

Posted on Sun, 19 Jul 2026 16:49:06 +0000 by romano2717