Skip to content
Connection Guard
Download

Every player has the same IP? Fix IP forwarding

Your backend logs every player as 127.0.0.1, IP bans hit everyone, and anti-VPN plugins act strangely. One missing setting causes all of it.

Updated · 5 min read · For Connection Guard 0.6.1

The symptom

  • Backend logs show every player from 127.0.0.1, a 10.x, 172.x or 192.168.x address, or your proxy's public address.
  • Players get offline-mode UUIDs on the backend, so their inventories and permissions seem to vanish.
  • IP bans, alt checks and anti-VPN or country rules on the backend hit everyone at once, or nobody.
  • Velocity warns at startup: Player info forwarding is disabled! All players will appear to be connecting from the proxy and will have offline-mode UUIDs.

Why it happens

In a network, players connect to Velocity or BungeeCord, and the proxy opens its own connection to the backend. The backend sees the proxy, not the player. Player info forwarding lets the proxy pass the player's real address and verified UUID along with that connection. It is off until you turn it on at both ends.

Velocity: modern forwarding

For backends on Minecraft 1.13 and newer. In velocity.toml:

player-info-forwarding-mode = "modern"

Velocity keeps the shared secret in forwarding.secret next to velocity.toml. On each Paper backend, in config/paper-global.yml:

proxies:
  velocity:
    enabled: true
    online-mode: true   # same value as online-mode in velocity.toml
    secret: 'the contents of forwarding.secret'

Set online-mode=false in the backend's server.properties, keep settings.bungeecord: false in spigot.yml, and restart the backend. On Paper 1.18.2 and older the same options live in paper.yml under settings.velocity-support.

Backends older than 1.13 need legacy forwarding: player-info-forwarding-mode = "legacy" plus settings.bungeecord: true in spigot.yml. Legacy forwarding has no secret, so the backend must be unreachable from the internet. The bungeeguard mode with the BungeeGuard plugin adds a token. Details: PaperMC's forwarding docs.

BungeeCord and Waterfall: ip_forward

In the proxy's config.yml:

ip_forward: true

On each Spigot or Paper backend, in spigot.yml:

settings:
  bungeecord: true

Set online-mode=false in the backend's server.properties and restart. BungeeCord forwarding carries no secret: anyone who can reach the backend directly can claim any name, UUID and address. The next section is not optional here.

Close the backends

Backends in a network should never be reachable from the internet. Bind them to 127.0.0.1 when the proxy runs on the same machine, or allow their ports only from the proxy's address in the firewall. That protects forwarding and keeps your backends out of reach of attacks that target them directly.

Behind a DDoS protection service there is one more hop: the service to your proxy. That hop uses PROXY protocol, not forwarding. See real player IPs behind DDoS protection.

Where security plugins belong

Install anti-VPN, country and anti-bot plugins on the proxy. It sees every player's real address first and one installation covers every backend. Connection Guard runs on Velocity and BungeeCord from the same JAR as on Paper: Velocity, BungeeCord.

On a backend without forwarding, such a plugin checks the proxy's address for every player. A private address like 127.0.0.1 can't be judged by any detection service, and some of them list private addresses as VPNs. The result can be that nobody gets in. Fix the forwarding, or move the plugin to the proxy.

Frequently asked questions

Why do all players have the IP 127.0.0.1 on my backend server?

The backend only sees the connection from your Velocity or BungeeCord proxy. If the proxy runs on the same machine, that is 127.0.0.1; otherwise it is the proxy's address. Player info forwarding passes the real address and UUID from the proxy to the backend.

Should I use modern or legacy forwarding with Velocity?

Modern forwarding whenever all backends run Minecraft 1.13 or newer: it is protected by a shared secret, so a stranger can't fake it. Legacy (BungeeCord-style) forwarding is only for older backends, and then the backend must be unreachable from the internet.

Where should I install an anti-VPN plugin in a network?

On the proxy players connect to. It sees every player's real address and one installation covers all backends. On a backend without forwarding, the plugin checks the proxy's address instead of the player's.

Do I still need online-mode on the backend?

Set online-mode=false in each backend's server.properties. The proxy authenticates players with Mojang and forwards the verified identity. Keep online-mode on at the proxy.

Is player info forwarding the same as PROXY protocol?

No. Forwarding carries the player's address from your proxy to your backends. PROXY protocol carries it from a DDoS protection service to your proxy. Behind a protection service you usually need both, each on its own hop.