跳到正文

IP Whitelist

作者:Cyberking42

A very simple mod for letting server owner only allow certain ips to join.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Have you ever wanted to protect your offline server from griefers, especially when default user whitelisting can be easily bypassed? With this simple, config-based mod, you can now do that! This is a server-sided mod so you will only need to install it on your server.

 

It is really easy to set this up:

  1. Install the mod onto your server
  2. Add your IPs that should be able to join the server to the ipwhitelist.txt file
  3. Restart the server for changes to take effect

 

Important Locations:

ipwhitelist.txt: \config\ipwhitelist.txt

ipwhitelist-server.toml: \world\serverconfig\ipwhitelist-server.toml

ip_attempts.log: \logs\ip_attempts.log

 

Features:

Supports IP Patterns: 127.*.*.* or 127.*.10.21 or 127.0.0.*

IP Logging: Logs connection attempts to the ip_attempts.log file

 

Examples:

This is how the ipwhitelist.txt file can look like:

127.0.0.1

10.255.255.*

172.31.255.255

188.*.*.*

 

Q: How do I know if this works?

A: If you just added the mod and try to connect to the server you will get disconnected. Then the mod is working and you havent set up your IPs in the ipwhitelist.txt file and get disconnected with the following message: “Your IP is not whitelisted.”
The console will also log the loaded mod state and ip patterns (if it works):

[net.cyberking42.ipwhitelist.IpWhitelistMod/]: Starting IP Whitelist Mod (Server-side)
[net.cyberking42.ipwhitelist.IpWhitelistMod/]: IP whitelist file is empty. No IPs loaded.

What would happen if two IPs were added to the ipwhitelist.txt file:

[net.cyberking42.ipwhitelist.IpWhitelistMod/]: Loaded 2 IP patterns into the whitelist.

 

常见问题

IP Whitelist 支持哪些 Minecraft 版本?

IP Whitelist 支持 Minecraft Java 版 1.14.4–1.21.4,共 29 个版本,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

IP Whitelist 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

Cyberking42 的其他作品

查看全部 →