mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-19 09:28:17 +01:00
initial support for ufw
This commit is contained in:
parent
ce26fa103b
commit
cecd0a6284
2 changed files with 59 additions and 0 deletions
|
@ -30,6 +30,8 @@ profile sysctl @{exec_path} {
|
||||||
deny network inet6 stream,
|
deny network inet6 stream,
|
||||||
deny network inet stream,
|
deny network inet stream,
|
||||||
|
|
||||||
|
/etc/ufw/sysctl.conf r, # Add support for ufw
|
||||||
|
|
||||||
include if exists <local/sysctl>
|
include if exists <local/sysctl>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
57
apparmor.d/profiles-s-z/ufw
Normal file
57
apparmor.d/profiles-s-z/ufw
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
# apparmor.d - Full set of apparmor profiles
|
||||||
|
# Copyright (C) 2024 EricLin
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
abi <abi/3.0>,
|
||||||
|
|
||||||
|
include <tunables/global>
|
||||||
|
|
||||||
|
@{exec_path} = @{bin}/ufw
|
||||||
|
profile ufw @{exec_path} {
|
||||||
|
|
||||||
|
include <abstractions/base>
|
||||||
|
|
||||||
|
capability dac_read_search,
|
||||||
|
capability net_admin,
|
||||||
|
|
||||||
|
network netlink raw,
|
||||||
|
network inet dgram,
|
||||||
|
network inet6 dgram,
|
||||||
|
|
||||||
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
@{bin}/ r,
|
||||||
|
@{bin}/python3* ix,
|
||||||
|
@{bin}/cat ix,
|
||||||
|
@{bin}/xtables-nft-multi ix,
|
||||||
|
|
||||||
|
@{lib}/ufw/ufw-init ix,
|
||||||
|
|
||||||
|
@{PROC}/@{pid}/stat r,
|
||||||
|
@{PROC}/@{pid}/fd/ r,
|
||||||
|
@{PROC}/@{pid}/net/ip_tables_names r,
|
||||||
|
|
||||||
|
owner @{bin}/env r,
|
||||||
|
|
||||||
|
/etc/ufw/{,**} rwk,
|
||||||
|
|
||||||
|
/etc/default/ufw r,
|
||||||
|
|
||||||
|
/run/ufw.lock wk,
|
||||||
|
|
||||||
|
/etc/gai.conf r,
|
||||||
|
/etc/nsswitch.conf r,
|
||||||
|
/etc/passwd r,
|
||||||
|
/etc/services r,
|
||||||
|
|
||||||
|
/var/tmp/* rw,
|
||||||
|
/tmp/* rw,
|
||||||
|
|
||||||
|
/dev/pts/[0-9]* rw,
|
||||||
|
/dev/tty rw,
|
||||||
|
|
||||||
|
include if exists <local/ufw>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim:syntax=apparmor
|
Loading…
Reference in a new issue