The Minecraft server setting (RCON) I know is security. However when I tried to use RCON, it either times my friends out or lets them in without RCON. How do I fix this?
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.
I'm assuming you're running minecraft in a screen session, since it's the most convenient way to not force you to keep an ssh connection always open.
You can send a command to screen that it forwards to the application running inside it. For example, I am running it in a screen session called minecraft, and every few hours a script runs, forces a save, toggles autosave off, does a backup of my worlds files, then turns autosave back on.
This is how you start a new screen session called minecraft:
screen -S minecraft
then you get a shell, you may also pass the command you want to run automatically instead of getting a shell.
Best Answer
RCON is not "security". It's a way of remote controlling your minecraft server. I use https://bukkit.org/threads/admin-rcon-mcrcon-remote-connection-client-for-minecraft-servers.70910/