Services DevOps DevSecOps Cloud Consulting Infrastructure Automation Managed Services AIOps MLOps DataOps Microservices 🔐 Private AINEW Solutions DevOps Transformation CI/CD Automation Platform Engineering Security Automation Zero Trust Security Compliance Automation Cloud Migration Kubernetes Migration Cloud Cost Optimisation AI-Powered Operations Data Platform Modernisation SRE & Observability Legacy Modernisation Managed IT Services 🔐 Private AI DeploymentNEW Products ✨ ZippyOPS AINEW 🛡️ ArmorPlane 🔒 DevSecOpsAsService 🖥️ LabAsService 🤝 Collab 🧪 SandboxAsService 🎬 DemoAsService Bootcamp 🔄 DevOps Bootcamp ☁️ Cloud Engineering 🔒 DevSecOps 🛡️ Cloud Security ⚙️ Infrastructure Automation 📡 SRE & Observability 🤖 AIOps & MLOps 🧠 AI Engineering 🎓 ZOLS — Free Learning Company About Us Projects Careers Get in Touch

Configure Nginx Proxy for Windows Jump Host to Linux

How to Set Up Nginx Proxy for a Windows Jump Host to Linux Servers

Using Nginx proxy, you can configure your Windows machine to act as a jump host for Linux servers, enabling secure SSH traffic forwarding. This guide walks you through the steps to make this setup secure and efficient.

Nginx proxy configuration for Windows jump host to Linux server setup

Step 1: Install and Configure Nginx on Windows

To begin, you need to have Nginx installed on your Windows machine. If not yet installed, download and extract the latest version from the official Nginx website. After installation, configure Nginx to forward SSH traffic from Windows to Linux servers.

  1. Stop the Nginx Service
    In your command line interface (CLI), stop the Nginx service: ./nginx.exe -s stop
  2. Edit the Nginx Configuration File
    Open the Nginx configuration file and add the following configuration to forward SSH traffic: stream { server { listen 192.168.0.23:2222; proxy_pass 192.168.0.106:22; } } Here:
    • 192.168.0.23 is the Windows jump host IP.
    • 192.168.0.106 is the Linux server’s IP.
    • Port 2222 is used for SSH forwarding.

Step 2: Finalize the Nginx Configuration

Once the SSH forwarding configuration is added, your full Nginx configuration should look like this:

stream {
    server {
        listen 192.168.0.23:2222;
        proxy_pass 192.168.0.106:22;
    }
}

worker_processes 1;

events {
    worker_connections 1024;
}

http {
    include mime.types;
    default_type application/octet-stream;
    sendfile on;
    keepalive_timeout 65;

    server {
        listen 8080 ssl;
        server_name 192.168.0.23;

        ssl_certificate C:\SSL\certificate.crt;
        ssl_certificate_key C:\SSL\privatekey.key;

        location /service_name {
            proxy_pass http://192.168.0.48:5985/wsman;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 10m;
            client_body_buffer_size 128k;
            proxy_connect_timeout 90;
            proxy_send_timeout 90;
            proxy_read_timeout 90;
            proxy_buffers 32 4k;
        }
    }
}

After saving your changes, restart Nginx:

./nginx.exe

Step 3: Set Up the Ansible Inventory File

Next, update your Ansible inventory file to connect to the Linux server via the Windows jump host.

  1. Edit the Ansible Inventory File
    Open the Ansible inventory file (e.g., /etc/ansible/workspace/myhosts1) and configure it as follows: [test] 192.168.0.106 [test:vars] ansible_ssh_user=root ansible_ssh_pass=zippyops ansible_ssh_extra_args="-R 2222:192.168.0.23:2222" This configuration tells Ansible to forward traffic through the Windows jump host at 192.168.0.23 and port 2222.
  2. Test the Connection
    Once configured, test the connection by running: ansible all -m ping If configured correctly, Ansible will ping the target Linux server through the Windows jump host.

Why Use a Jump Host for Linux Server Access?

A jump host acts as an intermediary that secures connections between your local system and a remote Linux server. By using a Windows machine as a jump host, you enhance security by reducing exposure and simplifying access management.

For businesses looking to optimize operations and enhance security, ZippyOPS offers expert consulting and managed services in areas such as DevOps, Cloud, Automated Ops, and more. ZippyOPS helps organizations implement robust solutions for efficient management of infrastructure, data, and security.

For example, ZippyOPS specializes in DevSecOps, AIOps, MLOps, and Microservices solutions, enabling businesses to drive automation and optimize their IT environments. Explore our services and products.

Conclusion

Using Nginx proxy to set up a Windows machine as a jump host for Linux servers allows you to securely forward SSH traffic, improving access management and security. For businesses seeking advanced infrastructure management, ZippyOPS offers a range of solutions to enhance operational efficiency. Contact us today at sales@zippyops.com for professional services tailored to your needs.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top