📤 Compartilhe este artigo com o link curto:
When provisioning database instances or internal servers on cloud platforms like Oracle Cloud Infrastructure (OCI), one of the most critical architectural errors an administrator can make is assigning public IP addresses directly to these sensitive services or opening database ports (such as Oracle's 1521 or PostgreSQL's 5432) in the VCN public firewall rules.
This direct exposure opens gaps for automated port scans on the internet, brute‑force attacks, and intrusion attempts. The best corporate practice for managing these servers strictly securely without exposing them to the outside world is the use of SSH tunnels with port forwarding (SSH Tunneling / Port Forwarding).
SSH (Secure Shell) is not only used to access remote terminals via command line; it also has the native ability to create an encrypted, point‑to‑point secure communication channel between your local machine and an intermediate server in the cloud (often called a Bastion Host or Jump Host).
Through this encrypted tunnel, network traffic from your local management tool (like Oracle SQL Developer or DBeaver) is encapsulated inside the SSH protocol, allowing you to access private cloud services as if you were directly connected to the company's internal network.
Imagine the following secure architecture scenario:
To connect your local SQL client directly to this private database through the Bastion, you execute the following command in your local machine terminal:
ssh -i /path/to/your/private_key.key -L 1522:10.0.1.15:1521 opc@bastion_public_ip -N
With the tunnel open, when configuring the connection in your local Oracle SQL Developer, simply point the host to localhost (or 127.0.0.1) and use port 1522. The traffic will pass fully encrypted through the Bastion until it reaches the private database with maximum security.
Adopting SSH tunneling for cloud infrastructure management is an indispensable skill for engineers and developers seeking to combine operational agility and absolute rigor in information security.