Sem Agente · Sem Instalação

Jump Server: Security Guide

Jump Server: The Guide to Amplify Your Security — How to Build, Protect, and Not Turn Your Bastion Into the Back Door How a small dedicated server can be the difference between organized support and the next ransomware headline. And how, if misconfigured, it can be the exact door through which the attacker enters.

Jump Server: The Guide to Amplify Your Security — How to Build, Protect, and Not Turn Your Bastion Into the Back Door

How a small dedicated server can be the difference between organized support and the next ransomware headline. And how, if misconfigured, it can be the exact door through which the attacker enters.

Introduction

If you read the previous post about secure remote access, you already know the golden rule: never expose RDP, SSH, or any administrative service directly to the internet. But then the practical question arises: how do the support team, DBAs, sysadmins, and vendors access servers when they need to?

The traditional answer is the jump server — also called bastion host, stepping stone server, jump box. It's a concept that's been around for over 30 years and remains relevant because it solves a fundamental problem: centralizing and controlling all administrative access to an infrastructure.

But here's the paradox: a misconfigured jump server is worse than having no jump server at all. Why? Because it creates a false sense of security. You think you're protected because you have "that bastion", when in reality it became exactly what you should avoid — a single point, known, exposed, and full of privileges.

Part 1: What is (and what is not) a jump server

A jump server is a dedicated machine, hardened to the maximum, positioned as the only point of passage between the external world and critical internal resources.

Instead of each server exposing SSH or RDP, only the jump server accepts connections. Anyone who needs to administer anything must first enter the jump server, and from there reach their destinations.

The analogy: if your infrastructure is a building, the jump server is the front desk with a turnstile. Nobody enters directly into the rooms — everyone passes through the front desk, shows their badge, gets registered.

What is NOT a jump server:

  • "Any" server with TeamViewer
  • VPN (VPN puts you on the network; jump gives you access to a specific machine)
  • Production server
  • Substitute for identity management
  • "Secure by existing"

Why it exists:

  1. Reduces attack surface (1 point vs N)
  2. Centralizes authentication and authorization
  3. Centralizes logs and auditing
  4. Enables session recording
  5. Applies uniform policies
  6. Serves as a quarantine point
  7. Supports vendors without pain
  8. Low cost

Part 2: Architectures

2.1 Simple jump server

Internet → [Firewall] → [Jump] → [Servers]

For small teams. Limitation: single point of failure and compromise.

2.2 Dual jump server (chained)

Internet → [FW ext] → [Jump 1 DMZ] → [FW int] → [Jump 2 internal] → [Servers]

For regulated environments. Attacker needs to compromise two servers.

2.3 Jump server with broker / PAM

Broker validates everything, retrieves temporary credentials from the vault, establishes the session without showing the password. Solutions: CyberArk, BeyondTrust, Delinea, HashiCorp Boundary, Teleport.

2.4 Multi-tenant jump server (MSPs)

Centralizes access to multiple clients. Beware: becomes the dream target. Ideally, each client should have their own segregated jump.

Part 3: What needs to be inside

3.1 Minimalist operating system

Jump server is not a workstation. No Office, no browser, no application, nothing non-essential.

# Ubuntu/Debian minimal
sudo apt install --no-install-recommends openssh-server ufw fail2ban auditd rsyslog
sudo apt purge -y telnetd rsh-server xinetd nis ypbind tftp tftpd talk talkd snmpd
sudo apt autoremove -y

sudo ss -tulpn
sudo systemctl list-units --type=service --state=running

Windows: use Server Core whenever possible.

3.2 Only necessary tools

Typical Linux jump has: OpenSSH, RDP client (xfreerdp), mysql/psql client, nmap, dig, traceroute, tcpdump, vim, tmux, ansible.

Typical Windows jump has: mstsc, PuTTY, RSAT, PowerShell modules, SSMS.

What it should NOT have: browser, email, Office, Adobe Reader, Java client, personal software, compilers.

Rule: if you can't justify it, it doesn't need to be there.

3.3 Network and segmentation

Inbound:

  • Access port only (SSH, RDP, or HTTPS via ZTNA)
  • Whitelist of source IPs
  • Geographic blocking

