FIREJAIL-PROFILE(5)
πΈ NAME πΈ
okay so welcome to FIREJAIL-PROFILE(5), bestie β this is the manual page for profile, aka the security profile file syntax, plus all the info you need for building new application profiles. π
β¨
π SYNOPSIS π
π Using a specific profile π
run it with a filename like this:
firejail --profile=filename.profile
Example:
$ firejail --appimage
--profile=/etc/firejail/kdenlive.profile kdenlive.appimage
or just use a profile name, no cap:
firejail --profile=profile_name
Example:
$ firejail --appimage --profile=kdenlive kdenlive.appimage
π οΈ Building a profile manually π οΈ
start with the template in /usr/share/doc/firejail/profile.template and modify it in a text editor. to integrate the program in your desktop environment, copy the profile file in ~/.config/firejail directory and run "sudo firecfg". periodt. π«Ά
π Aliases and redirections π
in some cases the same profile can be used for several applications. one such example is LibreOffice. build a regular profile for the main application, and for the rest use /usr/share/doc/firejail/redirect_alias-profile.template. iconic behavior honestly. π
π§ Running the profile builder π§
firejail --build=appname.profile appname
Example:
$ firejail --build=blobby.profile /usr/bin/blobby
run the program in "firejail --build" and try to exercise as many program features as possible. the profile is extracted and saved in the current directory. open it in a text editor and add or remove sandboxing options as necessary. test again after modifying the profile. to integrate the program in your desktop environment copy the profile file in ~/.config/firejail directory and run "sudo firecfg". π
β¨ DESCRIPTION β¨
several command line options can be passed to the program using profile files. Firejail chooses the profile file as follows:
- if a profile file is provided by the user with
--profileoption, the profile file is loaded. if a profile name is given, it is searched for first in the~/.config/firejaildirectory and if not found then in/etc/firejaildirectory. profile names do not include the.profilesuffix. Example:
$ firejail --profile=/home/netblue/icecat.profile /usr/bin/icecat
Reading profile /home/netblue/icecat.profile
[...]
$ firejail --profile=icecat /usr/bin/icecat-wrapper.sh
Reading profile /etc/firejail/icecat.profile
[...]
- if a profile file with the same name as the application is present in
~/.config/firejaildirectory or in/etc/firejail, the profile is loaded.~/.config/firejailtakes precedence over/etc/firejail. Example:
$ firejail /usr/bin/icecat
Command name #icecat#
Found icecat profile in /home/netblue/.config/firejail directory
Reading profile /home/netblue/.config/firejail/icecat.profile
[...]
- use a
default.profilefile if the sandbox is started by a regular user, or aserver.profilefile if the sandbox is started by root. Firejail looks for these files in~/.config/firejaildirectory, followed by/etc/firejaildirectory. to disable default profile loading, use--noprofilecommand option. Example:
$ firejail
Reading profile /etc/firejail/default.profile
Parent pid 8553, child pid 8554
Child process initialized
[...]
$ firejail --noprofile
Parent pid 8553, child pid 8554
Child process initialized
[...]
π± Templates π±
in /usr/share/doc/firejail there are two templates to write new profiles.
profile.templateβ for regular profilesredirect_alias-profile.templateβ for aliasing/redirecting profiles
π§ Scripting π§
Scripting commands:
π File and directory names π
file and directory names containing spaces are supported. the space character ' ' should not be escaped. π«Ά
Example:
blacklist ~/My Virtual Machines
π¬ # this is a comment π¬
Example:
# disable networking
net none # this command creates an empty network namespace
β ?CONDITIONAL: profile line β
conditionally add profile line.
Example:
?HAS_APPIMAGE: whitelist ${HOME}/special/appimage/dir
this example will load the whitelist profile line only if the --appimage option has been specified on the command line. π
currently the only conditionals supported this way are HAS_APPIMAGE, HAS_NET, HAS_NODBUS, HAS_NOSOUND, HAS_PRIVATE and HAS_X11. the conditionals ALLOW_TRAY, BROWSER_DISABLE_U2F and BROWSER_ALLOW_DRM can be enabled or disabled globally in Firejail's configuration file.
the profile line may be any profile line that you would normally use in a profile except for "quiet" and "include" lines.
Note: when using one or more conditionals and--profile, it is recommended that the relevant option(s) (such as--appimage) be specified before--profile, so that their respective conditional(s) (such as?HAS_APPIMAGE) inside of the profile evaluate to true. π§ β¨
π¦ include other.profile π¦
include other.profile file.
Example:
include /etc/firejail/disable-common.inc
the file name can be prefixed with a macro such as ${HOME} or ${CFG}. ${HOME} is expanded as user home directory, and ${CFG} is expanded as Firejail system configuration directory β in most cases /etc/firejail or /usr/local/etc/firejail.
Example: "include ${HOME}/myprofiles/profile1" will load "~/myprofiles/profile1" file.
Example: "include ${CFG}/firefox.profile" will load "/etc/firejail/firefox.profile" file.
the file name may also be just the name without the leading directory components. in this case, first the user config directory (${HOME}/.config/firejail) is searched for the file name and if not found then the system configuration directory is searched for the file name. Note: unlike the --profile option which takes a profile name without the '.profile' suffix, include must be given the full file name.
Example: "include firefox.profile" will load "${HOME}/.config/firejail/firefox.profile" file and if it does not exist "${CFG}/firefox.profile" will be loaded.
system configuration files in ${CFG} are overwritten during software installation. persistent configuration at system level is handled in ".local" files. for every profile file in ${CFG} directory, the user can create a corresponding .local file storing modifications to the persistent configuration. persistent .local files are included at the start of regular profile files. π₯
π« noblacklist file_name π«
if the file name matches file_name, the file will not be blacklisted in any blacklist commands that follow.
Example:
noblacklist ${HOME}/.mozilla
π« nowhitelist file_name π«
if the file name matches file_name, the file will not be whitelisted in any whitelist commands that follow.
Example:
nowhitelist ~/.config
π€· ignore π€·
ignore command.
Example:
ignore seccomp
Example:
ignore net eth0
π€« quiet π€«
disable Firejail's output. this should be the first uncommented command in the profile file.
Example:
quiet
β οΈ warn message β οΈ
print a warning message to stderr. everything after the command is printed in a warning message as is (that is, without macro expansion).
Example:
warn This file is deprecated; use foo instead.
πΎ Filesystem πΎ
Okay bestie, these profile entries are literally building a chroot filesystem on top of the existing host filesystem. Each line describes a file/directory that is inaccessible (blacklist), a read-only file or directory (read-only), a tmpfs mounted on top of an existing directory (tmpfs), or mount-bind a directory or file on top of another directory or file (bind). Use private to set private mode. File globbing is supported, and PATH and HOME directories are searched β see the firejail(1) FILE GLOBBING section for more details. Examples:
blacklist file_or_directoryβ Blacklist directory or file. This makes a file or directory completely inaccessible. All other files and directories are unaffected. The blacklisted file or directory is still visible on the filesystem, even if it's inaccessible.
Symbolic link handling: blacklisting a path that is a symbolic link will also blacklist the path that it points to. For example, if ~/foo is blacklisted and it points to /bar, then /bar will also be blacklisted. Symlinks to /dev/null are not followed (only the symlink itself will be affected), as replacing certain paths with symlinks to /dev/null is not uncommon and restricting access to /dev/null can lead to unexpected issues (see #5803). Using /dev/null directly (instead of through a symlink) should work normally.
Examples:
blacklist /usr/bin
blacklist /usr/bin/gcc*
blacklist ${PATH}/ifconfig
blacklist ${HOME}/.ssh
bind directory1,directory2β Mount-binddirectory1on top ofdirectory2. This option is only available when running as root. π«Άbind file1,file2β Mount-bindfile1on top offile2. This option is only available when running as root. π«Άdisable-mntβ Disable/mnt,/media,/run/mountand/run/mediaaccess.keep-config-pulseβ Disable automatic~/.config/pulseinit, for complex setups such as remote pulse servers or non-standard socket paths.keep-dev-ntsyncβ Allow access to the/dev/ntsynccharacter device (even withprivate-dev), which is blocked by default. This device is mostly intended to increase performance and compatibility when running certain programs through Wine.keep-dev-shmβ/dev/shmdirectory is untouched (even withprivate-dev).keep-dev-tpmβ Allow access to Trusted Cryptography Module (TCM) and Trusted Platform Module (TPM) devices (even withprivate-dev), which are blocked by default.keep-shell-rcβ Do not copy shell rc files (such as~/.bashrcand~/.zshrc) from/etc/skel.keep-var-tmpβ/var/tmpdirectory is untouched.mkdir directoryβ Create a directory in user home, under/tmp, or under/run/user/<UID>before the sandbox is started. The directory is created if it doesn't already exist.
Use this command for whitelisted directories you need to preserve when the sandbox is closed. Without it, the application will create the directory, and the directory will be deleted when the sandbox is closed. Subdirectories are recursively created. Example from firefox profile:
mkdir ~/.mozilla
whitelist ~/.mozilla
mkdir ~/.cache/mozilla/firefox
whitelist ~/.cache/mozilla/firefox
For files in /run/user/<PID> use ${RUNUSER} macro:
mkdir ${RUNUSER}/firejail-testing
mkfile fileβ Similar tomkdir, this command creates an empty file in user home, or/tmp, or under/run/user/<UID>before the sandbox is started. The file is created if it doesn't already exist.noexec file_or_directoryβ Remount the file or the directorynoexec,nodevandnosuid.privateβ Mount new/rootand/home/userdirectories in temporary filesystems. All modifications are discarded when the sandbox is closed. β¨private directoryβ Usedirectoryas user home.--privateand--private=directorycannot be used together.
Bug: Even with this enabled, some firejail commands (such as mkdir, mkfile and private-cache) will still operate on the original home directory. Workaround: Disable the incompatible commands, such as by using "ignore mkdir" and "ignore mkfile". For details, see #903.
private-bin file,fileβ Build a new/binin a temporary filesystem, and copy the programs in the list. The files in the list must be expressed as relative to the/bin,/sbin,/usr/bin,/usr/sbin, or/usr/local/bindirectories. The same directory is also bind-mounted over/sbin,/usr/binand/usr/sbin. Multipleprivate-bincommands are allowed and they accumulate.private-cacheβ Mount an empty temporary filesystem on top of the.cachedirectory in user home. All modifications are discarded when the sandbox is closed.private-cwdβ Set working directory inside jail to the home directory, and failing that, the root directory.private-cwd directoryβ Set working directory inside the jail. Full directory path is required. Symbolic links are not allowed.private-devβ Create a new/devdirectory. Onlydisc,dri,dvb,full,hidraw,log,null,ptmx,pts,random,shm,snd,tty,urandom,usb,videoandzerodevices are available. Use the optionsno3d,nodvd,nosound,notv,nou2fandnovideofor additional restrictions.private-etc file,directoryβ Build a new/etcin a temporary filesystem, and copy the files and directories in the list. The files and directories in the list must be expressed as relative to the/etcdirectory, and must not contain the/character (e.g.,/etc/foomust be expressed asfoo, but/etc/foo/barβ expressed asfoo/barβ is disallowed). All modifications are discarded when the sandbox is closed. Multipleprivate-etccommands are allowed and they accumulate.private-opt file,directoryβ Build a new/optin a temporary filesystem, and copy the files and directories in the list. The files and directories in the list must be expressed as relative to the/optdirectory, and must not contain the/character (e.g.,/opt/foomust be expressed asfoo, but/opt/foo/barβ expressed asfoo/barβ is disallowed). All modifications are discarded when the sandbox is closed.private-srv file,directoryβ Build a new/srvin a temporary filesystem, and copy the files and directories in the list. The files and directories in the list must be expressed as relative to the/srvdirectory, and must not contain the/character (e.g.,/srv/foomust be expressed asfoo, but/srv/foo/barβ expressed asfoo/barβ is disallowed). All modifications are discarded when the sandbox is closed.private-tmpβ Mount an empty temporary filesystem on top of/tmpdirectory whitelisting/tmp/.X11-unix.read-only file_or_directoryβ Make directory or file read-only.read-write file_or_directoryβ Make directory or file read-write.tmpfs directoryβ Mount an empty tmpfs filesystem on top ofdirectory. Directories outside user home or not owned by the user are not allowed. Sandboxes running as root are exempt from these restrictions.whitelist file_or_directoryβ Whitelist directory or file. A temporary file system is mounted on the top directory. In the context of firejail, top directory means, if the whitelisted file's path is for example/etc/somedir/somefile, then the top directory would be/etc. All other top directories like/opt,/usrand so on, haven't changed, so all files there are still accessible, unless a file or directory inside them is also whitelisted. This is why sometimes it's beneficial to useblacklistin combination withwhitelist, if used for different top directories.
The whitelisted files are mount-binded inside. Modifications to whitelisted files are persistent, everything else in the same top directory is discarded when the sandbox is closed.
The top directory can be most directories in /, but there are some special cases. The /proc and /sys top directories aren't allowed, but /sys/module is allowed. Also /run/user/$UID, $HOME and all directories in /usr are treated as a top directory.
Symbolic link handling: whitelisting a path that is a symbolic link will also whitelist the path that it points to. For example, if ~/foo is whitelisted and it points to ~/bar, then ~/bar will also be whitelisted.
Restrictions: With the exception of the user home directory, both the link and the real file should be in the same top directory. For symbolic links in the user home directory, both the link and the real file should be owned by the user.
whitelist-ro file_or_directoryβ Equivalent towhitelist file_or_directoryfollowed byread-only file_or_directory.writable-etcβ Mount/etcdirectory read-write.writable-run-userβ Disable the default blacklisting ofrun/user/$UID/systemdand/run/user/$UID/gnupg.writable-varβ Mount/vardirectory read-write.writable-var-logβ Use the real/var/logdirectory, not a clone. By default, a tmpfs is mounted on top of/var/logdirectory, and a skeleton filesystem is created based on the original/var/log.
π Security filters π
okay bestie, this is the part where firejail stops being a cute little folder-shuffler and starts being an actual bouncer for your app π These are the security filters that exist right now, no cap:
allow-bwrapβ lets you run a bubblewrap sandbox inside the Firejail sandbox πͺ fr fr, by default Firejail straight up replaces the/usr/bin/bwrapexecutable with a do-nothing program, and this says "no, actually, let it live."allow-debuggersβ lets tools likestraceandgdbwork inside the sandbox by whitelisting theptraceandprocess_vm_readvsystem calls. Debugging rights, granted πapparmorβ turns on AppArmor confinement using the"firejail-default"AppArmor profile.apparmor profile_nameβ turns on AppArmor confinement with a custom profile of your choosing. Heads up though: that profile has to already be loaded into the kernel, no take-backs π«Άcapsβ enables the default Linux capabilities filter. Peepcapabilities(7)for the deets.caps.drop capability,capability,capabilityβ blacklists the capabilities you list. Bye πcaps.drop allβ blacklists all the Linux capabilities. absolutely zero chill, iconic πcaps.keep capability,capability,capabilityβ whitelists the capabilities you list (the opposite vibe of drop).landlock.enforce(experimental) β actually enforces the Landlock ruleset. And likeβ¦ without this one, all your other Landlock commands literally do nothing?? so don't skip it πlandlock.fs.read path(experimental) β creates a Landlock ruleset (if one doesn't already exist) and adds a read access rule for path.landlock.fs.write path(experimental) β creates a Landlock ruleset (if one doesn't already exist) and adds a write access rule for path.landlock.fs.makeipc path(experimental) β creates a Landlock ruleset (if one doesn't already exist) and adds a rule that allows creating named pipes (FIFOs) and Unix domain sockets underneath the given path.landlock.fs.makedev path(experimental) β creates a Landlock ruleset (if one doesn't already exist) and adds a rule that allows creating block devices and character devices underneath the given path.landlock.fs.execute path(experimental) β creates a Landlock ruleset (if one doesn't already exist) and adds an execution permission rule for path.memory-deny-write-executeβ installs a seccomp filter that blocks attempts to create memory mappings that are both writable and executable, to change mappings so they become executable, or to create executable shared memory. no RWX shenanigans allowed π«nonewprivsβ sets theNO_NEW_PRIVSprctl. This makes sure child processes can't acquire new privileges viaexecve(2); specifically, it means that calling a suid binary (or one with file capabilities) does not result in an increase of privilege. slay, stay in your lane β¨noprintersβ disables printers. π¨οΈβnorootβ use this one to enable a user namespace. The namespace has only one user β the current user. There's no root account (uid0) defined in the namespace at all. main character only πprotocol protocol1,protocol2,protocol3β enables the protocol filter. It's based on seccomp and checks the first argument to thesocketsystem call. Recognized values are:unix,inet,inet6,netlink,packet, andbluetooth. You can use multipleprotocolcommands and they accumulate. stack 'em π§restrict-namespacesβ installs a seccomp filter that blocks attempts to create newcgroup,ipc,net,mount,pid,time,userorutsnamespaces.restrict-namespaces cgroup,ipc,net,mnt,pid,time,user,utsβ installs a seccomp filter that blocks attempts to create any of the namespaces you specify. (yes,mntis how you spell it in the list π)seccompβ enables the seccomp filter and blacklists the syscalls in the default list. Seeman 1 firejailfor more.seccomp.32β enables the seccomp filter and blacklists the syscalls in the default list for 32-bit system calls on a 64-bit architecture system.seccomp syscall,syscall,syscallβ enables the seccomp filter and blacklists the system calls in your list on top of the default seccomp filter.seccomp.32 syscall,syscall,syscallβ enables the seccomp filter and blacklists the system calls in your list on top of the default seccomp filter, for 32-bit system calls on a 64-bit architecture system.seccomp.block-secondaryβ enables the seccomp filter and filters system call architectures so that only the native architecture is allowed. one architecture, one love π«Άseccomp.drop syscall,syscall,syscallβ enables the seccomp filter and blacklists the system calls in the list.seccomp.32.drop syscall,syscall,syscallβ enables the seccomp filter and blacklists the system calls in the list for 32-bit system calls on a 64-bit architecture system.seccomp.keep syscall,syscall,syscallβ enables the seccomp filter and whitelists the system calls in the list.seccomp.32.keep syscall,syscall,syscallβ enables the seccomp filter and whitelists the system calls in the list for 32-bit system calls on a 64-bit architecture system.seccomp-error-action kill | log | ERRNOβ return a different error instead ofEPERMto the process,killit when an attempt is made to call a blocked system call, or allow but log the attempt. choose your fighter βοΈx11β enables X11 sandboxing.x11 noneβ blacklists the/tmp/.X11-unixdirectory,${HOME}/.Xauthorityand the file specified in the${XAUTHORITY}environment variable. It also removes theDISPLAYandXAUTHORITYenvironment variables. And it stops with an error message if the X11 abstract socket would be accessible inside the jail π€ no sneaky sockets.xephyr-extra-params OPTIONSβ sets extra parameters for the Xephyr server command used byx11. This command should be included in the profile file before thex11command.
Example:
xephyr-extra-params -grayscale
x11
xephyr-screen WIDTHxHEIGHTβ sets the screen size for thex11command. This one should also be included in the profile file before thex11command.
Example:
xephyr-screen 640x480
x11
π DBus filtering π
okay so access to the session and system DBus UNIX sockets can be allowed, filtered, or disabled β three whole moods π
To disable the abstract sockets (and force applications to use the filtered UNIX socket) you'd need to request a new network namespace using the --net command. Another option is to remove unix from the --protocol set. iykyk π¦
Filtering requires installing the xdg-dbus-proxy utility. Filter rules can be specified for well-known DBus names, but they also get propagated to the owning unique name, too. The permissions are "sticky" and are kept even if the corresponding well-known name is released (though likeβ¦ applications rarely release well-known names in practice π). Names may have a .* suffix to match all names underneath them, including themselves β e.g. "foo.bar.*" matches "foo.bar", "foo.bar.baz" and "foo.bar.baz.quux", but not "foobar". For more info, see xdg-dbus-proxy(1).
Examples, bestie π:
dbus-system filterβ enables filtered access to the system DBus. Filters can be specified with thedbus-system.talkanddbus-system.owncommands.dbus-system noneβ disables access to the system DBus. And once access is disabled, it cannot be relaxed back to filtering. one-way door, no cap πͺdbus-system.broadcast org.freedesktop.Notifications=org.freedesktop.Notifications.*@/org/freedesktop/Notificationsβ allows the application to receive broadcast signals from the interfaceorg.freedesktop.Notificationsof the object exposed at the path/org/freedesktop/Notificationsby the client owning the bus nameorg.freedesktop.Notificationson the system DBus.dbus-system.call org.freedesktop.Notifications=org.freedesktop.Notifications.*@/org/freedesktop/Notificationsβ allows the application to call methods of the interfaceorg.freedesktop.Notificationsof the object exposed at the path/org/freedesktop/Notificationsby the client owning the bus nameorg.freedesktop.Notificationson the system DBus.dbus-system.own org.gnome.ghex.*β allows the application to own the nameorg.gnome.ghexand all names underneath it on the system DBus. πdbus-system.see org.freedesktop.Notificationsβ allows the application to see but not talk to the nameorg.freedesktop.Notificationson the system DBus. look, don't touch πdbus-system.talk org.freedesktop.Notificationsβ allows the application to talk to the nameorg.freedesktop.Notificationson the system DBus.dbus-user filterβ enables filtered access to the session DBus. Filters can be specified with thedbus-user.talkanddbus-user.owncommands.dbus-user noneβ disables access to the session DBus. Once access is disabled, it cannot be relaxed to filtering. same one-way door as above πdbus-user.broadcast org.freedesktop.Notifications=org.freedesktop.Notifications.*@/org/freedesktop/Notificationsβ allows the application to receive broadcast signals from the interfaceorg.freedesktop.Notificationsof the object exposed at the path/org/freedesktop/Notificationsby the client owning the bus nameorg.freedesktop.Notificationson the session DBus.dbus-user.call org.freedesktop.Notifications=org.freedesktop.Notifications.*@/org/freedesktop/Notificationsβ allows the application to call methods of the interfaceorg.freedesktop.Notificationsof the object exposed at the path/org/freedesktop/Notificationsby the client owning the bus nameorg.freedesktop.Notificationson the session DBus.dbus-user.own org.gnome.ghex.*β allows the application to own the nameorg.gnome.ghexand all names underneath it on the session DBus.dbus-user.see org.freedesktop.Notificationsβ allows the application to see but not talk to the nameorg.freedesktop.Notificationson the session DBus.dbus-user.talk org.freedesktop.Notificationsβ allows the application to talk to the nameorg.freedesktop.Notificationson the session DBus.nodbus(deprecated) β disables D-Bus access (both the system and session buses). Equivalent todbus-system noneanddbus-user none. it's giving legacy, but it's still here π«Ά
Individual filters can be overridden via the --ignore command. So like, supposing a profile has:
[...]
dbus-user filter
dbus-user.own org.mozilla.firefox.*
dbus-user.talk org.freedesktop.Notifications
dbus-system none
[...]
and the user wants to disable notifications π€ β that can be achieved by putting the below in a local override file:
[...]
ignore dbus-user.talk org.freedesktop.Notifications
[...]
and boom, notifications handled π
πΈ Resource limits, CPU affinity πΈ
These profile entries are literally the vibe check for how much of your system the sandboxed processes are allowed to eat π
They set the limits on system resources (rlimits) for the processes inside the sandbox. Fun fact: the limits can be modified inside the sandbox using the regular ulimit command, so it's not a total lockdown. And the cpu command configures the CPU cores available π
Examples, bestie β memorise these:
cpu 0,1,2β use only CPU cores 0, 1 and 2. That's it, that's the core group chat.nice -5β set a nice value of-5to all processes running inside the sandbox.rlimit-as 123456789012β set the maximum size of the process's virtual memory to123456789012bytes.rlimit-cpu 123β set the maximum CPU time in seconds.rlimit-fsize 1024β set the maximum file size that can be created by a process to1024bytes.rlimit-nproc 1000β set the maximum number of processes that can be created for the real user ID of the calling process to1000.rlimit-nofile 500β set the maximum number of files that can be opened by a process to500.rlimit-sigpending 200β set the maximum number of processes that can be created for the real user ID of the calling process to200.timeout hh:mm:ssβ kill the sandbox automatically after the time has elapsed π The time is specified in hours/minutes/seconds format. Sotimeout 00:10:00is your "go to bed" alarm, fr fr.
π¦ User Environment π¦
allusersβ all user home directories are visible inside the sandbox. By default, only the current user home directory is visible. Like, it's giving "everyone's invited to the slumber party".env name=valueβ set environment variable. Examples, slay:
env LD_LIBRARY_PATH=/opt/test/lib
env CFLAGS="-W -Wall -Werror"
ipc-namespaceβ enable a new IPC namespace if the sandbox was started as a regular user. IPC namespace is enabled by default for sandboxes started as root.
β Note: this only affects the IPC resources that are mentioned inipc_namespaces(7). It does not affect other IPC resources, such as Unix sockets (seeunix(7)). Important caveat, don't @ me.
keep-fdβ inherit open file descriptors to sandbox.name sandboxnameβ set sandbox name. Example:
name browser
no3dβ disable 3D hardware acceleration.noautopulse(deprecated) β seekeep-config-pulse. It's giving legacy energy πnodvdβ disable DVD and audio CD devices.nogroupsβ disable supplementary user groups.noinputβ disable input devices.nosoundβ disable sound system.notpm(deprecated) β ignored for compatibility. TPM devices are now blocked by default, seekeep-dev-tpm. So this one's just here being iconic and doing nothing.notvβ disable DVB (Digital Video Broadcasting) TV devices.nou2fβ disable U2F devices.novideoβ disable video capture devices.machine-idβ spoof id number in/etc/machine-idfile β a new random id is generated inside the sandbox π main character energy, no cap.
π Networking π
Networking features available in profile files. This is where it gets spicy π₯
defaultgw addressβ use this address as default gateway in the new network namespace.dns addressβ set a DNS server for the sandbox. Up to three DNS servers can be defined.hostname nameβ set a hostname for the sandbox.hostname-randomizeβ set sandbox hostname to a random value generated by firejail.hosts-file fileβ usefileas/etc/hosts.ip addressβ assign IP addresses to the last network interface defined by anetcommand. A default gateway is assigned by default. Example:
net eth0
ip 10.10.20.56
ip noneβ no IP address and no default gateway are configured for the last interface defined by anetcommand. Example:
net eth0
ip none
ip6 addressβ assign IPv6 addresses to the last network interface defined by anetcommand. Example:
net eth0
ip6 2001:0db8:0:f101::1/64
iprange address,addressβ assign an IP address in the provided range to the last network interface defined by anetcommand. A default gateway is assigned by default. Example:
net eth0
iprange 192.168.1.150,192.168.1.160
mac addressβ assign MAC addresses to the last network interface defined by anetcommand.mtu numberβ assign a MTU value to the last network interface defined by anetcommand.net bridge_interfaceβ enable a new network namespace and connect it to this bridge interface. Unless specified with option--ipand--defaultgw, an IP address and a default gateway will be assigned automatically to the sandbox. The IP address is verified using ARP before assignment. The address configured as default gateway is the bridge device IP address. Up to four--netbridge devices can be defined. Mixing bridge and macvlan devices is allowed πnet ethernet_interface|wireless_interfaceβ enable a new network namespace and connect it to this ethernet interface using the standard Linux macvlan or ipvlan driver. Unless specified with option--ipand--defaultgw, an IP address and a default gateway will be assigned automatically to the sandbox. The IP address is verified using ARP before assignment. The address configured as default gateway is the default gateway of the host. Up to four--netdevices can be defined. Mixing bridge and macvlan devices is allowed.net noneβ enable a new, unconnected network namespace. The only interface available in the new namespace is a new loopback interface (lo). Use this option to deny network access to programs that don't really need network access. Introvert mode π«Άnet tap_interfaceβ enable a new network namespace and connect it to this ethernet tap interface using the standard Linux macvlan driver. If the tap interface is not configured, the sandbox will not try to configure the interface inside the sandbox. Please useip,netmaskanddefaultgwto specify the configuration.netfilterβ if a new network namespace is created, enabled default network filter.netfilter filenameβ if a new network namespace is created, enabled the network filter infilename.netlockβ generate a custom network filter and enable it.netmask addressβ use this option when you want to assign an IP address in a new namespace and the parent interface specified by--netis not configured. An IP address and a default gateway address also have to be added.netns namespaceβ run the program in a named, persistent network namespace. These can be created and configured using"ip netns".veth-name nameβ use this name for the interface connected to the bridge for--net=bridge_interfacecommands, instead of the default one.
β¨ Other β¨
deterministic-exit-codeβ always exit firejail with the first child's exit status. The default behavior is to use the exit status of the final child to exit, which can be nondeterministic. If you hate surprises, this one's for you πdeterministic-shutdownβ always shut down the sandbox after the first child has terminated. The default behavior is to keep the sandbox alive as long as it contains running processes.join-or-start sandboxnameβ join the sandbox identified by name or start a new one. Same as"firejail --join=sandboxname"command if sandbox with specified name exists, otherwise same as"name sandboxname".
π FILES π
/etc/firejail/appname.profileβ global Firejail configuration consisting mainly of profiles for each application supported by default.$HOME/.config/firejail/appname.profileβ user application profiles, will take precedence over the global profiles π (user wins, always)./usr/share/doc/firejail/profile.templateβ template for building new profiles./usr/share/doc/firejail/redirect_alias-profile.templateβ template for aliasing/redirecting profiles.
π LICENSE π
Firejail is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Homepage: https://firejail.wordpress.com
β SEE ALSO β
firejail(1), firemon(1), firecfg(1), firejail-login(5), firejail-users(5), jailcheck(1)
https://github.com/netblue30/firejail/wiki/Creating-Profiles
Okay that's the whole page bestie, you're officially a firejail profile sommelier now π This lil masterpiece is FIREJAIL-PROFILE(5), version 0.9.82.2, dated Nov 2026 β go forth and write profiles that absolutely ate, no cap π
β¨
π¦ where this page comes from
- arch rolling: firejail 0.9.82.2-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms