GithubHelp home page GithubHelp logo

tansly / selinux_policy_soldatserver Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 19 KB

SELinux policy for Soldat Dedicated Server

License: GNU General Public License v3.0

Makefile 100.00%
linux selinux security mandatory-access-control soldat soldat-dedicated-server game game-server dedicated-server selinux-policy

selinux_policy_soldatserver's Introduction

selinux_policy_soldatserver

This is an SELinux policy module for the Soldat Dedicated Server. Surely not many people will be interested in this, but well...

Types

This module defines the following types:

  • soldatserver_t: The domain for the server process.
  • soldatserver_exec_t: The domain for the server executables, entry point for the soldatserver_t domain.
  • soldatserver_data_t: For all kinds of read-only server data, readable by soldatserver_t.
  • soldatserver_log_t: For log and pid files of the server, writable by soldatserver_t.
  • soldatserver_data_rw_t: Read-write data of the server, such as the banned lists, admin lists etc.
  • soldatserver_port_t: For network ports that the server will bind to, such as the game port and the file server port.
  • soldatserver_lobbyport_t: For the port that the server needs to connect to to register itself to the lobby.

Type enforcement rules are derived by using common sense and testing. I will not delve into details here, the module is pretty short and one can guess the purpose of most lines by using common sense.

File contexts

The module assumes that the server will be placed under /opt/. Under /opt/, you can place as many server instances as you like, with the pattern /opt/soldatserver_.+. For example, I run three servers as:

  • /opt/soldatserver_CTF/
  • /opt/soldatserver_DM/
  • /opt/soldatserver_RCTF/

Notes

  • I run the servers as systemd services. I did not test any other kind of configuration. However, except the pidfile workaround (see the .te file) that I'm not sure if necessary, there should be no stuff dependant on systemd or any other stuff in my distro (Fedora Workstation 28). Still, here is my systemd unit template.

  • This module is tested on Fedora Workstation 28, with Soldat Dedicated Server 2.7.1. It does not generate any AVC's, and it is the tightest policy I could come up with with two days of work. But note that my knowledge of SELinux is pretty limited.

TODO

  • Document the rules for Telegram admin notifier, once I complete my Telegram bot and open source it.

selinux_policy_soldatserver's People

Contributors

tansly avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.