Outbound:

  • Only ports necessary to allowed destinations
  • Block unrestricted outbound to internet — critical

If the attacker compromises the jump, the first thing will be to download tools and connect to C2. By blocking outbound, you break the chain.

3.4 SSH hardening

# /etc/ssh/sshd_config

Port 52281
AddressFamily inet
ListenAddress 0.0.0.0

PermitRootLogin no
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
KbdInteractiveAuthentication no
UsePAM yes
PubkeyAuthentication yes

AllowGroups jump-users

X11Forwarding no
AllowAgentForwarding no
AllowStreamLocalForwarding no
GatewayPorts no
PermitTunnel no
AllowTcpForwarding yes

MaxAuthTries 3
MaxSessions 4
MaxStartups 10:30:60
LoginGraceTime 30
ClientAliveInterval 300
ClientAliveCountMax 2

KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com

LogLevel VERBOSE
SyslogFacility AUTH

Banner /etc/ssh/banner.txt

Legal banner:

*****************************************************************
                    RESTRICTED AND MONITORED ACCESS

This system is for the exclusive use of authorized personnel.
All activities are logged and monitored.
Unauthorized use may result in disciplinary action
and/or criminal prosecution.

By continuing, you agree to these conditions.
*****************************************************************

3.5 Windows hardening

  • Server Core without GUI
  • NLA enabled
  • SMB v1 disabled
  • Defender + Credential Guard + Device Guard
  • AppLocker or WDAC for execution whitelist
  • LAPS for automatic local password rotation
  • Complete Audit Policies with forwarding to SIEM
  • PowerShell v2 disabled
  • PowerShell Constrained Language Mode
  • CIS Benchmark applied via GPO

Part 4: Authentication and authorization

4.1 Mandatory MFA

No exceptions. For everyone. Always.

Linux with Google Authenticator:

sudo apt install libpam-google-authenticator
google-authenticator

# /etc/pam.d/sshd
auth required pam_google_authenticator.so

# /etc/ssh/sshd_config
ChallengeResponseAuthentication yes
KbdInteractiveAuthentication yes
UsePAM yes
AuthenticationMethods publickey,keyboard-interactive

The AuthenticationMethods publickey,keyboard-interactive directive forces key and TOTP.

FIDO2 hardware tokens (more secure):

ssh-keygen -t ed25519-sk -f ~/.ssh/id_ed25519_sk

The private key stays inside the physical token (YubiKey). Even malware on the machine cannot extract it.

4.2 Principle of least privilege

  • Groups by function (dba-mysql, sysadmin-linux, support-tier1, vendor-acme)
  • Granular sudo, never ALL
  • Restricted shell when possible (rbash, lshell)
  • Filesystem ACLs

Example /etc/sudoers.d/dba-mysql:

%dba-mysql ALL=(root) NOPASSWD: /bin/systemctl restart mysql
%dba-mysql ALL=(root) NOPASSWD: /bin/systemctl status mysql
%dba-mysql ALL=(root) NOPASSWD: /bin/journalctl -u mysql *
%dba-mysql ALL=(mysql) /usr/bin/mysql

4.3 Centralized authentication

Don't use local accounts. Integrate with AD/LDAP/Azure AD/Okta/Google Workspace.

Advantages:

  • Fired someone? Deactivate in AD, jump access drops with it
  • Centralized MFA
  • Centralized logs
  • No orphan accounts
# Linux with AD via SSSD
sudo apt install sssd realmd adcli krb5-user samba-common-bin
sudo realm join dominio.empresa.local --user=admin

4.4 Just-in-time (JIT) access

User doesn't have permanent access. Requests, justifies, is approved, expires.

Solutions: CyberArk, Teleport, HashiCorp Boundary + Vault, Azure PIM, AWS Session Manager.

Simple version with script:

#!/bin/bash
USER=$1
HOURS=$2

usermod -a -G jump-users $USER
echo "gpasswd -d $USER jump-users" | at now + $HOURS hours

Part 5: Logs, session recording, and auditing

5.1 Detailed logs

Linux with auditd:

sudo apt install auditd audispd-plugins

