Get RCON working on a Minecraft server

Solution 1:

Tzarium is not correct reguarding the nmap and networking issues. Nmap is 100% accurate; though you might need to use it properly and read its output carefully.

25567/tcp closed means that TCP port 25567 is closed, which is not the same as UDP port 25567. And MC server uses UDP for the "query" feature.

Consider these nmap command lines for reference:

## Probe UDP port 25565 -- default port for the "query" feature
% nmap -sU -pU:25565 minecraft-server
...
PORT      STATE         SERVICE
25565/udp open|filtered unknown


## Probe TCP ports 25565 and 25575 -- the usual Minecraft client port
## and default RCON port
% nmap -p25565,25575 minecraft-server
...
PORT      STATE SERVICE
25565/tcp open  unknown
25575/tcp open  unknown

7 years later edit

Yea, indeed. "Using nmap properly" includes understanding that different network paths will behave differently in general, and especially likely so when you're debugging an issue. To see with nmap what a client sees, you need to run nmap on the client; or at the very least from its immediate network neighbor (same local subnet), so that the network path is mostly the same except for one host. Notice I wrote minecraft-server as nmap target, not localhost! — implicitly assuming this understanding. A very late thanks to @user56 commenting on this.

Solution 2:

First of all, you seem to be checking for open ports with nmap, which isn't 100% reliable (especially when connecting to the loopback address, which your server might not necessarily bind to) On my rcon-enabled server, the rcon port appears to be closed according to nmap, but works fine. A better way to check is using netstat ("netstat -an" works equally well on windows CMD and *nix-based systems) which should show [::]:25575 as "listening"

Have you tried using the RCON/Query utility to query the server? remember to try both console (25575 by default) and remote query (25565 by default. You've changed yours to 25567, which really shouldn't matter, but you might consider changing it back, just to be sure.)

If you still can't connect, does the console indicate rcon is enabled when you start the server like so:

CONSOLE: Default game type: 0
CONSOLE: RCON running on 0.0.0.0:25575

If so, what happens when you open a telnet session to your servers IP (preferable not the loopback address), port 25575? You should get a hanging blank window (as opposed to a "connection closed"/"connection refused" message) and an entry in the server console along the lines of "Rcon connection from: /127.0.0.1"