Learn how to access services hosted on a remote network (such as an internal web server or application) from your local machine by leveraging a jumphost (also known as a bastion host) and SSH local port forwarding.
SSH local port forwarding creates a secure tunnel between your local machine and a remote server (via the jumphost). This tunnel allows you to securely access services running on the remote network by forwarding your local port traffic through the SSH connection.
✅ Local machine with SSH client (Linux/macOS terminal or Windows PuTTY).
✅ SSH credentials for the jumphost.
✅ Access to the remote service from the jumphost.
Remote Service Host IP/Hostname: 10.5.1.102
Remote Service Port: 80 (HTTP example)
Jumphost IP/Hostname: 100.105.71.94
Jumphost Username: user (replace with actual username)
Open a terminal and run:
ssh -L 8080:10.5.1.102:80 user@100.105.71.94
Explanation:
-L 8080:10.5.1.102:80:
Listen on your local port 8080.
Forward traffic to the 10.5.1.102:80 service through SSH.
user@100.105.71.94:
Replace user with your actual SSH username.
This creates a secure tunnel from your local port 8080 to the remote service.
Open your browser and navigate to: http://localhost:8080
If you’re using PuTTY, follow these steps:
1️⃣ Open PuTTY and enter the jumphost IP: 100.105.71.94.
2️⃣ In the Category tree, navigate to: Connection > SSH > Tunnels (see step 1,2,3 on below screenshot)