All maps archive
MinecraftMaps.com
Adventure▼
Parkour▼
Survival▼
Puzzle▼
Horror▼
Mini-Games▼
Builds▼
Tools
MinecraftMaps.com

The largest collection of Minecraft maps. Download adventure, parkour, survival, puzzle, and more maps for free.

DiscordTwitter

Categories

Adventure MapsParkour MapsSurvival MapsPuzzle MapsHorror MapsCreation Maps

Resources

Latest MapsPopular MapsHall of FameSearch MapsMinecraft ToolsSubmit a MapMinecraft Seeds

Information

How to Install MapsMinecraft Dungeons 2FAQAbout UsContactPrivacy PolicyTerms of Service

Game Databases

Minecraft Dungeons DatabasePalworld DatabaseOnimusha DatabaseStar Wars Zero Company DatabaseValheim WikiPersona CompendiumSolarpunk ToolsGothic 1 Remake WikiFatekeeper ToolsRomestead DatabaseStardew Valley Database7 Days to Die DatabaseTerraria Seed ViewerPokemon Card PricesLogo Font Generator
AFK Arena|Game Guides|Co-op Games|Pokemon Tools|Anime Filler List|Naruto
Copyright © MinecraftMaps.com 2011-2026. All rights reserved.Built for the community♥·Not affiliated with Mojang or Microsoft

Ban-IP Command Generator - Ban Players by IP

Pick an IP address or an online player, add an optional reason, and copy a ready-to-run /ban-ip command for your server. Works on every Java Edition server version.

1 - Who to ban
Bans one IPv4 address directly. Selectors like @a do not work with /ban-ip.
Valid IPv4 address.
2 - Reason (optional)

Stored in banned-ips.json and shown to anyone from that address who tries to join. Leave empty for the default, "Banned by an operator."

Generated /ban-ip command
/ban-ip 198.51.100.7

No reason set: banned players see "Banned by an operator." Run from the server console or as an operator (permission level 3).

Undo: lift the ban
/pardon-ip 198.51.100.7

Removes this address from banned-ips.json. Takes effect immediately, no restart needed.

Good to know
  • Needs permission level 3: operators and the server console qualify.
  • Everyone connected from the banned address is kicked the moment the command runs.
  • The ban is written to banned-ips.json next to the server jar and survives restarts.
  • Multiplayer servers only: singleplayer and LAN worlds do not register the ban commands.
Shared and dynamic IPs

One IPv4 address often covers more than one person: siblings, classmates or a whole shared network. Dynamic addresses also rotate over time, so an old IP ban can hit an innocent player later. For punishing a single account, use /ban instead.

How the Ban-IP Command Works

The /ban-ip command blocks every connection from one IP address. Give it a raw IPv4 address or the name of an online player, add an optional reason, and the server writes the ban to banned-ips.json and kicks everyone currently connected from that address.

When someone on a banned address tries to join, the connection is refused before they ever load in, and the disconnect screen shows your reason. If you skip the reason, the game falls back to Banned by an operator. The player-name form is the practical one mid-incident: while the troublemaker is still online, /ban-ip TheirName resolves whatever address they are connected from and bans it in one step, no log digging required.

Running it requires permission level 3, so any operator on a default server (ops get level 4) and the server console both qualify. The command exists on multiplayer servers only: singleplayer worlds and LAN sessions never register the ban commands. The ban itself has no expiry; it stays in banned-ips.json until you remove it with /pardon-ip.

Ban-IP Syntax and Example Commands

The full syntax, straight from the game's command tree:

/ban-ip <target> [<reason>]
ArgumentTypeRequiredWhat it doestargetwordYesAn IPv4 address (four numbers 0-255), or the name of a player who is currently online. A single word with no spaces; entity selectors like @a are not accepted.reasonmessageNoFree text, spaces allowed, shown to banned players on the disconnect screen. Defaults to Banned by an operator.

Copy-ready examples:

/ban-ip 198.51.100.7Bans one IPv4 address with the default reason, Banned by an operator.
/ban-ip 198.51.100.7 Repeated griefing at spawnBans the address and shows the custom reason on the disconnect screen.
/ban-ip SteveLooks up the online player Steve and bans the IP address they are connected from.
/ban-ip Steve Ban evasion on an alt accountPlayer-name form with a reason. Steve must be online when the command runs.
/pardon-ip 198.51.100.7The undo: removes the address from banned-ips.json so it can connect again.

IP Bans vs Account Bans

Minecraft servers keep two separate ban lists, and picking the right one matters:

/ban/ban-ipBlocksOne account, by its game profileEvery account connecting from one IP addressTargetA player name or selector; works while they are offlineAn IPv4 address, or the name of an online playerStored inbanned-players.jsonbanned-ips.jsonUndo/pardon <player>/pardon-ip <address>

Use /ban-ip when one person keeps coming back on fresh alt accounts: the IP ban catches every account from that connection at once. Use /ban for ordinary rule breaking, because an IP ban can be wider than you intend. Shared households, schools and public networks put many players behind one address, and dynamic IPs get reassigned, so an old entry in banned-ips.json can lock out someone who did nothing wrong.

To audit what is currently blocked, run /banlist ips for addresses and /banlist players for accounts. Both lists are plain JSON files in the server folder, so you can also review or edit them with the server stopped. And since IP bans are easy to dodge with a VPN, treat them as one layer: serious protection for a private server comes from combining account bans, IP bans and a whitelist.

Frequently Asked Questions

How do you ban an IP address on a Minecraft server?

Run /ban-ip followed by the address, for example /ban-ip 198.51.100.7, from the server console or as an operator with permission level 3. You can add a reason after the address, and you can pass the name of an online player instead of an address to ban whatever IP they are currently connected from.

What is the difference between /ban and /ban-ip?

/ban blocks a single account by its game profile and writes it to banned-players.json, so the player stays banned even when they connect from a new network. /ban-ip blocks an address and writes it to banned-ips.json, which stops every account connecting from that IP but does nothing once the offender moves to a different address. Many admins use both together for serious offenders.

Why does /ban-ip say Invalid IP address?

Java Edition validates the target against an IPv4 pattern: four numbers from 0 to 255 separated by dots. Anything else, including IPv6 addresses, hostnames or an address with a typo, fails with that error unless it matches the name of a player who is currently online. Double-check the address, or ban the player by name while they are connected.

How do I unban an IP address in Minecraft?

Run /pardon-ip followed by the exact address, for example /pardon-ip 198.51.100.7. Use /banlist ips to list every banned address first. You can also stop the server and delete the entry from banned-ips.json by hand; both methods lift the ban cleanly.

Does /ban-ip work in singleplayer or on LAN worlds?

No. The ban family of commands (/ban, /ban-ip, /banlist, /pardon and /pardon-ip) is only registered on dedicated multiplayer servers. In singleplayer or on a LAN world the commands do not exist; if you need real bans, you need to run a server.

Can players bypass an IP ban with a VPN?

Yes. A VPN, a proxy or even a router restart on a dynamic connection gives a player a fresh address, so a determined ban evader will get past a plain IP ban. Combine /ban-ip with account bans, and for private servers a whitelist is the only airtight option.

Banning an account instead of an address? Or browse more Minecraft tools:

Ban Command GeneratorBrowse All Tools

Related tools

Ban CommandBuild /ban commands with a reason, plus /pardonBanlist CommandList banned players and IPs on your serverPardon CommandBuild /pardon commands to unban playersPardon-IP CommandUnban an IP address with a valid /pardon-ipKick CommandKick players with an optional reasonOp CommandGrant operator status with a ready /op command