# /etc/audit/rules.d/jump-server.rules
-w /etc/passwd -p wa -k passwd_changes
-w /etc/shadow -p wa -k shadow_changes
-w /etc/sudoers -p wa -k sudoers_changes
-w /etc/sudoers.d/ -p wa -k sudoers_changes
-w /etc/ssh/sshd_config -p wa -k sshd_config

-a always,exit -F arch=b64 -S execve -F euid=0 -F auid>=1000 -F auid!=4294967295 -k privileged_exec
-a always,exit -F arch=b64 -S connect -k network_connect
-a always,exit -F arch=b64 -S execve -k command_exec

sudo systemctl enable auditd
sudo systemctl start auditd

Centralize everything to a SIEM (Wazuh, Graylog, ELK, Splunk). Local logs don't help if the attacker deletes them.

5.2 Session recording

The most powerful feature of a well-built jump server. Record everything every admin does.

Why it's powerful:

  • Forensic investigation: you watch, you don't guess
  • Compliance: PCI-DSS, ISO 27001, SOX, LGPD
  • Training: review bad practices
  • Deterrence: admins act more carefully when they know they're being recorded
  • Dispute resolution: "I didn't do that" stops working

tlog (Red Hat, open-source):

sudo apt install tlog

# /etc/tlog/tlog-rec-session.conf
{
    "shell": "/bin/bash",
    "notice": "\nWARNING: This session is being recorded for audit purposes.\n",
    "writer": "journal",
    "log": {
        "input": true,
        "output": true,
        "window": true
    }
}

sudo usermod -s /usr/bin/tlog-rec-session usuario

Replay with:

tlog-play -r journal -M TLOG_USER=usuario

Other tools:

  • auditd with ttyaudit
  • asciinema (informal scenarios)
  • CyberArk PAM (commercial)
  • BeyondTrust
  • Teleport (open-source with commercial features)
  • Apache Guacamole (HTML5 gateway with video recording)

Important:

  1. Warn users (explicit banner; in some countries recording without notice is illegal)
  2. Protect recordings (restricted access, encryption)
  3. Define retention (PCI-DSS requires 1 year minimum)
  4. Be careful with sensitive data in recordings

5.3 Log centralization

Local logs are disposable logs. Attacker deletes them first.

# /etc/rsyslog.d/forward.conf
*.* @@siem.empresa.local:6514  # TCP with TLS

Forward in real-time, not in batches.

Part 6: Patches and lifecycle

  • Critical patches: within 48 hours
  • Normal patches: weekly/biweekly cycle
  • Reboot: when necessary
  • Snapshot/backup: always before changes
  • Golden image: keep hardened, rebuild periodically

Periodic rebuilding: every 3-12 months, destroy and rebuild from scratch via Ansible/Terraform/Packer. Eliminates drift, accumulated garbage, any undetected backdoors. It's like changing your front door lock periodically.

Part 7: Monitoring and response

7.1 What to monitor

  • Multiple failed login attempts
  • Login at atypical hours
  • Login from geographically atypical IP
  • Login by user who doesn't normally use the jump
  • wget or curl (attempt to download payload)
  • Execution in /tmp, /var/tmp, /dev/shm
  • Modification of /etc/passwd, /etc/shadow, /etc/ssh/sshd_config
  • Creation of new users
  • Changes to sudoers
  • Unexpected outbound connections
  • Sudden spike in traffic
  • Processes running as root without reason
  • Privilege escalation without approval

7.2 Real-time alerts

Immediate notification (pager, SMS) for critical events. Not next-day reports.

7.3 Incident response

Runbook ready for "jump server was compromised":

  1. Immediate isolation (disconnect from network in 30 seconds)
  2. Evidence preservation (snapshot, memory dump, log copy)
  3. Communication (who to notify, in what order)
  4. Investigation (who, with which tools)
  5. Recovery (rebuild from scratch — NEVER clean in-place)
  6. Postmortem and lessons learned

Part 8: Modern alternatives

8.1 ZTNA

Cloudflare One, Tailscale, Twingate, Teleport replace traditional jump server. No exposed port, application-based access, centralized controls.

8.2 Full PAM

CyberArk, BeyondTrust, Delinea, HashiCorp Boundary + Vault. Go beyond: manage passwords, rotate credentials, just-in-time, record sessions, SIEM, compliance dashboards.

