How to Configure a Jump Server to Allow Access to a Local Server Web GUI from a Remote Client Machine

Abstract: Configure an SSH jump host to securely tunnel local server web GUI access from a remote client through a bastion server.

Created: 2026-08-21 by
You can securely access a local server's web GUI from a remote machine by configuring an SSH jump host (also known as a bastion host) on Ubuntu. This method tunnels your browser traffic through the jump server, bypassing firewall restrictions and exposing only the necessary SSH port to the public internet.

Understanding the Network Topology

In this scenario, you have three distinct machines involved in the connection chain. The first is your Local Server, which hosts the web application or graphical interface you wish to view. This machine is typically behind a NAT or firewall and does not have a public IP address, making it unreachable directly from the outside world. The second component is the Jump Server. This is a cloud-based or publicly accessible Ubuntu machine with a static public IP address. Its sole purpose is to act as a bridge. It has inbound SSH access enabled but does not need to run the web service itself. The third is your Remote Client, which is your personal laptop or desktop computer located anywhere on the internet. Your goal is to open a browser on this client that displays content served by the Local Server, as if you were sitting in front of it. This architecture is critical for security. By restricting direct access to the Local Server, you reduce the attack surface significantly. You only need to secure the Jump Server against unauthorized SSH access, while the actual data payload travels through an encrypted tunnel between the Jump Server and the Local Server.

Configuring SSH on the Jump Server

Before establishing the tunnel, ensure your Jump Server is properly configured to accept connections. Since this server will be exposed to the internet, hardening its SSH configuration is essential. First, verify that the OpenSSH server is installed and running:
sudo systemctl status ssh
If it is not active, start it with:
sudo systemctl enable --now ssh
Next, edit the SSH daemon configuration file to enforce key-based authentication and disable password logins. This prevents brute-force attacks using common passwords.
sudo nano /etc/ssh/sshd_config
Locate the following directives and modify them:
  • PubkeyAuthentication yes: Ensures only users with valid keys can connect.
  • PasswordAuthentication no: Disables password entry entirely.
  • PermitRootLogin prohibit-password: Allows root login only via keys, or set to no for stricter security.
After saving these changes, restart the SSH service to apply the new settings:
sudo systemctl restart ssh
It is also advisable to configure a firewall, such as UFW, to allow only SSH traffic (port 22) from specific trusted IPs if possible, though standard practice often allows SSH from any IP while relying on strong keys. For more details on general remote connectivity issues, see our guide on Troubleshooting: Can't Connect to VM Remotely.

Establishing the SSH Tunnel

The core mechanism for accessing the web GUI is an SSH dynamic port forwarding tunnel. This creates a SOCKS proxy on your local machine that routes traffic through the Jump Server to the Local Server. On your Remote Client machine, open a terminal and execute the following command. Replace the placeholders with your actual credentials and IP addresses.
ssh -D 1080 -C -N -l username jump-server-ip
Let us break down the flags used here:
  • -D 1080: Specifies a dynamic port on your local machine (localhost:1080) that acts as a SOCKS5 proxy.
  • -C: Enables compression, which can improve performance over slower connections.
  • -N: Tells SSH not to execute a remote command. This keeps the connection open solely for forwarding ports.
  • -l username: Specifies the user account on the Jump Server.
  • jump-server-ip: The public IP address of your Ubuntu jump server.
When prompted, enter your SSH key passphrase or authenticate via your key agent. Once connected, the terminal will appear to hang; this is normal behavior indicating the tunnel is active. Do not close this window, as closing it will terminate the tunnel. To make the connection more robust, especially if you are connecting to the Local Server through the Jump Server, you might use the -J flag (ProxyJump) if your client supports newer SSH versions. However, the dynamic forward method described above is universally compatible.

Configuring Your Browser

With the SSH tunnel active, you must configure your web browser to send traffic through the SOCKS proxy you just created. The steps vary slightly depending on the browser, but the logic remains the same. For Firefox:
  1. Navigate to Settings > Network Settings.
  2. Select Manual proxy configuration.
  3. Set the Socks Host to localhost and the Port to 1080.
  4. Check the box for Proxy DNS when using SOCKS v5. This ensures that domain resolution happens remotely, preventing leaks.
For Chrome or Edge: These browsers do not easily support system-wide SOCKS proxies via their UI without extensions. You may need to install a browser extension like "SwitchyOmega" or launch the browser with command-line arguments specifying the proxy:
google-chrome --proxy-server="socks5://localhost:1080"
Once configured, navigate to the internal IP address of your Local Server's web GUI (e.g., http://192.168.1.50:8080). The request will travel from your browser to localhost:1080, then through the SSH tunnel to the Jump Server, and finally to the Local Server. The response returns along the same encrypted path. If you encounter connectivity issues, check if the Local Server is actually listening on the expected port. You can test this by SSHing into the Jump Server and trying to curl the Local Server's IP from within the Jump Server's network context. If the tunnel works but the page doesn't load, the issue is likely at the application layer on the Local Server rather than the SSH configuration.

Maintaining and Securing the Connection

Keeping an SSH session open indefinitely can be problematic if your internet connection drops. To manage this, consider using autossh, a tool that monitors the SSH tunnel and restarts it automatically if the connection fails. Install autossh on your client:
sudo apt install autossh
Then replace the manual ssh command with:
autossh -M 0 -D 1080 -C -N -l username jump-server-ip
The -M 0 flag disables the monitoring port because we are using the same channel for data and monitoring, which simplifies setup. Security best practices dictate that you should never expose the Local Server's web GUI to the public internet. Always rely on this tunneling method. Additionally, regularly update both the Jump Server and the Local Server to patch any vulnerabilities in the SSH daemon or the web application itself.

Frequently Asked Questions

Can I use this method to access other services besides web GUIs?

Yes, this technique works for any TCP-based service, including databases, FTP servers, or VNC desktop environments. As long as the service listens on a specific port, you can forward it through the SSH tunnel using the same dynamic SOCKS proxy or specific port forwarding flags.

What happens if my internet connection drops during the session?

If you are using a manual SSH command, the tunnel will break, and your browser will lose connection until you reconnect. Using autossh helps mitigate this by automatically restarting the tunnel once the network stabilizes, ensuring minimal downtime for your remote access.

Is it safe to leave the SSH tunnel open for days?

While technically feasible, leaving tunnels open for extended periods increases the risk of disconnection due to network timeouts or router resets. It is safer to use a tool like tmux or screen on the server side, or autossh on the client side, to handle reconnections gracefully without manual intervention.

How do I troubleshoot if the browser shows a "Connection Refused" error?

First, verify that the Local Server is running and listening on the correct port. Second, ensure that the Jump Server can reach the Local Server internally. Finally, check that your browser is correctly configured to use the SOCKS proxy on localhost port 1080 and that no other firewall rules are blocking the loopback interface.

Do I need to open any additional ports on the Jump Server?

No, you only need port 22 (SSH) open on the Jump Server. The dynamic port forwarding uses the existing SSH connection to carry all subsequent traffic. Opening additional ports would defeat the purpose of hiding the Local Server behind the jump host.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More