Anti MOTD Scanner (AMS)
请查看常见问题解答(FAQ)!
此插件旨在帮助小型私有服务器保持隐身。它会阻止向从未加入过该服务器的 IP 地址返回任何数据,从而防止扫描器发现你的服务器。虽然它无法阻止 TCP 扫描(建议将默认端口从 25565 更改),也无法阻止更高级的扫描器使用账号加入(因为本插件不干扰加入过程)。这是一个较新的插件,欢迎所有建议!
依赖项:
请在 Issues 中提交 BUG 报告!
此插件能做什么:
它可以阻止那些不使用 Minecraft 账号加入服务器的自动化扫描器。本插件会中断来自 /ip-data/ipcache.txt 缓存中不存在 IP 的客户端发出的 ListServerPing 和 StatusRequest 事件。加入服务器的玩家会被添加到 ipcache.txt 中。虽然使用真实 Minecraft 账号的机器人可以绕过此限制(因为本插件仅处理 Ping 请求),但它通过显示 0 数据来阻挡大多数自动化扫描器(例如结合 Masscan 使用的 Python mcscan)。
与使用黑名单方法(如 Anti Scan Mod)或显示最小化无用数据(如 ServerHider)不同,本插件使用白名单机制,拦截其他所有请求并返回 0 数据(无 MOTD、无在线人数等)。如果黑名单不适合你,可以尝试 Anti Scan(适用于 Fabric)或尝试 Server Hider,后者仅返回默认数据。
本插件在我托管的一个小服务器上经过测试。在安装此插件之前,有许多扫描器不断 Ping 我的服务器,甚至尝试加入。在我更改服务器 IP 并添加此插件后,扫描频率大大降低!这是因为一旦自动化扫描器找到服务器,它们会将 IP 保存在数据库中并持续检查。
此插件不能做什么:
它不能阻止使用 Minecraft 账号的扫描器加入,因为没有真正的方法区分谁是扫描器、谁是真实玩家;如果有这种方法,本插件也不会实现。
本插件不会检查 IP 是否为 VPN/代理,有很多其他插件可以做到这一点。
为什么扫描器有害/为什么这很重要:
这可能对你来说不重要,取决于你是否在意。
许多扫描器被恶意行为者或好奇的玩家使用。我曾使用 masscan 和 mcstatus 扫描过服务器(幸好不是为了恶意目的),我发现了数千个服务器,这非常容易。本插件旨在消除低级脚本小子类型的扫描器和自动化活动。如果你的服务器因某种原因不能使用白名单,或者是没有登录插件的破解服,这可能会有所帮助。
许多扫描器会尝试加入你的服务器,可能是为了破坏?探索?还是出于善意?没人知道,但只要有一个就能毁掉你的一天。
命令
/ams - 信息命令
/ams-reload - 重新加载配置文件,需要 OP 权限
/ams-purge-cache - 删除 ipcache.txt 的内容(你也可以手动删除文件数据)
测试
我使用真实扫描器使用的方法(mcstatus)以及简单的 Minecraft 客户端对此进行了测试。
启用 AMS 时 VS 禁用时的服务器扫描器对比:*

如果你不在 ipcache 中看到的内容:

