← Back to the blog

Connect an office database to a cloud tool without opening a port: 4 ways compared

Many companies still keep important databases on a server in the office or the factory: the SQL Server of the accounting program, the MySQL of the shop system. The moment you want a cloud tool for reports or for combining data, the first problem is that it cannot reach the database, which sits behind a router and a firewall.

Way 1: port forwarding on the router

Make the router send port 1433 or 3306 from the internet to the database machine. The easiest, and the riskiest: the database is open for the whole world to try passwords, and you need a public IP that does not change. If you really must, restrict the source IPs and require TLS, but most IT teams will say no.

Way 2: a site-to-site VPN

Join the office network and the provider's network with a VPN. Much safer, but it needs a device or server that supports it, configuration on both sides, and most SaaS providers do not set up a VPN per customer.

Way 3: an SSH tunnel through a bastion

Run a bastion host that accepts SSH from the internet; the cloud tool connects over SSH first and then to the database. Safer than exposing the database, and Ruamhub supports SSH tunnels already, but you still open inbound port 22 and look after the bastion.

Way 4: an agent that connects out

Install a small program on a machine in the network. It connects out to the cloud service on 443, like opening a web page, and receives requests over that connection. Nothing connects into your network, so there is no port to open, no public IP needed, and most firewalls already allow it.

How the Ruamhub Agent works

  • Connects out to agent.ruamhub.com on 443 over TLS only.
  • Dials only the host:port entries in the allowed list on that machine, e.g. 192.168.1.20:1433; everything else is refused.
  • Keeps no database data on the machine; its log holds machine names, times and errors.
  • Windows gets a setup program and runs it as a service; Linux and macOS use the command line.

Install on Windows

On the Agents page in Ruamhub, add an agent and download the setup. It shows the terms to accept, asks for the token (you can check it before installing) and the databases it may reach, then installs a Windows service that starts with the machine.

Install on Linux

sudo ./ruamhub-agent install --token rha_... --allow 192.168.1.20:1433 --accept-terms
sudo ./ruamhub-agent status

Then add a connection on the Connections page, choose "Through an agent" and enter the database host and port as if you were on the same network. Every feature works with it: data, SQL, pipelines and reports.

Security checklist

  • Create a separate database user for Ruamhub, read-only if you do not need to edit data.
  • Allow only the databases you need; avoid a whole subnet unless you must.
  • Treat the token like a password; if you suspect it leaked, issue a new one on the Agents page at once.
  • Install on a machine that stays on and sits close to the database; update when the Agents page says a new version is out.

In short: if your IT team already runs a VPN, keep using it; if you have a bastion, an SSH tunnel works. To get started quickly without touching the firewall, an outbound agent is the simplest and safest route. The Ruamhub Agent comes with the Dev plan (1 agent) and Pro (unlimited).

See the Ruamhub Agent →

Bring all your databases into one place

Start free, or book a demo and we will walk through it with your own team’s data.