mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-15 16:03:51 +01:00
feat(profiles): add wireguard.
This commit is contained in:
parent
d8449de55e
commit
c0e62f30bb
20
apparmor.d/groups/network/wg
Normal file
20
apparmor.d/groups/network/wg
Normal file
@ -0,0 +1,20 @@
|
||||
# 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/wg
|
||||
profile wg @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
capability net_admin,
|
||||
|
||||
network netlink raw,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/wg>
|
||||
}
|
48
apparmor.d/groups/network/wg-quick
Normal file
48
apparmor.d/groups/network/wg-quick
Normal file
@ -0,0 +1,48 @@
|
||||
# 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/wg-quick
|
||||
profile wg-quick @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
capability net_admin,
|
||||
|
||||
network netlink raw,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/{usr/,}{s,}bin/nft rix,
|
||||
/{usr/,}{s,}bin/sysctl rix,
|
||||
/{usr/,}bin/{,ba,da}sh rix,
|
||||
/{usr/,}bin/cat rix,
|
||||
/{usr/,}bin/ip rPx,
|
||||
/{usr/,}bin/readlink rix,
|
||||
/{usr/,}bin/resolvectl rPx,
|
||||
/{usr/,}bin/sort rix,
|
||||
/{usr/,}bin/stat rix,
|
||||
/{usr/,}bin/wg rPx,
|
||||
/{usr/,}bin/xtables-nft-multi rix,
|
||||
|
||||
/usr/share/terminfo/x/xterm-256color r,
|
||||
|
||||
/etc/iproute2/group r,
|
||||
/etc/iproute2/rt_realms r,
|
||||
/etc/resolvconf/interface-order r,
|
||||
/etc/wireguard/*.conf r,
|
||||
|
||||
@{sys}/module/wireguard r,
|
||||
|
||||
@{PROC}/sys/net/ipv4/conf/all/src_valid_mark w,
|
||||
|
||||
/dev/tty rw,
|
||||
|
||||
# Force the use as root
|
||||
deny /{usr/,}bin/sudo x,
|
||||
|
||||
include if exists <local/wg-quick>
|
||||
}
|
Loading…
Reference in New Issue
Block a user