Skip to content
Connection Guard
Download

How to block VPNs on a Minecraft server

Banned players come back on a VPN in seconds. Here is what actually stops them, what doesn't, and how to set it up without kicking your regulars.

Updated · 8 min read · For Connection Guard 0.6.1

Why servers block VPNs

A ban is only as strong as the address it's tied to. When a banned player can switch to a VPN or proxy and create a new account, every ban, mute and alt check becomes a speed bump. Server owners block VPNs mainly to:

  • Make bans stick. Ban evasion through alt accounts often runs through VPNs, proxies or cheap data-center servers.
  • Slow down bot and alt waves. Join floods often come from data-center ranges that detection services already know.
  • Keep community rules meaningful, like one account per player in events or economies.

There's a cost: some honest players use a VPN for privacy, at school or on work networks. A good setup blocks the abuse and gives those players a way in. That's why this guide starts with alerts and only then turns on kicks.

Is prevent-proxy-connections enough?

Vanilla server.properties has a setting called prevent-proxy-connections (off by default). The Minecraft Wiki describes it as kicking players whose network, as seen by your server, differs from the one Mojang's authentication server saw.

That catches a narrow case: a player who signs in through one network and connects through another. A player who runs the whole game through a VPN signs in and connects from the same VPN address, so the check passes. It also can't tell you which country a player connects from, and it can't alert staff instead of kicking.

Use prevent-proxy-connections as a small extra if you like, not as your VPN protection.

How anti-VPN plugins work

An anti-VPN plugin checks the player's IP address during login, before they join the world:

  1. The plugin asks one or more IP intelligence services about the address. These services track which ranges belong to VPN providers, public proxies, Tor exit nodes and hosting companies.
  2. Each service answers whether the address looks like a VPN or proxy, often with its country, network and a risk score.
  3. The plugin applies your rules: refuse the connection, alert staff, post to Discord, or let the player in.
  4. With caching enabled, unexpired answers can be reused for the same address, reducing repeated lookups.

No service knows every address. Fresh VPN ranges, residential proxies and mobile networks can slip through, and occasionally a legitimate address gets flagged. That's why it helps to choose your services deliberately, and to let several services vote when one isn't enough.

Step by step with Connection Guard

Connection Guard is a free, open-source anti-VPN plugin that runs on Paper, Spigot, BungeeCord and Velocity from one JAR. The steps are the same everywhere; only the install location differs.

1. Install it in the right place

On a single server, put the JAR into that server's plugins folder. On a network, install it only on the proxy that players connect to. The proxy sees their real address and one installation protects every backend. Platform notes: Paper and Spigot, BungeeCord and Waterfall, Velocity.

2. Choose your detection services

Out of the box, Connection Guard 0.6.1 first checks its own signed lists of VPN servers, Tor exits, public proxies and privacy relays on your server (Connection Guard Intel). Addresses it doesn't know go to zowi, then Blackbox and IPQuery, one after another: when one fails or has no clear answer, the next decides. You can also enable ProxyCheck, IPHub, VPNAPI, IPQualityScore, IP-API or a REST API you configure yourself, and change the order in the dashboard. Country lookups are off until you add a country rule.

ServiceUsed forGood to know
Connection Guard IntelVPN, Tor, proxies, privacy relaysLists downloaded once a day and checked on your server; no player address leaves it. Sources are public.
zowi, Blackbox, IPQueryVPN/proxyOn by default, no key, asked in this order. zowi is run by the developer of FoxGate; a Blackbox listing only counts inside a data centre.
ProxyCheckVPN/proxy and countryOff on new installs. 100 lookups a day without a key; a free key raises that to 1,000.
IP-APIVPN/proxy and countryOff on new installs, always asked last. The free endpoint is non-commercial, uses HTTP and allows 45 requests per minute.
IPHubVPN/proxyNeeds an API key.
VPNAPIVPN/proxyNeeds an API key.
CustomVPN/proxyAny GET or POST API; you map the response fields.

