20: Warpgate - SSH Bastion Host
Warpgate is a securemodern SSH/RDP bastion host providing centralized access control, session recording, and web-based management. It acts as a gateway for all SSH gatewayconnections, (alsoreducing calledthe aattack "bastionsurface host")by thateliminating providesdirect aserver web interface for managing SSH access to your server. Instead of connecting directly to your server, you connect through Warpgate, which adds an extra layer of security and makes it easier to manage who can access what.access.
For protocol specifications, advanced features, API documentation,configuration, and technical details,documentation, see the official Warpgate documentation.
Why Warpgate?
✅Secure SSH gateway- All SSH connections go through Warpgate✅Web-based management- Easy-to-use web interface for managing access✅User access control- Control who can access which servers✅Session recording- Keep track of SSH sessions for security✅No direct server access- Server SSH port can be closed, only Warpgate port open✅Centralized access- Manage all SSH access from one place✅Better security- Reduces attack surface by closing direct SSH access
Prerequisites
- ✅ Docker
runninginstalled (fromChapter 3) - ✅ Docker Compose (Chapter 3)
- ✅ Optional: Traefik installed (
fromChapter 4) for HTTPSaccesswithaLet'sdomainEncrypt - ✅ Optional:
SubdomainDomain configured (fromChapter 4.5), e.g.,warpgate.yourdomain.example.com - ✅ Firewall access - Ability to open port 2222 (
SSH)SSHand optionally close port 22bastion)
Note:
Installation Warpgate works great with Traefik and a domain name. Having a friendly URL like warpgate.yourdomain.com makes it easy to access the web management interface.
Step 1: Startvia Infinity Tools
Menu Installation
📱 APPLICATIONS → Warpgate → Install
CLI Installation
sudo infinity-toolsbash /opt/InfinityTools/Solutions/setup-warpgate.sh --install
# With domain (Traefik mode)
export WARPGATE_DOMAIN="warpgate.example.com"
export WG_USE_TRAEFIK="true"
sudo -E bash /opt/InfinityTools/Solutions/setup-warpgate.sh --install
# Standalone mode
export WG_USE_TRAEFIK="false"
export WG_PORT="8888"
sudo -E bash /opt/InfinityTools/Solutions/setup-warpgate.sh --install
# With domain argument
sudo bash /opt/InfinityTools/Solutions/setup-warpgate.sh --install warpgate.example.com
Step 2: Install WarpgateArchitecture
Go to 📱 APPLICATIONS
Select Warpgate
Choose Install Warpgate
Using the Infinity Tools GUIContainer
Use ↑/↓warpgate to- move,Warpgate Entercontainer to select, Esc to go back
Look for the turquoise cursor indicating the current selection
Each screen shows a short description at the top explaining what's needed(ghcr.io/warp-tech/warpgate:latest)
StepPorts
2.1:
Choose- 2222 - SSH bastion port (exposed directly, TCP)
- 8888 - Web interface port (via Traefik or standalone, HTTPS)
Data Persistence
- Data:
/opt/speedbits/warpgate/data/ (configuration, database)
- Config:
/opt/speedbits/warpgate/data/warpgate.yaml (main configuration)
- Database:
/opt/speedbits/warpgate/data/db/ (SQLite database)
- SSL:
/opt/speedbits/warpgate/ssl/ (standalone mode certificates)
Deployment Modes
Traefik Mode (Default)
📱 APPLICATIONS → Warpgate → Installsudo infinity-toolsbash /opt/InfinityTools/Solutions/setup-warpgate.sh --install
# With domain (Traefik mode)
export WARPGATE_DOMAIN="warpgate.example.com"
export WG_USE_TRAEFIK="true"
sudo -E bash /opt/InfinityTools/Solutions/setup-warpgate.sh --install
# Standalone mode
export WG_USE_TRAEFIK="false"
export WG_PORT="8888"
sudo -E bash /opt/InfinityTools/Solutions/setup-warpgate.sh --install
# With domain argument
sudo bash /opt/InfinityTools/Solutions/setup-warpgate.sh --install warpgate.example.com/opt/speedbits/warpgate/data/ (configuration, database)/opt/speedbits/warpgate/data/warpgate.yaml (main configuration)/opt/speedbits/warpgate/data/db/ (SQLite database)/opt/speedbits/warpgate/ssl/ (standalone mode certificates)Uses Traefik for SSL termination and domain routing:
- Automatic Let's Encrypt certificate provisioning
- Domain-based access:
https://warpgate.example.com - SSH bastion:
ssh -p 2222 user@warpgate.example.com - Requires: Traefik running, DNS A record configured
Standalone Mode
You'llDirect seeaccess twowith options.HTTPS Here's what each means:(self-signed):
TraefikHTTPS:https://SERVER_IP:8888(recommended)self-signed- cert)
- SSH bastion:
ssh -p 2222 user@SERVER_IP - Default web UI port: 8888 (configurable)
- No domain required
Installation Process
Configuration Steps
WhatSSLitModeis:Selection:UsesChooseyourTraefikdomainorname with a trusted HTTPS certificate from Let's EncryptStandaloneWhatDomainyou need:Configuration:AIfsubdomainTraefik, specify domain (e.g.,warpgate.yourdomain.com) pointing to your server (see Chapter 4.5)example.com)WhatPortyou get:Configuration:ProfessionalIfURLStandalone,likespecifywebhttps://warpgate.yourdomain.comwith trusted SSLPick this if:You have a domain and want secure, easy access (recommended)StandaloneWhat it is:Uses HTTPS with a self-signed certificate and direct port accessWhat you need:Just a freeUI port (default: 8888)- Container Creation: Warpgate container created and started
- Interactive Setup: Admin account creation via
warpgate setupcommand
What youGets get:Created
- Directory:
URL/opt/speedbits/warpgate - Container:
warpgate - Docker Compose:
/opt/speedbits/warpgate/docker-compose.yml - Configuration:
/opt/speedbits/warpgate/data/warpgate.yaml - Database: SQLite database in
/opt/speedbits/warpgate/data/db/
Access Methods
Traefik Mode
# Web interface
https://warpgate.example.com
# SSH bastion
ssh -p 2222 user@warpgate.example.com
Direct web access after DNS propagation and SSL certificate generation (30-60 seconds).
Standalone Mode
# Web interface
https://SERVER_IP:8888
# SSH bastion
ssh -p 2222 user@SERVER_IP
Accept aself-signed certificate warning you(Advanced must→ accept once
Simple rule of thumb: Use Traefik if you have a domain (recommended)Proceed). Use Standalone if you don't have a domain.
StepInitial 2.2: Domain Configuration (Traefik Mode)
If you chose Traefik, you'll be asked for your domain:
What it is:The subdomain where Warpgate will be accessibleExample:warpgate.yourdomain.comImportant:DNS must already point to your server (see Chapter 4.5)
Step 2.3: Port Configuration (Standalone Mode)
If you chose Standalone, you'll be asked for a port:
Default:8888What it is:The port for the web interfaceNote:SSH port (2222) is always exposed directly
What Happens During Installation
Warpgate container is createdData directory is set upWeb interface becomes accessibleSSH gateway starts on port 2222Interactive setup prompts for admin credentials
Step 3: Set Up Admin Account
Creation
After installation,container creation, Warpgate willruns interactive setup:
docker run an--rm interactive-it setup.\
You'll-v be/opt/speedbits/warpgate/data:/data prompted\
toghcr.io/warp-tech/warpgate:latest create\
ansetup
Prompts:
Admin Setup Prompts
- Admin username:
Choose a usernameUsername fortheadmin account(e.g.,admin) - Admin password:
ChoosePasswordaforstrongadminpassword (you'll use this to log into the web interface)account - Confirm password:
EnterPasswordthe password again to confirmconfirmation
Configuration File
⚠️After IMPORTANT:setup, Saveconfiguration theseis credentialsstored immediately!in:
/opt/speedbits/warpgate/data/warpgate.yaml
File thempermissions: to600 access(owner: theuid web interface.1000)
StepAuthentication
Web Interface If Using TraefikAuthentication
WaitUsername/password 30-60 seconds for SSL certificate generationauthentication
OpenAdmin https://warpgate.yourdomain.com in your browser
You'll see the Warpgate login page
If Using Standalone
Open https://SERVER_IP:8888 in your browser
You'll see a security warning (normal for self-signed certificates)
Click "Advanced" → "Proceed to site" to continue
You'll see the Warpgate login page
Step 5: Login to Web Interface
Enter the admin username youaccount created during setup
EnterAdditional the admin password youusers created duringvia setupweb interface
Click "Login"
You'll see the Warpgate dashboard!
Step 6: Understanding Warpgate
WaitUsername/password30-60 seconds for SSL certificate generationauthenticationOpenAdminhttps://warpgate.yourdomain.comin your browserYou'll see the Warpgate login page
https://SERVER_IP:8888Warpgate acts as a gateway (or "bastion") between you and your server:
HowSSH ItBastion WorksAuthentication
BeforeWarpgateWarpgate:username/passwordYouauthentication- After
directlyauthentication, user selects target - Warpgate connects to
yourtargetserverusingviaconfiguredSSH (port 22) With Warpgate:You connect to Warpgate (port 2222), which then connects you to your serverBenefits:All SSH access goes through Warpgate, making it easier to manage and securecredentials
Target Configuration
WhatAdding You Can DoTargets
✅Manage users- Add users who can access servers through Warpgate✅Control access- Decide which users can access which servers✅View sessions- See who's connected and what they're doing✅Record sessions- Keep logs of SSH sessions for security✅Manage targets- Addare servers that users can connect to
Targets
Step 7: Add Your First Target (Server)
Before users can connect, you need to add a "target" (the server they'll connect to):Warpgate:
Adding a Target
In the web interface, go to"Targets"or"Servers"Click"Add Target"or the"+"buttonEnter target details:- Name:
A friendlyFriendly name(e.g.,for"MytheServer")target - Host:
The server'sIP address or hostname (usuallyuselocalhostor127.0.0.1forthesame server) - Port: SSH port (usually
22)22) - Username:
TheSSH username(e.g.,foryourtheservertarget - Key-based auth: Optional SSH key configuration
username)- Name:
Click"Save"or"Create"
For Same-Server AccessTarget
IfFor accessing the server where Warpgate is running on the same server you want to access:runs:
- Host:
localhostor127.0.0.1 - Port:
22(oryour server'scustom SSH port) - Username:
Your serverServer username
StepUser 8: Add UsersManagement
Now
Web addInterface
- Create users
whovia web interface - Assign access to specific targets
- Manage user permissions
- View user sessions
User Access Control
- Users can
connectonlythroughaccessWarpgate:targets they're granted access to - Access can be granted/revoked per user per target
- Session recording available per user/target
SSH Connection Flow
AddingConnection a UserProcess
InClientthe web interface, go to"Users"Click"Add User"or the"+"buttonEnter user details:Username:A username for Warpgate (e.g., "john")Password:A password for this userEmail:Optional email address
Click"Save"or"Create"
Granting Access
After creating a user, grant them access to targets:
Go to the user's profileFind"Access"or"Targets"sectionSelect which targets this user can accessSave the changes
Step 9: Connect via SSH Through Warpgate
Now you can connect to your server through Warpgate:
SSH Connection
ssh -p 2222 warpgate-user@warpgate.yourdomain.comOr if using standalone mode:
ssh -p 2222 warpgate-user@SERVER_IPWhat Happens
You connectconnects to Warpgate on port 2222- Warpgate
asksauthenticatesforuseryour Warpgate username and password(username/password) After authentication,Warpgateshows youpresents available targetsYouUserselect whichselects target(server) you want to connect to- Warpgate connects
youtothattargetserverusing configured credentials - Session is established and optionally recorded
First-TimeSSH ConnectionCommand
On
# yourTraefik firstmode
connection,ssh you'll-p see:2222 warpgate-user@warpgate.example.com
# Standalone mode
ssh -p 2222 warpgate-user@SERVER_IP
Security Configuration
Access Security
Warpgate✅loginTraefikpromptmode uses Let's Encrypt SSL (production-ready)Enter✅yourStandaloneWarpgateHTTPSusernameusesandself-signedpasswordcertificates (acceptable for internal use)List✅ofSSHavailablebastiontargetsport (2222) exposed directlySelect a target to connectYou're now connected to your server!
Step 10: Security Best Practices
Close✅ Direct SSH Access
port Once(22) can be closed after Warpgate issetup
working,
Firewall canBest closePractices
# Open Warpgate SSH bastion port
sudo ufw allow 2222/tcp
# Close direct SSH access to(after yourtesting server:
# Close port 22 (direct SSH)Warpgate)
sudo ufw delete allow 22/tcp
# KeepOpen web interface port 2222(if open (Warpgate SSH)standalone)
sudo ufw allow 2222/8888/tcp
⚠️Container WARNING:
Only do this after testing Warpgate! Make sure you can connect through Warpgate before closing port 22.
Firewall ConfigurationSecurity
✅Runs Openas portuid 22221000 - Required for Warpgate SSH access(non-root)
✅Data Opendirectory portmounted 80/443with -proper If using Traefik (for web interface)permissions
✅Configuration Openfile port 8888 - If using standalone modesecured (for600 web interface)
⚠️ Close port 22 - After testing Warpgate (optional but recommended)permissions)
Environment Variables
UserStandalone ManagementMode
✅ Use strong passwordsWARPGATE_HTTP_LISTEN - ForHTTP bothlisten adminaddress and(default: user accounts0.0.0.0:8888)
✅ Limit accessWARPGATE_SSH_LISTEN - OnlySSH grantlisten accessaddress to(default: targets users need
✅ Regularly review users - Remove users who no longer need access
✅ Monitor sessions - Check who's connecting and when0.0.0.0:2222)
Troubleshooting
Can't Access Web Interface Issues
Traefik mode: Wait 30-60 seconds after installation for SSL certificate generation
Standalone mode: Accept the self-signed certificate warning
- Check
container:container Runstatus: docker ps | grep warpgate to see if it's running
CheckView logs: Run docker logs warpgate
to- Verify
seeconfiguration: errorcat messages/opt/speedbits/warpgate/data/warpgate.yaml
- Check file permissions:
ls -la /opt/speedbits/warpgate/data/
Can'tSSH ConnectConnection via SSHIssues
CheckVerify firewall: Make sure port 2222 is open: sudo ufw status | grep 2222
CheckTest credentials:connectivity: Verifync you're-v usingSERVER_IP the correct Warpgate username and password2222
- Check
target:user Makecredentials surein theweb interface
- Verify target
server is configured correctlyconfiguration
- Check
access: Verify the user has access to the target
Forgot Admin Password
You'll need to reinstall Warpgate with --deleteall flag
This will wipe all data and let you create a new admin account
Make sure to back up any important data first!permissions
Target Connection FailsFailures
CheckVerify target host: Verify the host IP/namehost/IP is correct
- Check target
port:SSH port
- Verify target username
- Test direct connection to target
- Check SSH key configuration (if using key-based auth)
Production Considerations
- Access Method:
VerifyUse theTraefik mode for production (trusted SSL)
- Firewall: Close direct SSH port (22) after Warpgate verification
- User Management: Regularly review and remove unused users
- Session Recording: Enable for security auditing
- Monitoring: Monitor SSH sessions and access patterns
- Backup: Backup configuration and database regularly
- Updates: Re-run install script periodically for updates
Integration with Infinity Tools
Warpgate complements Infinity Tools by providing:
- Centralized SSH access management
- Secure gateway for all server access
- Session recording and auditing
- User access control
Recommended Setup:
- Open only Warpgate SSH port (2222) publicly
- Close direct SSH port (22) after testing
- Use Traefik for web interface HTTPS
- Enable session recording for security
- Regularly audit user access
Advanced Configuration
Custom Ports
# Custom web UI port (standalone)
export WG_PORT="9999"
sudo -E bash setup-warpgate.sh --install
# SSH port is correctalways 2222 (usuallyexposed 22)directly)
Check target credentials: Verify the username is correct
Test direct connection: Try connecting directly to the target to verify it's accessible
Where to Find Warpgate After Install
On the finish screen, Infinity Tools prints the web interface URL
You can also see it in 📊 STATUS & HEALTH → STATUS
Check the installation directory: /opt/speedbits/warpgate
Configuration file:File
Edit configuration directly:
# Backup first
cp /opt/speedbits/warpgate/data/warpgate.yaml
Database: /opt/speedbits/warpgate/data/db/warpgate.yaml.backup
# Edit configuration
nano /opt/speedbits/warpgate/data/warpgate.yaml
# Restart container
docker restart warpgate
ManagingSession WarpgateRecording
Adding More Users
Simply repeat Step 8 for each user you want to add. Each user can have access to different targets.
Adding More Targets
Add more servers by repeating Step 7. Users can then be granted access to these new targets.
Viewing Sessions
The web interface shows active SSH sessions, including who's connected and what they're doing.
SessionEnabling Recording
WarpgateSession recording can recordbe SSHenabled sessionsper foruser securityor auditing.per Check the settingstarget in the web interfaceinterface. Recorded sessions are stored in the database and can be reviewed for security auditing.
User Management Script
Infinity Tools provides a helper script for creating system users:
sudo bash /opt/InfinityTools/Infrastructure/add-warpgate-user.sh
This script creates a warpgate system user with SSH key access. Edit the script to enableadd this.your SSH public key before running.
You'reNext Ready!Steps
Warpgate is now installedoperational. andUse readyit to use! Remember:to:
🔐AddSavetargetsyour(servers)adminuserscredentialscansecurelyconnect to🚪 Connect via port 2222 (not port 22)👥 AddCreate users andgrant themassign accessto targets🛡️ConnectCloseviaportSSH22throughafter testing (optional but recommended)Warpgate📊Monitor sessionsinandthe web interfaceaccess🔒 Use strong passwords for all accounts
Next steps: Add your first target, create users, grant access, test SSH connection through Warpgate, and optionally closeClose direct SSH access (port 22) for better security!security
For advanced features, API documentation, and development guides, refer to the official Warpgate documentation.