/gbans

gbans is a global ban tracker application & sourcemod plugin for Team Fortress 2 similar to sourcebans++ but developed with modern practices

Primary LanguageGoMIT LicenseMIT

gbans

License: MIT Test, Build & Publish release Codacy Badge Go Report Card GoDoc Lines of Code Discord chat

gbans is intended to be a more modern & secure replacement for sourcebans / sourcebans++.

Primary differences from sourcebans++

  • No direct SQL queries across networks. Exposing MySQL to the internet is a very poor security practice. You can of course mitigate this with firewalls and sql accounts with ip restrictions or VPNs, but the majority of server admins will not ever do this.
  • Game servers authenticate with the gbans server upon startup of the plugin. Subsequent requests will use the returned authentication token.
  • Communication over HTTPS
  • Discord bot integration for administration & announcements.
  • Built using Go & PostgreSQL. It has a built-in webserver that is safe to directly expose to the internet. This means its not necessary to setup MySQL, Nginx/Apache and PHP on your server.
  • Non-legacy codebase that is (hopefully) not a nightmare to hack on.

Features

  • Import of existing sourcebans database
  • Import/Export of gbans databases
  • Backend linking of gbans services to enable use of other operators lists in real-time.
  • Game support
    • Team Fortress 2
  • 3rd party ban lists
    • tf2_bot_detector
    • Known VPN Networks
    • Known non-residential addresses
    • Known proxies
  • Multi server support
  • Global bans
  • Subnet & IP bans (CIDR)
  • Database support
    • Postgresql w/PostGIS
  • Docker support
  • ACME (Lets encrypt / Zero SSL) protocol support for automatic SSL certificates
  • SourceMod Plugin
    • Game server authentication
    • /gb_ban <player_id|steam_id> duration Reason Ban a user
    • /gb_unban Unban a previously banned user
    • /gb_kick Kick a user
    • /gb_mod or /mod <message> Call for a mod on discord
  • User Interfaces
    • Discord
    • Web
  • Game server logs
    • Remote relay agent gbans relay -h
    • Parsing
    • Indexing
    • Querying

Docker

Docker is recommended to run gbans. You can find the official docker images at dockerhub.

Assuming you have created your config file and have a database setup you can run it using something like:

docker run -it --rm -v `$(pwd)`/gbans.yml:/app/gbans.yml:ro leighmacdonald/gbans:latest

There is also a docker-compose config you can use which provides the database as well.

docker-compose -f docker/docker-compose.yml up --build --remove-orphans --abort-on-container-exit --exit-code-from gbans

Documentation

For installation, configuration and usage instruction, please see the docs directory.