[apparmor] [ISSUE]Does apparmor support the port limit for app please?

Fei Shao robinshao007 at 163.com
Wed Jan 14 05:10:17 UTC 2026


Hi all,
I write a profile for nginx like below:
---------------------------------------------
profile /usr/sbin/nginx {
   include <abstractions/base>


   capability net_bind_service,
   capability setuid,
   capability setgid,

   capability dac_read_search,


   network inet tcp port=80,   #<==this line
   /usr/sbin/nginx mrix,
/etc/nginx/** r,
/var/log/nginx/** rw,
}
---------------------------------------------

if put the "network inet tcp port=80" in usr.sbin.nginx file, the 
aa-enforce return is :

---------------------------------------------
sudo aa-enforce usr.sbin.nginx
ERROR: Invalid or unknown keywords in 'network  inet tcp port=80
---------------------------------------------

so I have an issue about this, does apparmor support the port limit for 
app please?


Thanks

Fei Shao




More information about the AppArmor mailing list