Limits and terms change, so check each service's own pages before going live. Every service that is asked learns the player's IP address, so name the ones you use in your server's privacy information.

3. Watch before you block, if you like

New 0.6 installs refuse flagged players right away; upgrades keep the mode you had. To review decisions before blocking, use OBSERVE and staff notifications:

operation:
  mode: 'OBSERVE'
behavior:
  vpn:
    kick-player: false
    notify-staff: true
  geo:
    kick-player: false
    notify-staff: true
    type: 'BLACKLIST'
    list: []

This is a partial example: change these fields in the generated config.yml and keep everything else. Staff with connectionguard.notify.vpn and connectionguard.notify.geo now see an alert whenever a rule matches. Run /cg reload after changing these settings; cache connection changes require a restart. Rejected settings leave the previous configuration active.

4. Look at real results

Give it a few days. When an alert looks wrong, run /cg info <IP or player> to see exactly what each service reported. If a service keeps flagging addresses you trust, add another service and raise required-positive-flags, or exempt specific players.

5. Turn on blocking

When you're happy with what you see, set operation.mode: ENFORCE and behavior.vpn.kick-player: true, then run /cg reload. Add exemptions for trusted players under behavior.vpn.exemptions by UUID or IP address; with LuckPerms you can exempt by permission instead.

Write a fair kick message

The kick screen is the only thing a refused player sees. A good message names the rule and says how to get help, for example: "VPNs and proxies aren't allowed on this server. Turn yours off, or ask for an exemption on our Discord." Edit it in the generated translation/en.yml, and never put keys or internal details in player-facing text.

Quotas and caching

Every first-time address costs one lookup per enabled VPN service, plus one country lookup. As an illustration rather than a measurement: 100 new addresses with one VPN and one country service can mean 200 requests, and both may draw from the same account if you use one provider for both.

Caching keeps that in check. By default Connection Guard remembers VPN answers for 24 hours and country answers for 72 hours, in SQLite or, on larger networks, Redis. Clearing the cache with /cg clear makes everyone look new again, so use it sparingly.

When a detection service is down

Services have outages and rate limits. Connection Guard records unavailable evidence as UNKNOWN. Your scoped failure-policy selects OPEN, OBSERVE or CLOSED; global OBSERVE suppresses Connection Guard enforcement. Review the provider failure guide before selecting CLOSED. Country rules and other plugins still apply.

Frequently asked questions

Does prevent-proxy-connections block VPNs?

Not reliably. The setting kicks a player when the network the server sees differs from the one that signed in at Mojang's authentication server. A player who runs the whole game through a VPN signs in and connects from the same VPN address, so the check passes.

Can an anti-VPN plugin catch every VPN?

No. Plugins ask IP intelligence services whether an address belongs to a VPN, proxy, Tor exit or data center. New ranges, residential proxies and mobile networks can be missed, and a few legitimate addresses can be flagged. Treat a flag as strong evidence, not proof.

Do I need an API key?

No. Connection Guard 0.6.1 checks its own signed VPN lists first and then asks zowi, Blackbox and IPQuery in turn, all without a key. ProxyCheck is off on new installs; with a free key (1,000 queries a day on 13 October 2026) it is a good late fallback. Check each service's current plans before you rely on them.

Will blocking VPNs lock out real players?

Some legitimate players use VPNs for privacy, at school or at work. Start by alerting staff instead of kicking, write a kick message that says how to ask for an exemption, and exempt trusted players by UUID.

Where do I install the plugin on a network?

On the proxy (Velocity or BungeeCord) that receives player connections. The proxy sees the real address, and one installation covers every backend server.

What happens if the detection service is down?

Unavailable evidence is UNKNOWN. Your scoped OPEN, OBSERVE or CLOSED failure policy controls the response; global OBSERVE suppresses Connection Guard enforcement. Country rules and other plugins also apply.