mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3332] firejail container with --chroot? #2090
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#2090
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 @ghost on GitHub (Apr 8, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3332
I'm on a musl system and want to run a glibc binary sandboxed with firejail
the documentation seems vague:
Am I still able to utilize the standard profile for the application? Can I still do --private=~/dir/ for a persistent isolated /home/? Can I do --netns?
And why is it read-write? Can I have the rootfs remain read only so that I don't have to remake it for every new application?
On wayland (sway). There is no dbus or puleseaudio (only alsa, and the application is nosound anyway)
@smitsohu commented on GitHub (Apr 9, 2020):
Some of the
privateoptions are currently not available in a chroot, but Firejail will complain if you try to use them. All of thenetoptions should work.Probably it's the way it is because this is a sandbox file system, and modifying it should be relatively safe. You can however use
read-onlyandnoexecas usual to rebuild what Firejail does out of the box otherwise. What is your Firejail version?@smitsohu commented on GitHub (Apr 9, 2020):
In order to use
--netns, you'll need/etc/netnsand/var/run/netnsinside the chroot@smitsohu commented on GitHub (Apr 9, 2020):
@ghost commented on GitHub (Apr 10, 2020):
Perhaps it would be nice to have a feature where firejail would have a more container-like mode and pull files from a specified rootfs rather than /
I had a mind to use something leaner than firejail such as bubblewrap, but it turns out you can't join a network namespace with it which is something I need.
@ghost commented on GitHub (Apr 10, 2020):
Do you know how you would go about pulling a host netns into the chroot? created with the ip netns tool and containing a wireguard interface
@smitsohu commented on GitHub (Apr 11, 2020):
Does this work?
As far as I can see it should be possible to then run the sandboxes with
blacklist /var/run/netns.@ghost commented on GitHub (Apr 14, 2020):
I was not able to make it work.
this however:
sudo ip netns exec vpn1 bwrap --dev-bind / / bash'ip a' shows it inside the netns
some sudo stuff after exec can make it drop privs.
They made a big deal about the inability of bubblewrap to deal with netns over at their github issues page. Perhaps it was only because they were obsessed about doing it unprivileged.
Is there any problem with using ip netns exec as a hack to get bwrap to work with netns? bwrap comes without a lot of baggage firejail has (I use wayland/sway, and don't use dbus or pulseaudio) and allows to more easily reason about how to get a rootfs to work with all those ro-binds.
@smitsohu commented on GitHub (Apr 14, 2020):
Good to hear you found a working solution.
I would guess not. But to be sure I'd recommend to ask on their bug tracker.
@rusty-snake commented on GitHub (May 6, 2020):
I'm closing here due to inactivity, please fell free to reopen if you have more questions.