mojira.dev
MC-97885

/ban-ip doesn't work with IPv6 addresses

The bug

The /ban-ip command doesn't work with IPv6 addresses and yields this error instead: Expected whitespace to end one argument, but found trailing data

How to reproduce

  1. Run:

    /ban-ip 2001:db8::1:2:3:4

    → ❌ It actually doesn't ban the ip address, but throws an error instead

Related issues

Comments

migrated

Can confirm this happens on 1.10.2.

If you do /ban-ip <playername> on a player logged in over IPv6, then it will ban the ip representing the first 2 bytes, i.e. if you're logged in from 2605:xxxx:xxxx.... then it will add the ip "2605" to banned-ips.json.

heni123321

the ban-ip should ban the first 64 bits because it's possible for the client to change the last 64 bits

wobst.michael

@unknown: no, it should ban exactly the IP address that's provided within the /ban-ip command. But indeed, having CIDR support would be a neat feature, like /ban-ip fc00::/7

heni123321

miwob: I dit not mean it that way. I am word blind

I thot of Windows's ipv6 privacy feature that generate a temporary ipv6 address to use so it doesn't make sense to ban all 128 bits in that case, so i will like to see eg /ban-ip fe80::/64

wobst.michael

Yes. That's why I said support for CIDR notation would be an awesome feature to have.

migrated

Please do not mark unreleased versions as affected.
You don't have access to them yet.

heni123321

This is still a problem and RIPE NCC is soon running out of IPv4 so it is going to be a bigger problem.

heni123321

This is still a bug in 1.15 pre-releace4. Both the RIPE NCC and ARIN is completly out of IPv4.

migrated

Affects 20w49a

migrated

also ,pardon-ip doesn't work with ipv6

heni123321

(Unassigned)

Confirmed

Platform

Normal

Commands, Networking

ban-ip, command, ipv6

Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 3, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.10 Pre-Release 1, ..., 1.17 Release Candidate 1, 1.17, 21w38a, 1.19.2, 1.21

Retrieved