FAQ
为什么这很重要?就算扫描器有了我的服务器 IP 又怎样,我有白名单而且我没开破解!
不想用?那就别安装。这对以下情况有帮助:
- 没有白名单的服务器
- 没有登录插件的破解服务器
- 在你家用 IP 上托管的服务器
- 你不希望你的服务器 IP 出现在活跃的 MC 服务器数据库中时。
简单的 TCP/IP 扫描器是否仍然可以 Ping 通 IP/端口?
是的,端口并未关闭,因为这是在插件层面而非网络层工作的。建议将默认端口(25565)更改为随机端口。许多服务器主机已经这样做了。
如果加入服务器会将他们的 IP 添加到缓存(白名单)……那么使用 MC 账号的扫描器怎么办?
如前所述,本插件不处理客户端加入过程。如果你的服务器不是破解服,在可能的情况下开启白名单。
这是为拥有 100+ 玩家的大型服务器或公共服务器设计的吗?
不,如果你的服务器是公开的并且你阻止了 ServerListPings,那么从未加入过或拥有新 IP 的玩家将无法看到你的 MOTD,而你可能并不希望这样。它是为希望保持隐身的私有服务器设计的。
我可以将 ipcache 用作白名单并在玩家加入时停止更新吗?
可以,将 enable-ipcache 设置为 false。
对于那些拥有动态 IP 或通过 VPN 加入的玩家怎么办?
他们在加入前将无法看到服务器状态。
注意:许多扫描器使用 VPN 来隐藏他们的 IP,加入的 VPN IP 越多可能会稍微削弱此系统的有效性,尽管 VPN IP 很多,但建议考虑添加一个反 VPN/代理插件。
如果很多玩家使用 VPN/动态 IP,我应该偶尔清除 ipcache.txt 吗?
IP 地址有 40 亿个,其中几乎不可能都被扫描器最终使用。不过清除一下也无妨。
会有 Paper 版本吗?我的服务器运行的是 PaperMC/Purpur!
本插件兼容 Paper/Purpur。如果需要两个版本,我会制作出来。
低于 1.21.8 的版本怎么办?
如果请求足够多,我可能会支持 1.20.x,这是我支持的最低版本。新版本将会快速更新。
这是个愚蠢的主意/我不喜欢你这样做的方式
我是新手,请多包涵。Bug 报告和建议欢迎在 Issues 中提出。
为什么制作这个插件?
我运营着一个小型的私人服务器,扫描器不断发出 ping 信号并尝试连接服务器。该服务器未启用登录验证插件(应所有者要求),因此我决定采取一些措施,并将其公开。
已知问题:
此插件将阻止玩家使用 ViaFabricPlus 的“检测版本”功能,并且必须自动选择一个版本。
配置文件。
config.yml 文件内解释了如何使用配置,这里提供更详细的说明;
# 这会阻止所有非来自 ipcache.txt 内 IP 地址的 ping 请求。要让某个 IP 地址存在于
# 此文件中,玩家必须加入服务器或手动添加。
block-unknown-pings: true
# 当玩家加入服务器时,其 IP 地址会被存储到此文件中
# “block-unknown-pings” 将阻止所有不在此文件中的 IP 地址。
# 如果禁用此项,将不再添加新的 IP 地址,您也可以手动添加 IP 地址
enable-ipcache: true
# 将所有 MOTD ping 记录到 motd-ping-logs.txt
log-all-motd-pings: true
# 将所有被阻止的 MOTD ping 记录到 blocked-motd-logs.txt
log-blocked-motd-pings: true
# 将所有 IP 加入日志记录到 ip-join-logs.txt
# 这将记录加入服务器的玩家的 IP 地址,即使他们不是首次加入。
log-join-ips: true
Anti MOTD Scanner (AMS)
Please view the FAQ!
This plugin is meant for smaller private servers that want to stay hidden. It prevents the server from returning ANY data from IP's who have never joined the server before. It prevents scanners from finding your server. Although it can't prevent TCP scans (change your defaut port from 25565) and it can't prevent more advanced scanners from joining with an account as this plugin does not interfere with the join process. This is a newer plugin, all suggestions are welcome!
Requires:
BUG REPORTS IN ISSUES PLEASE!
What this plugin CAN do:
It can prevent automated scanners that don't join the server with a minecraft account. This plugin interrupts the ListServerPing and StatusRequest events from clients IP's that are not in /ip-data/ipcache.txt Players who join the server are added to the ipcache.txt. While bots that use actual minecraft accounts
can bypass this (as this plugin only deals with ping request) it blocks most of the automated scanners (such as pythons mcscan pared with massscan) by simply showing 0 data.
Instead of using of a blacklist approach (like Anti Scan Mod) or displaying minimal non useful data (like ServerHider) This plugin uses a whitelist and blocks everything else and returns 0 data (no motd, no player count nothing). Although a blacklist may not be whats right for you. If not try Anti Scan (for fabric) or try Server Hider that simply returns default data.
This plugin has been tested on a small server I host, before this plugin there were many many scanners who constantly pinged the server, even tried to join. After I changed the servers IP and added this plugin the rate is so much lower! This is because once automated scanners find a server they keep the IP in there database and continue to check it.
What this plugin CAN'T DO:
It CAN'T prevent scanners that use a MC account from joining as theirs no real way to tell whos a scanner and a real player, if there is this plugin does not do this.
This plugin does not check if the IP is a VPN/PROX, theres plenty of other plugins that do that.
Why scanners are bad/why this matters:
It may not matter for you, depends if you care.
Many scanners are used by malicious actors or just curious players. Ive used massscan & mcstatus to scan servers before (thankfully not for malicious reasons) and ive got 1000s of servers, its really easy. This plugin is meant to take out the lower level script kiddie type scanners and even automated campaigns. If your server can't use a whitelist for whatever reason or is cracked with no login plugin (for whatever reason) this may help.
Many scanners will try and join your server, maybe to greif? explore? be nice? There is no way to know and it only takes 1 to ruin the day.
Commands
/ams - Info command
/ams-reload - Reloads the config, requires OP
/ams-purge-cache - Deletes content of ipcache.txt (you can also just delete the files data manually)
Testing
Ive tested this using the methods real scanners use (mcstatus) and simple minecraft clients.
Server scanner when AMS is enabled VS disabled:*

What you see if your not in ipcache:

FAQ
Why does this matter? So what if scanners have my servers IP i have a whitelist and it isnt cracked!
Don't want it? Then dont install it. This is helpful for;
- Servers that don't have a whitelist
- Cracked servers with no long-in plugin
- Servers you host on your home IP
- When you dont want your servers IP in a active mc server database.
Can simple TCP/IP Scanners still ping the IP/PORT
Yes, the port isn't closed as this works at the plugin level not the network layer. Its suggested to change your default port (25565) to something random. Many server hosts already do this.
If joining the server adds there IP to cache (whitelist)... what about scanners that use MC accounts?
As said before, this plugin doesn't deal with the client join process. If your server isn't cracked turn on the whitelist if you can.
Is this meant for big servers with 100+ players or public servers?
No, if your server is public and you block ServerListPings players who have never joined/has a new IP will not see your motd and you may want this. It is meant for private servers that wish to stay hidden.
Can I use ipcache as a whitelist and turn updating off when players join?
Yes, set enable-ipcache to false
What about players who have Dynamic IP's or join from VPNS?
They will not be able to see the server's status before joining.
NOTE: Many scanners use VPN's to hide there IPs and the more VPN IP's that get added may slightly weaken this system, although there are many VPN IPs, Concider adding an Anti VPN/PROXY plugin.
Should i occasionally clear ipcache.txt if many players use VPNS/Dynamic IP's?
There are 4 billion IP's chances are none of them will be eventually used by scanners. Although it cant hurt
Will there be a paper version? My server runs PaperMC/Purpur!
This plugin is compatible with Paper/Purpur. If it ever needs 2 versions then i will make it.
What about versions below 1.21.8?
If it is requested enough i may support 1.20.x, thats as low as I will go. Newer versions will be updated fast.
This is a dumb idea/I dont like how you did this
Im new here, cut me some slack. Bug reports/suggestions are welcomed in issues.
Why did you make this?
I operate a smaller private server and scanners kept pinging and trying to join the server, it is cracked with no longin plugins (per requested by owners) so i did something about it and decided to make it public.
Known Issues:
This plugin will not allow players to use ViaFabricPlus's "Detect Version" and will have to automaticlly select a version.
Config File.
Explanation on how to use the config is inside config.yml although heres a more in depth explanation;
# This blocks all pings that don't come from IP's inside ipcache.txt, for an IP to be inside
# this file the player must join or be manually added.
block-unknown-pings: true
# When a player joins the server there IP is stored into this file
# "block-unknown-pings" will block all IP's that are NOt inside this file.
# if disabled it will no longer add newer IP's, you can also manually add IP's
enable-ipcache: true
# Logs all instances of MOTD pings into motd-ping-logs.txt
log-all-motd-pings: true
# Logs all blocked MOTD pings into blocked-motd-logs.txt
log-blocked-motd-pings: true
# Logs all IP join logs to ip-join-logs.txt
# This will log the ip's of players who joined even if its not there first.
log-join-ips: true
评论 0
登录后参与评分
还没有评论,来抢沙发吧