Inactive [ADMN/SEC] EasyBan v2.1 - Ban people/subnets/countries from "offline" Servers [1185]

Discussion in 'Inactive/Unsupported Plugins' started by whoami, Jun 6, 2011.

  1. Offline

    whoami

    Please use BukkitDev for bug reports/feature requests:
    http://dev.bukkit.org/server-mods/easyban/

    EasyBan - Ban people/subnets/countries from "offline" Servers:
    Version: v2.1

    With this plugin you can ban griefers and other annoying people from your "offline" Server. To combat dynamic IPs EasyBan keeps track of players IP addresses and saves them into a file. Additionally you can ban entire subnets and/or countries if necessary. You can also add different DNSBL to block unwanted client hosts(open proxies, tor exit nodes, and much more)
    The plugin has support for PermissionsBukkit(Superperms) and Permissions. Without a Permissions plugin it defaults to op.

    Features:
    • Kick and ban players and all their IP addresses
    • Temporary bans
    • Ban entire subnets
    • Ban entire countries
    • Ban hosts with the help of DNSBL
    • Customize plugin messages
    • IPv6 support
    • YAML, HSQLDB and MySQL database support
    Download:
    http://dev.bukkit.org/server-mods/easyban/files/9-v2-1-cb-1185/
    Source Code:
    https://github.com/whoami-plugins/EasyBan

    Usage:
    Code:
    /ekick playername [reason] - Kick a player
    /ehistory playername - List all ips of a player
    /ealternative playername or ip - List all nicknames used by a player/show all players that connected from one ip
    /eban playername [reason] [time] - Ban a player. When time is given the player will be banned for [time] minutes
    /eunban playername - Unban a player
    /ebaninfo playername - Show informations about a ban
    /elistbans - List all banned players
    /elisttmpbans - List all temporary bans
    /ebansubnet networkprefix/subnetmask [reason] - Ban a subnet(e.g. /esubnetban 24.64.23.0/255.255.252.0 or 24.64.23.0/22 or 2001:470:1f09:e26::/64)
    /eunbansubnet networkprefix/subnetmask - Unban a subnet
    /elistsubnets - List all banned subnets
    /ebancountry countrycode - Ban a country(Country codes can be found here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
    /eunbancountry countrycode - Unban a country
    /elistcountries - List all banned countries
    /ewhitelist playername - Whitelist a player; Useful when a range ban hits an innocent
    /eunwhitelist playername - Remove player from whitelist
    /elistwhite - List all whitelisted players
    
    Country bans:
    Country bans are a optional feature just install the GeoIPTools plugin and they work.

    YAML:
    The YAML data backend is the default and doesn't need any configuration

    HSQLDB (open)

    To use the HSQL database download this.
    Create a "lib" directory in your server root and copy the downloaded file to that directory. Open the config.yml in plugins/EasyBan/ and replace "database: yaml" with "database: hsql"

    MySQL (open)

    To use MySQL as data backend download this.
    In that zip archive is a "mysql-connector-java-${VERSION}-bin.jar" file. Rename that file to "mysql-connector-java-bin.jar" and move it to the "lib" directory in your craftbukkit root folder. When the "lib" folder doesn't exist create it. Now create a database with a name of your choice.
    Open the config.yml in plugins/EasyBan/ and replace "database: yaml" with "database: mysql". Additionally you have to add these 5 settings:
    Code:
    schema: 'XYZ' #database name(when not given it defaults to 'easyban')
    host: 'XYZ'  # MySQL Server address
    port: 'XYZ'  # MySQL Server port
    username: 'XYZ' # MySQL user
    password: 'XYZ' # password for that user


    Permissions:
    Code:
    easyban.${command} (e.g. easyban.ekick)
    Custom Messages:
    After the first start you'll find a messages.yml in "plugins/EasyBan/". To edit a message just change the part right of the ":".

    Update from <0.6 to 0.6 or higher
    Show (open)

    The layout of the bans.yml has changed and needs minor adjustments. Open bans.yml in an editor and change in the bans and subnets sections the lists to maps:

    Example:
    Old Layout:
    Code:
    bans:
    - Pink
    - miau
    - deesck
    subnets:
    - 84.19.169.160/255.255.255.240
    - 84.19.165.208/255.255.255.240
    - 192.168.0.0/255.255.0.0
    New Layout:
    Code:
    bans:
        Pink: {}
        miau: {}
        deesck: {}
    subnets:
        84.19.169.160/255.255.255.240: {}
        84.19.165.208/255.255.255.240: {}
        192.168.0.0/255.255.0.0: {}
    

    Changelog:
    Version 2.1
    • added support for DNSBL
    Version 2.0
    • fixed #2
    • new configuration options
    More (open)

    Version 1.9
    • fixed #4
    • code cleanup
    Version 1.8
    • improved SQL code
    • player sees the reason for his kick/ban and for how long he was banned
    • added infos to plugin.yml
    Version 1.7
    • readded support for Permissions. If Permissions and PermissionsBukkit are installed Permissions will be used)
    Version 1.6
    • dropped support for Permissions
    • added support for PermissionsBukkit
    Version 1.5
    • Added configure option for mysql database schema
    • fixed MySQL temporary ban bug
    Version 1.4
    • /ealternative can now be used with a ip(request by AS1LV3RN1NJA)
    Version 1.3

    • MySQL support
    Version 1.2

    • HSQLDB support
    • Whitelist also works for subnet bans
    Version 1.1

    • GeoIPTools support
    Version 1.0

    • Added /ealternative command
    • Whitelist only works for country bans
    Version 0.9

    • Added country bans
    • Added a white list
    • Code cleanup
    • Renamed a few commands for consistency(esubnetban -> ebansubnet, esubnetunban -> eunbansubnet, elistips -> ehistory)
    • Moved messages form config.yml to messages.yml (custom messages will be copied automatically)
    • All actions are properly logged to console
    Version 0.8


    • Added temporary bans
    Version 0.7


    • Added missing message(thanks @l104693 for the report)
    Version 0.6


    • Reasons for bans
    • Saves who banned someone
    Version 0.5


    • Ignore case of commands
    Version 0.4


    • List commands
    Version 0.3


    • IPv6 Support
    • Thread safe
    • Ban subnets with CIDR notation
    • Messages moved to config.yml
    Version 0.2


    • Release
    Version 0.1


    • Internal test version
     
    efstajas, lastern and AS1LV3RN1NJA like this.
  2. Offline

    Plague

    is 823 required? you should only use recommended builds in the title
     
  3. Offline

    whoami

    I tested it on 823 but of course it should also work on 818 and older versions. I'll change the title
     
  4. Offline

    sfxworks

    I am going to use this to its full extent. Thank you.
     
  5. Offline

    sukosevato

    When I press the download link firefox tells me it is a security risk.

    Do you know why?
     
  6. Offline

    whoami

  7. Offline

    Pim1234

    well, how exactly do i ban a subnet?
     
  8. Offline

    whoami

    in general terms: "/esubnetban networkprefix/subnetmask"

    Lets say you have a user who is constantly changing his nick and ip to avoid the normal "/eban" then you would do the following steps to ban his subnet.

    1. Do a whois lookup on one of his IP-Addresses(e.g. 178.73.222.39)
    2. The whois gives you the address range(e.g. 178.73.216.0 - 178.73.223.255)
    3. The first number is the network prefix(e.g. 178.73.216.0)
    4. To calculate the subnet mask you use this formula "255.255.255.255 - (range end - network prefix) = subnet mask". There are also a zillion online calculators out there to do this.
    (e.g. 255.255.255.255 - (178.73.223.255 - 178.73.216.0) = 255.255.248.0)

    5. Do a "/esubnetban networkprefix/subnetmask" (e.g. /esubnetban 178.73.216.0/255.255.248.0)
     
  9. Offline

    wheelz

    the download link is broken
     
  10. Offline

    whoami

    Ooops... fixed
     
  11. Offline

    JSMinecraft

    I'm running a server through Hamachi, how would I ban a person permanently? Because I have this presistent griefer who keeps entering under people name he keeps changing his name. I banned his IP and blocked all incoming traffic from him so he can't get in.. unless he reinstalls his Hamachi and makes a new account.. Is there a way to block his IP Adress permanently?
     
  12. Offline

    whoami


    If for some reason you want to ban a single IP without associating a name with the IP you can use the subnetban feature for that.(e.g. /esubnetban 155.156.45.45/255.255.255.255).
     
  13. Offline

    Pim1234

    well, that's why i prefer Minechafter, with Mineshafter you need an (free) account at minecraft.net so you can't login using someone else's account.

    i am having trouble with finding his network range, where to look? because when i just type in his IP on google i get a lot of different number.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  14. Offline

    whoami

    http://whois.domaintools.com/

    On a Unix OS you can usually just do a "whois ip" in the console.
     
  15. The plugin WhoAreYou can be made to display a players IP.
     
  16. Offline

    odielag

    BTW, is there any way to see if someone has been banned? Would be helpful.
     
  17. You can look in the config file.
     
  18. Offline

    odielag

    I ask because moderators want to know who's houses are deserted.
     
  19. Offline

    whoami

    Not from ingame, but I put it on my ToDo list.
     
  20. Offline

    Donny

    Any reasons these commands dont work?
    "
    /esubnetunban - Unban a subnet /elistbans - List all banned players /elistsubnets - List all banned subnets /elistips playername - List all known IP addresses of a player"
     
  21. Offline

    whoami

    But they do. I tested all commands before uploading 0.4. Do you have the newest Version? Do you have the Permissions to use the commands?
     
  22. Offline

    Donny

    I have "*" permissions
    It returns as an unknown command.
     
  23. Offline

    whoami

    And you are sure you are using Version 0.4?(On startup it will say "[INFO] EasyBan enabled Version: 0.4").
    Because the "list" commands don't exist in older versions.

    I just tested it again on a freshly installed Server and I can't reproduce your problem.
     
  24. Offline

    skyref

    Could you add reason, because if at the server is more people like mods, admins next person not know why somebody have ban. If you add possiblility to tempban it will be wonderful.
     
  25. Offline

    whoami

    Will do
    Not sure about that yet. I want to keep the plugin as simple as possible.
     
  26. Offline

    Donny

    Code:
    08:50:15 [SEVERE] Could not pass event PLAYER_JOIN to EasyBan
    java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.HashMap
            at uk.org.whoami.easyban.datasource.YamlDatasource.isNickBanned(YamlDatasource.j
    ava:201)
            at uk.org.whoami.easyban.EasyBanPlayerListener.onPlayerJoin(EasyBanPlayerListene
    r.java:42)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:244)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
            at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.
    java:124)
            at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
            at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:74)
            at net.minecraft.server.Packet1Login.a(SourceFile:43)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:40)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    easyban1.6
     
  27. Offline

    whoami

    You did not adjust the bans.yml file. Look in the first post to find instructions for that.
     
  28. Offline

    Donny

    I deleted the whole easybans folder and let it recreate itself.
     
  29. Offline

    whoami

    I just tested that and it works fine for me.

    Did you remove the previous easyban version from the plugins folder? Can you post your bans.yml?
     
  30. Offline

    skyref

    For me this plugin don't work. I ban people, but they can connect and play, or change playername and grieffing more. I get info, that I ban somebody like is in the 1 of the config files.
     

Share This Page