apparmor.d/apparmor.d/profiles-a-f/fail2ban-server
2023-03-07 17:57:57 +00:00

43 lines
No EOL
1,016 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/fail2ban-server
profile fail2ban-server @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/openssl>
include <abstractions/python>
capability dac_read_search,
capability net_admin,
network netlink raw,
@{exec_path} mr,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}{s,}bin/xtables-nft-multi rix,
/{usr/,}{s,}bin/iptables rix,
/{usr/,}bin/ r,
/{usr/,}bin/python3.[0-9]* r,
/etc/fail2ban/{,**} r,
/var/lib/fail2ban/fail2ban.sqlite3 rwk,
/var/log/auth.log r,
/var/log/fail2ban.log w,
@{run}/fail2ban/fail2ban.pid rw,
@{run}/fail2ban/fail2ban.sock rw,
@{run}/resolvconf/resolv.conf r,
owner @{PROC}/@{pid}/fd/ r,
include if exists <local/fail2ban-server>
}