Giter Site home page Giter Site logo

systemd_overrides's Introduction

systemd overrides

Intro

Increased sandboxing and permission-limiting for selected services.

These are working sandboxing/security override.conf files for systemd services to reduce what they are allowed to do without breaking their normal functions. I selected services I understand and interact with the outside world. I went down the big systemd man page considering every option that applied. Sometimes I had to back-out options when they stopped the service from working.

I hope these are useful for some other people.

Services that run programs

Some services, like atd and crond let users/programs run arbitrary commands. I locked down those services to what the service itself needs plus what the commands I run to need. So you might need to change those.

The CGI, PHP, etc scripts that your installation of Apache runs need to be allowed too.

How to use

This are override files -- in general an override.conf file can override (replace) any unit option but here I have only added sandbox/security options. Do NOT modify the .unit file that came with the package. Instead do:

systemctl edit <service>

You'll be placed in the Nano editor. From there you can paste in this supplied override.conf file Use Control-X to save.

Tell systemd to reload:

systemctl daemon-reload

Restart the service

systemctl restart <service>

Test it and look at its logs. A first easy check:

systemctl status <service>

And look at the "State:" line. It should say "State: running".

Look at:

systemd-analyze security <service>

to see the improved score.

More info https://unix.stackexchange.com/questions/398540/how-to-override-systemd-unit-file-settings

systemd_overrides's People

Contributors

dmdmdm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.