IPWhitelist [v1.8]

Source: GitHub - CraftMinecraft/IPWhitelist: Force players to join through BungeeCord proxy - Works with spigot's bungeeip config.
Ore: https://ore-staging.spongepowered.org/roblabla/IPWhitelist
License: MIT
Dependencies: None

This is a port of Spigot’s IPWhitelist, a plugin that allows you to whitelist connection coming from only certain IP Addresses. This is mostly useful for servers running behind BungeeCord that can’t, for one reason or another, use a proper firewall.

#How to use

  • Install IPWhitelist on every SPONGE server in your network. This plugin is NOT installed on BungeeCord.
  • Configure the plugin to whitelist BungeeCord
  • ???
  • Profit

(Note : I did not port the setup mode code yet. When I have some free time, I will)
(Note2 : I have not tested this with SpongePI’s IP Forwarding. It’s probably borked).

#Commands
/ipwl addip - Adds the IP to the whitelist
/ipwl remip - Removes the IP of the whitelist
/ipwl list - Lists all whitelisted IPs
/ipwl reload - Reloads the whitelist config.
/ipwl debug - Enables debug mode, which prints the bungee IP of all connecting users
/ipwl setup - Enables setup mode. For this to work, you need to have no whitelist IP addresses.

#Permission node
ipwhitelist.setup - Access /ipwl command

3 Likes

Thanks for this plugin! Really glad you ported it! :smiley:

Have you considered putting the plugin on Ore?

So glad i messaged you on spigot for this! :heart_eyes: hero of the bungee!

Didn’t know about ore ^^’. It’s on it now: https://ore-staging.spongepowered.org/roblabla/IPWhitelist

It’s a bit weird that you can’t “link” the two threads though. It’d be nice if the ore “discuss” would link here. Oh well.

unfortunately right now in sponges current state ipforwarding for spongeforge servers has to be done using:

I might be missing something but the whitelist plugin is working though the forwarding itself isnt.

As I mentioned in the description, I didn’t test SpongePI. Whenever you get IP Forwarding to work, it will probably break IPWhitelist. I need to figure out how to get the real address from Sponge. It might not be possible right now though, I need to check how Sponge does the IP Forwarding bit.

There is also IP Forwarding plugin for Modded Servers - something I wrote to enable IP forwarding. You can try adding that to BungeeCord instead of SpongePls.

Alternatively, try using Waterfall, which is a fork of BungeeCord which has my patch to support Sponge servers built in.

probably won’t work either. The problem is, if you spoof the IP (which is what IP Forwarding does), when I try to get the connection’s IP, I’ll get the user’s real IP instead of bungeecord’s. So the whitelisting won’t work. Spigot has a getRealAddress() that recovers the original address before spoofing. Sponge doesn’t seem to have that.

I just need to do some testing and poking. If I can get my hands on the Socket through reflection or whatever, I can then get the real address. That should work, just need to figure out how to get there.

i was never able to even connect to the bungee with that plugin on the bungee. it just disconnected every time i tried to connect. also having some issues with your nucleus plugin and creating worlds.

Oh, I’m aware that it doesn’t solve your problem - I was more directing that at @Khaoz.

You can find how Sponge does the IP forwarding in this package for SpongeCommon, and this package for SpongeForge, if it helps, though I think you’re going to have a tough time getting the IP address unfortunately.

Maybe worth requesting such a feature on the API?

Probably. I’ll check if I can handle it without the API first though, because adding spoof to the API seems like work :stuck_out_tongue:.

Does Waterfall support Bungee plugins?

Note on linux you can also set up iptables/firewall things: https://www.spigotmc.org/wiki/firewall-guide/

AFAIK, yes, it’s just a fork of Bungee so they should still work. I’ve got no involvement in it though, best to just try it.

This plugin is no longer on Ore. Anyone have the download link/another place I can get this plugin/a working alternative?

I need it too, there is no donwload link, and the ore page seems to not exist