Hostname IP Whitelist
1.0.0A simple yet powerful Velocity proxy plugin that restricts server access to specific hostnames or IP addresses. This is useful for preventing direct IP connections or enforcing the use of specific dom
Hostname Whitelist
A simple yet powerful Velocity proxy plugin that restricts server access to
specific hostnames or IP addresses. This is useful for preventing direct IP
connections or enforcing the use of specific domains (e.g., play.example.com).
Why is this important?
Malicious actors can create their own BungeeCord or Velocity proxy and forward
players to your server without their knowledge. This allows them to perform a
Man-in-the-Middle (MitM) attack, enabling them to:
- Log all commands (including
/loginand/registerpasswords on non-premium
servers). - Hijack player sessions (playing as the user).
- Execute commands on behalf of the victim.
By enforcing a hostname whitelist, you ensure that players can ONLY connect via
your official domain (e.g., uwu.org.ua), effectively blocking these malicious
redirects.
Similar security systems are used by major servers like DonutSMP, 2b2t,
and Hypixel to protect their players.
Features
- Hostname Whitelisting: Only allow connections from specified domains or
IPs. - Wildcard Support: Easily whitelist subdomains (e.g.,
*.uwu.org.ua) or IP
ranges (e.g.,192.168.1.*). - Customizable Messages: Configure the kick message shown to blocked
players. - Custom MOTD: Display a specific MOTD for players pinging with an invalid
hostname. - Discord Webhook Logging: Optionally log allowed and blocked connections to
a Discord channel.
Installation
- Download the latest release of the plugin.
- Place the
.jarfile into your Velocity server'spluginsfolder. - Restart your proxy server.
Configuration
The plugin creates a configuration folder at plugins/hostname-whitelist/
containing two files: config.yml and hostnames.txt.
config.yml
This file handles the general plugin settings.
# Hostname Whitelist Configuration
# Message shown when player connects with invalid hostname
# Placeholders: {hostname}
kick-message: "&cUnknown Server: {hostname}\n\n&7Please make sure you are using the correct IP"
# MOTD shown for invalid hostname pings
invalid-motd: "&cInvalid Hostname. Please use the correct IP address."
# Discord Webhook URL for logging connections
# Leave empty or set to "YOUR_WEBHOOK_URL_HERE" to disable
discord-webhook: "YOUR_WEBHOOK_URL_HERE"
# Whether to log allowed connections (true/false)
log-allowed-connections: false
# Whether to log denied connections (true/false)
log-denied-connections: false
hostnames.txt
This file is where you define which hostnames or IPs are allowed. You can add
one entry per line.
Examples:
# Allow all subdomains of uwu.org.ua
*.uwu.org.ua
# Allow exact hostname match
uwu.org.ua
# Allow specific IP address
192.168.1.1
# Allow IP range 192.168.1.0-255
192.168.1.*
Discord Webhook
To use the Discord logging feature:
- Create a Webhook in your Discord server (Server Settings -> Integrations ->
Webhooks). - Copy the Webhook URL.
- Paste it into the
discord-webhookfield inconfig.yml. - Enable
log-allowed-connectionsorlog-denied-connectionsas desired.
License
This project is licensed under the Mozilla Public License 2.0
Similar projects
Plugin →VeinMiner
Mine the whole vein on mining a single ore/block. Make the tedious mining experience to something satisfying and fun! FTB Ultimine alternative
99.3MSueta
Simple Voice Chat
A working voice chat in Minecraft!
76.8MSueta
Chunky
Pre-generates chunks, quickly and efficiently
18.4MSueta
VeinMiner Enchantment
Veinminer Addon - Adds vineminer enchantment to enchanting tables. Only tools with the enchantment can veinmine
18MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
WorldEdit
A Minecraft Map Editor... that runs in-game! With selections, schematics, copy and paste, brushes, and scripting. Use it in creative, or use it temporarily in survival.
11.6MSueta