8.3 Cloud-native

  • AWS Systems Manager Session Manager
  • Azure Bastion
  • Google Cloud IAP

Cloud provider maintains the bastion for you.

8.4 When to still use traditional jump

  • On-premise without cloud
  • Sovereignty/compliance requiring no SaaS dependency
  • Zero budget
  • Legacy equipment
  • Full stack control required

Part 9: Common mistakes

  1. Jump with unrestricted outbound to internet — attacker downloads tools and exfiltrates
  2. Same jump for "everything" — support, DBA, dev, vendor sharing
  3. No MFA because "it slows down work"
  4. Credential sharing — when it goes bad, nobody knows who did it
  5. Delayed patches — "it's working, I won't touch it"
  6. Local logs without centralization
  7. No active monitoring — centralized logs but nobody looks
  8. Jump on flat network — compromised jump, compromised everything
  9. No credential rotation — password that hasn't changed in 5 years
  10. No periodic review — intern from 2 years ago still in the group

Final checklist

OPERATING SYSTEM
[ ] Minimal installation
[ ] Only strictly necessary tools
[ ] Patches up to date
[ ] Snapshot/backup before changes
[ ] Golden image documented
[ ] Periodic rebuild scheduled

NETWORK
[ ] Dedicated segment
[ ] Whitelist of source IPs
[ ] Geographic blocking
[ ] Outbound to internet blocked
[ ] Outbound to internal restricted
[ ] Trusted internal DNS

SSH
[ ] Non-standard port
[ ] PermitRootLogin no
[ ] PasswordAuthentication no
[ ] ED25519 or FIDO2 keys
[ ] AuthenticationMethods publickey,keyboard-interactive
[ ] AllowGroups restrictive
[ ] X11/Agent forwarding disabled
[ ] Limits configured
[ ] Modern algorithms
[ ] Legal banner
[ ] fail2ban active

WINDOWS
[ ] Server Core
[ ] NLA enabled
[ ] SMB v1 disabled
[ ] Defender + Credential Guard + Device Guard
[ ] AppLocker / WDAC
[ ] LAPS
[ ] PowerShell Constrained Language Mode
[ ] CIS Benchmark via GPO

AUTHENTICATION
[ ] Mandatory MFA
[ ] Central identity provider
[ ] No local accounts (except break-glass)
[ ] Least privilege
[ ] Granular sudo
[ ] Just-in-time where possible
[ ] Quarterly review

LOGS AND AUDITING
[ ] auditd / Audit Policy
[ ] Real-time forward to SIEM
[ ] Session recording
[ ] Retention defined (≥1 year)
[ ] Logs encrypted in transit
[ ] Restricted access

MONITORING
[ ] SIEM receiving events
[ ] Alert rules
[ ] Immediate notification
[ ] Health dashboard
[ ] Drift detection

INCIDENT RESPONSE
[ ] Documented runbook
[ ] Isolation procedure tested
[ ] Rebuild plan
[ ] Communication defined
[ ] Postmortem after incident

GOVERNANCE
[ ] Documentation updated
[ ] Inventory of who has access
[ ] Formally approved policy
[ ] Periodic reviews scheduled
[ ] Administrator training

Final considerations

Jump server seems simple until you start doing it right. The "quick" version — VM with SSH open that everyone uses — takes half an hour. The "right" version — complete hardening, MFA, session recording, SIEM, segmentation, JIT — takes weeks and requires ongoing processes.

But the right version is the only one that actually protects. The quick version is just another exposed server with elevated privileges.

Start with essentials: basic hardening, MFA, centralized logs, segmentation. Keep evolving. Each control reduces the attack surface a bit more.

And monitor continuously. The jump configured perfectly today can regress tomorrow when someone "just to quickly fix a problem" reopens a port. Without continuous monitoring, hardening is a photo, not a movie.

SentinelHub does exactly this: monitors your public IPs, identifies exposed ports and services (including the jump server), alerts when something new appears, identifies vulnerable versions, in English. If your jump reappears with standard port 22 tomorrow because someone forgot, you'll know.

Found it useful? Share with your infrastructure team. Especially that guy who said "oh, jump server is just frills".