Forwarding Modes
Forwarding modes determine how Gate transmits player information (IP addresses, UUIDs, and other data) to backend servers. Choosing the right forwarding mode is critical for security and functionality.What is Player Info Forwarding?
When Gate proxies connections, backend servers don’t directly see the player’s real IP address or authenticated UUID. Forwarding modes solve this by securely transmitting this information from Gate to backend servers.Without proper forwarding, backend servers see all connections coming from Gate’s IP address, breaking IP-based security, geolocation, and player identification.
Available Forwarding Modes
Gate supports four forwarding modes:| Mode | Security | Version Support | Setup Complexity | Recommended |
|---|---|---|---|---|
| velocity | 🔒 High | 1.13+ | Medium | ✅ Yes |
| bungeeguard | 🔒 High | 1.7-1.12.2 | Medium | ✅ Yes (legacy) |
| legacy | ⚠️ Low | All | Easy | ⚠️ Not recommended |
| none | ❌ None | All | None | ❌ Development only |
Configuration
Forwarding mode is configured in yourconfig.yml:
Velocity Mode (Recommended)
Velocity mode is the most secure forwarding method for Minecraft 1.13+
Features
- ✅ Cryptographically secure forwarding
- ✅ Uses HMAC-SHA256 authentication
- ✅ Prevents IP spoofing attacks
- ✅ Modern standard supported by Paper, Velocity, etc.
- ✅ No plaintext secrets in forwarded data
Gate Configuration
Backend Server Configuration
Paper/Spigot (1.13+)
Using Paper’s Velocity support:- Edit
config/paper-global.yml(Paper 1.19+) orpaper.yml(older versions):
- Set
server.properties:
- Restart the server
The secret must match exactly between Gate and all backend servers.
Using Plugins
For servers without native Velocity support, use:- VelocityLoginFix - For older Paper versions
- FabricProxy-Lite - For Fabric servers
Security Best Practices
- Use strong secrets: Minimum 32 characters, cryptographically random
- Keep secrets private: Never commit secrets to version control
- Rotate secrets: Change secrets periodically
- Unique secrets: Use different secrets for different networks
- Secure storage: Use environment variables or secret management
BungeeGuard Mode
BungeeGuard mode is recommended for Minecraft 1.7-1.12.2 servers that cannot use Velocity mode.
Features
- ✅ Token-based authentication
- ✅ Prevents unauthorized connections
- ✅ Works with older Minecraft versions
- ⚠️ Less secure than Velocity mode
Gate Configuration
Backend Server Configuration
-
Install BungeeGuard plugin on backend servers:
- Download: BungeeGuard on SpigotMC
-
Configure
plugins/BungeeGuard/config.yml:
- Set
server.properties:
- Restart the server
Legacy Mode
About Legacy Mode
- ⚠️ BungeeCord’s IP forwarding format
- ⚠️ No authentication or encryption
- ⚠️ Vulnerable to IP spoofing
- ⚠️ Anyone can forge player data
- ✅ Works with all Minecraft versions
- ✅ Widely supported
Gate Configuration
Backend Server Configuration
Paper/Spigot
Editspigot.yml:
server.properties:
Security Risks
- IP Spoofing: Attackers can forge any IP address
- UUID Manipulation: Fake player identities
- Bypass Security: Circumvent bans and whitelist
- Privilege Escalation: Impersonate admins/operators
Mitigation
If you must use legacy mode:- Firewall backend servers: Only allow connections from Gate’s IP
- Private network: Use internal network interfaces
- VPN/tunnel: Encrypt connections between Gate and backends
- Monitor connections: Log and alert on suspicious activity
None Mode
Gate Configuration
When to Use
- ❌ Never in production
- ✅ Local development
- ✅ Single-player testing
- ✅ Debugging connection issues
Behavior
- Backend servers see Gate’s IP address for all players
- Players have offline-mode UUIDs
- No player IP forwarding
- All security checks fail
With
mode: none, backend servers cannot distinguish between different players and will see all connections as coming from the proxy.Comparison Matrix
Security Comparison
| Feature | Velocity | BungeeGuard | Legacy | None |
|---|---|---|---|---|
| Authentication | ✅ HMAC-SHA256 | ✅ Token | ❌ None | ❌ None |
| IP Spoofing Protection | ✅ Yes | ✅ Yes | ❌ No | ❌ No |
| UUID Protection | ✅ Yes | ✅ Yes | ❌ No | ❌ No |
| Encrypted | ✅ Yes | ⚠️ Token only | ❌ No | ❌ No |
| Modern Standard | ✅ Yes | ⚠️ Plugin | ❌ Legacy | ❌ N/A |
Compatibility Comparison
| Version | Velocity | BungeeGuard | Legacy | None |
|---|---|---|---|---|
| 1.7-1.12.2 | ❌ No | ✅ Yes | ✅ Yes | ✅ Yes |
| 1.13-1.19.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| 1.19.4+ | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Paper | ✅ Native | ⚠️ Plugin | ✅ Native | ✅ N/A |
| Spigot | ⚠️ Plugin | ⚠️ Plugin | ✅ Native | ✅ N/A |
| Fabric | ⚠️ Mod | ⚠️ Mod | ⚠️ Mod | ✅ N/A |
Choosing the Right Mode
Decision Tree
Recommendations by Use Case
Production Server (Modern)
Production Server (Legacy 1.7-1.12.2)
Development/Testing
Legacy Network (Must migrate)
Firewall Configuration
iptables (Linux)
ufw (Ubuntu/Debian)
Docker/Kubernetes
Bind backend servers to internal networks only: docker-compose.yml:Migration Guide
Migrating from Legacy to Velocity
Migrating to Velocity mode improves security without affecting player data.
-
Generate velocity secret:
-
Update Gate config:
-
Update each backend server:
- Paper: Update
paper-global.yml - Spigot: Install VelocityLoginFix plugin
- Paper: Update
-
Test with one backend:
- Try connecting and verify player IP/UUID
- Check console for errors
-
Roll out to all backends:
- Update remaining servers
- Restart all servers
-
Verify:
Migrating from BungeeCord
If migrating from BungeeCord to Gate:-
Keep forwarding mode initially:
- Test Gate with legacy mode first
- Then migrate to velocity mode using steps above
Troubleshooting
Players Have Wrong IPs
Symptoms: All players show Gate’s IP address Causes:- Forwarding mode is
none - Backend server not configured for forwarding
- Firewall blocking forwarded data
- Verify Gate forwarding mode is not
none - Check backend server configuration
- Ensure secrets match exactly
”Unable to Verify Username” Errors
Symptoms: Players can’t connect, authentication fails Causes:- Secret mismatch between Gate and backend
- Backend server in online mode
- Velocity/BungeeGuard not installed
- Verify secrets match exactly (check for whitespace)
- Set backend
online-mode=false - Install required plugin/mod on backend
Players Can Bypass Proxy
Symptoms: Players connect directly to backend servers Causes:- Backend servers exposed to internet
- No firewall rules
- Using legacy mode without protection
- Configure firewall to only allow Gate IP
- Bind backends to internal interfaces only
- Upgrade to velocity or bungeeguard mode
Invalid Token Errors
Symptoms: “Invalid token” or “Authentication failed” Causes (BungeeGuard):- Token mismatch
- Token not configured in BungeeGuard
- BungeeGuard plugin not loaded
- Check token matches exactly
- Verify BungeeGuard plugin is installed and enabled
- Check BungeeGuard logs for errors
Related Topics
- Online Mode - Mojang authentication
- Proxy Protocol - HAProxy protocol support
- Backend Server Setup - Configure backend servers

