mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1510] Question: ‘program.local’ ‘global.local’ and ‘program.profile’? #1011
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#1011
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Irvinehimself on GitHub (Aug 31, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1510
I would like to enable ‘apparmor’ and disable the internet, (protocol unix’[?],) globally, yet selectively disable ‘apparmor’ and/or enable the internet on a per program basis.
Can this be done by using an appropriate combination of ‘global.local’ and ‘program.local’ profiles?
For example,a neat/tidy solution would be something like:
global.local: {enable apparmor, disable internet connectivity}
program.local: {selectively enable internet connectivity}
Further, if the above did in fact work!!!, would it be possible to selectively disable apparmor in the ‘program.local’ profile?
A less neat solution, (if the ‘program.local’ setting overrides the profile setting,) would be to run the following bash and edit the created '.local' files as needed:
I would be grateful to hear your thoughts
Irvine
@Ferroin commented on GitHub (Aug 31, 2017):
There are better, more reliable, and more well documented methods of achieving what you want on the networking side. Take a look at the iptables documentation, you can achieve similar things with at least the 'owner' match or the 'cgroup' match, and possibly other ways too. Alternatively, don't configure the network in the main network namespace, then configure it explicitly in dedicated namespaces.
As far as whether or not any of this is possible with Firejail, I'd be willing to bet the answer is probably no, as making this possible would provide a trivial method of escaping the isolation firejail provides.
@ghost commented on GitHub (Aug 31, 2017):
You can disable apparmor by adding
ignore apparmorline inprogram.local.program.localis loaded first so it takes precedence overglobal.localandprogram.profile.You can use
net noneinstead ofprotocol unix(disable byignore net) which is stronger but can break more things.@Irvinehimself commented on GitHub (Aug 31, 2017):
Thank you for a very complete answer. The order of precedence combined with the 'ignore' flag is exactly what I have been trying to figure out.
When I read the manual, I noted the 'ignore' flag's existence, but then lost the reference. Similarly, WRT 'net' flag, the manual, (which in retrospect was obviously referring to the .desktop launcher,) suggested 'net=none' . When I tried to put that into a profile, it crashed!