forked from netblue30/firejail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
firejail.txt
3375 lines (2970 loc) · 84.1 KB
/
firejail.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.TH FIREJAIL 1 "MONTH YEAR" "VERSION" "firejail man page"
.SH NAME
Firejail \- Linux namespaces sandbox program
.SH SYNOPSIS
Start a sandbox:
.PP
.RS
firejail [OPTIONS] [program and arguments]
.RE
.PP
Start an AppImage program:
.PP
.RS
firejail [OPTIONS] --appimage [appimage-file and arguments]
.RE
.PP
#ifdef HAVE_FILE_TRANSFER
File transfer from an existing sandbox
.PP
.RS
firejail {\-\-ls | \-\-get | \-\-put | \-\-cat} dir_or_filename
.RE
.PP
#endif
#ifdef HAVE_NETWORK
Network traffic shaping for an existing sandbox:
.PP
.RS
firejail \-\-bandwidth={name|pid} bandwidth-command
.RE
.PP
#endif
Monitoring:
.PP
.RS
firejail {\-\-list | \-\-netstats | \-\-top | \-\-tree}
.RE
.PP
Miscellaneous:
.PP
.RS
firejail {\-? | \-\-debug-caps | \-\-debug-errnos | \-\-debug-syscalls | \-\-debug-syscalls32 | \-\-debug-protocols | \-\-help | \-\-version}
.RE
.SH DESCRIPTION
#ifdef HAVE_LTS
This is Firejail long-term support (LTS), an enterprise focused version of the software,
LTS is usually supported for two or three years.
During this time only bugs and the occasional documentation problems are fixed.
The attack surface of the SUID executable was greatly reduced by removing some of the features.
.br
.br
#endif
Firejail is a SUID sandbox program that reduces the risk of security breaches by
restricting the running environment of untrusted applications using Linux
namespaces, seccomp-bpf and Linux capabilities.
It allows a process and all its descendants to have their own private view of the
globally shared kernel resources, such as the network stack, process table, mount table.
Firejail can work in a SELinux or AppArmor environment,
and it is integrated with Linux Control Groups.
.PP
Written in C with virtually no dependencies, the software runs on any Linux computer with a 3.x kernel version
or newer.
It can sandbox any type of processes: servers, graphical applications, and even user login sessions.
.PP
Firejail allows the user to manage application security using security profiles.
Each profile defines a set of permissions for a specific application or group
of applications. The software includes security profiles for a number of more common
Linux programs, such as Mozilla Firefox, Chromium, VLC, Transmission etc.
.PP
Alternative sandbox technologies like snap (https://snapcraft.io/) and flatpak (https://flatpak.org/)
are not supported. Snap and flatpak packages have their own native management tools and will
not work when sandboxed with Firejail.
.SH USAGE
Without any options, the sandbox consists of a filesystem build in a new mount namespace,
and new PID and UTS namespaces. IPC, network and user namespaces can be added using the
command line options. The default Firejail filesystem is based on the host filesystem with the main
system directories mounted read-only. These directories are /etc, /var, /usr, /bin, /sbin, /lib, /lib32,
/libx32 and /lib64. Only /home and /tmp are writable.
.PP
Upon execution Firejail first looks in ~/.config/firejail/ for a profile and if it doesn't find one, it looks in /etc/firejail/.
For profile resolution detail see https://github.com/netblue30/firejail/wiki/Creating-Profiles#locations-and-types.
If an appropriate profile is not found, Firejail will use a default profile.
The default profile is quite restrictive. In case the application doesn't work, use --noprofile option
to disable it. For more information, please see \fBSECURITY PROFILES\fR section below.
.PP
If a program argument is not specified, Firejail starts the user's preferred shell.
Examples:
.PP
$ firejail [OPTIONS] # starting the program specified in $SHELL, usually /bin/bash
.PP
$ firejail [OPTIONS] firefox # starting Mozilla Firefox
.PP
# sudo firejail [OPTIONS] /etc/init.d/nginx start
.SH OPTIONS
.TP
\fB\-\-
Signal the end of options and disables further option processing.
.TP
\fB\-\-allow-debuggers
Allow tools such as strace and gdb inside the sandbox by whitelisting
system calls ptrace and process_vm_readv. This option is only
available when running on Linux kernels 4.8 or newer - a kernel bug in
ptrace system call allows a full bypass of the seccomp filter.
.br
.br
Example:
.br
$ firejail --allow-debuggers --profile=/etc/firejail/firefox.profile strace -f firefox
.TP
\fB\-\-allusers
All directories under /home are visible inside the sandbox. By default, only current user home directory is visible.
.br
.br
Example:
.br
$ firejail --allusers
#ifdef HAVE_APPARMOR
.TP
\fB\-\-apparmor
Enable AppArmor confinement. For more information, please see \fBAPPARMOR\fR section below.
.TP
\fB\-\-apparmor.print=name|pid
Print the AppArmor confinement status for the sandbox identified by name or by PID.
.br
.br
Example:
.br
$ firejail \-\-apparmor.print=browser
.br
5074:netblue:/usr/bin/firejail /usr/bin/firefox-esr
.br
AppArmor: firejail-default enforce
#endif
.TP
\fB\-\-appimage
Sandbox an AppImage (https://appimage.org/) application. If the sandbox is started
as a regular user, nonewprivs and a default capabilities filter are enabled.
private-bin and private-lib are disabled by default when running appimages.
.br
.br
Example:
.br
$ firejail --appimage krita-3.0-x86_64.appimage
.br
$ firejail --appimage --private krita-3.0-x86_64.appimage
.br
#ifdef HAVE_X11
$ firejail --appimage --net=none --x11 krita-3.0-x86_64.appimage
#endif
.TP
#ifdef HAVE_NETWORK
\fB\-\-bandwidth=name|pid
Set bandwidth limits for the sandbox identified by name or PID, see \fBTRAFFIC SHAPING\fR section for more details.
#endif
.TP
\fB\-\-bind=filename1,filename2
Mount-bind filename1 on top of filename2. This option is only available when running as root.
.br
.br
Example:
.br
# firejail \-\-bind=/config/etc/passwd,/etc/passwd
.TP
\fB\-\-blacklist=dirname_or_filename
Blacklist directory or file. File globbing is supported, see \fBFILE GLOBBING\fR section for more details.
.br
.br
Example:
.br
$ firejail \-\-blacklist=/sbin \-\-blacklist=/usr/sbin
.br
$ firejail \-\-blacklist=~/.mozilla
.br
$ firejail "\-\-blacklist=/home/username/My Virtual Machines"
.br
$ firejail \-\-blacklist=/home/username/My\\ Virtual\\ Machines
.TP
\fB\-\-build
The command builds a whitelisted profile. The profile is printed on the screen. If /usr/bin/strace is installed on the system, it also
builds a whitelisted seccomp profile. The program is run in a very relaxed sandbox,
with only --caps.drop=all and --nonewprivs. Programs that raise user privileges are not supported
in order to allow strace to run. Chromium and Chromium-based browsers will not work.
.br
.br
Example:
.br
$ firejail --build vlc ~/Videos/test.mp4
.TP
\fB\-\-build=profile-file
The command builds a whitelisted profile, and saves it in profile-file. If /usr/bin/strace is installed on the system, it also
builds a whitelisted seccomp profile. The program is run in a very relaxed sandbox,
with only --caps.drop=all and --nonewprivs. Programs that raise user privileges are not supported
in order to allow strace to run. Chromium and Chromium-based browsers will not work.
.br
.br
Example:
.br
$ firejail --build=vlc.profile vlc ~/Videos/test.mp4
.TP
\fB\-c
Login shell compatibility option. This option is use by some login programs when executing
the login shell, such as when firejail is used as a restricted login shell. It currently does
not change the execution of firejail.
.TP
\fB\-\-caps
Linux capabilities is a kernel feature designed to split up the root privilege into a set of distinct privileges.
These privileges can be enabled or disabled independently, thus restricting what a process running
as root can do in the system.
By default root programs run with all capabilities enabled. \-\-caps option disables the following capabilities:
CAP_SYS_MODULE, CAP_SYS_RAWIO,
CAP_SYS_BOOT, CAP_SYS_NICE, CAP_SYS_TTY_CONFIG, CAP_SYSLOG, CAP_MKNOD, CAP_SYS_ADMIN.
The filter is applied to all processes started in the sandbox.
.br
.br
Example:
.br
$ sudo firejail \-\-caps /etc/init.d/nginx start
.TP
\fB\-\-caps.drop=all
Drop all capabilities for the processes running in the sandbox. This option is recommended for running GUI programs
or any other program that doesn't require root privileges. It is a must-have option for sandboxing untrusted programs
installed from unofficial sources - such as games, Java programs, etc.
.br
.br
Example:
.br
$ firejail \-\-caps.drop=all warzone2100
.TP
\fB\-\-caps.drop=capability,capability,capability
Define a custom blacklist Linux capabilities filter.
.br
.br
Example:
.br
$ firejail \-\-caps.drop=net_broadcast,net_admin,net_raw
.TP
\fB\-\-caps.keep=capability,capability,capability
Define a custom whitelist Linux capabilities filter.
.br
.br
Example:
.br
$ sudo firejail \-\-caps.keep=chown,net_bind_service,setgid,\\
setuid /etc/init.d/nginx start
.TP
\fB\-\-caps.print=name|pid
Print the caps filter for the sandbox identified by name or by PID.
.br
.br
Example:
.br
$ firejail \-\-name=mygame \-\-caps.drop=all warzone2100 &
.br
$ firejail \-\-caps.print=mygame
.br
.br
Example:
.br
$ firejail \-\-list
.br
3272:netblue::firejail \-\-private firefox
.br
$ firejail \-\-caps.print=3272
#ifdef HAVE_FILE_TRANSFER
.TP
\fB\-\-cat=name|pid filename
Print content of file from sandbox container, see FILE TRANSFER section for more details.
#endif
.TP
\fB\-\-cgroup=tasks-file
Place the sandbox in the specified control group. tasks-file is the full path of cgroup tasks file.
.br
.br
Example:
.br
# firejail \-\-cgroup=/sys/fs/cgroup/g1/tasks
#ifdef HAVE_CHROOT
.TP
\fB\-\-chroot=dirname
Chroot the sandbox into a root filesystem. Unlike the regular filesystem container,
the system directories are mounted read-write. If the sandbox is started as a
regular user, nonewprivs and a default capabilities filter are enabled.
.br
.br
Example:
.br
$ firejail \-\-chroot=/media/ubuntu warzone2100
#endif
.TP
\fB\-\-cpu=cpu-number,cpu-number,cpu-number
Set CPU affinity.
.br
.br
Example:
.br
$ firejail \-\-cpu=0,1 handbrake
.TP
\fB\-\-cpu.print=name|pid
Print the CPU cores in use by the sandbox identified by name or by PID.
.br
.br
Example:
.br
$ firejail \-\-name=mygame \-\-caps.drop=all warzone2100 &
.br
$ firejail \-\-cpu.print=mygame
.br
.br
Example:
.br
$ firejail \-\-list
.br
3272:netblue::firejail \-\-private firefox
.br
$ firejail \-\-cpu.print=3272
#ifdef HAVE_DBUSPROXY
.TP
\fB\-\-dbus-log=file
Specify the location for the DBus log file.
.br
.br
The log file contains events for both the system and session buses if both of
the --dbus-system.log and --dbus-user.log options are specified. If no log file
path is given, logs are written to the standard output instead.
.br
.br
Example:
.br
$ firejail --dbus-system=filter --dbus-system.log \\
.br
--dbus-log=dbus.txt
.TP
\fB\-\-dbus-system=filter|none
Set system DBus sandboxing policy.
.br
.br
The \fBfilter\fR policy enables the system DBus filter. This option requires
installing the xdg-dbus-proxy utility. Permissions for well-known can be
specified with the --dbus-system.talk and --dbus-system.own options.
.br
.br
The \fBnone\fR policy disables access to the system DBus.
.br
.br
Only the regular system DBus UNIX socket is handled by this option. To disable
the abstract sockets (and force applications to use the filtered UNIX socket)
you would need to request a new network namespace using \-\-net command. Another
option is to remove unix from the \-\-protocol set.
.br
.br
Example:
.br
$ firejail \-\-dbus-system=none
.TP
\fB\-\-dbus-system.broadcast=name=[member][@path]
Allows the application to receive broadcast signals from theindicated interface
member at the indicated object path exposed by the indicated bus name on the
system DBus.
The name may have a .* suffix to match all names underneath it, including
itself.
The interface member may have a .* to match all members of an interface, or be * to match all interfaces.
The path may have a /* suffix to indicate all objects underneath it, including
itself.
Omitting the interface member or the object path will match all members and
object paths, respectively.
.br
.br
Example:
.br
$ firejail --dbus-system=filter --dbus-system.broadcast=\\
.br
org.freedesktop.Notifications=\\
.br
org.freedesktop.Notifications.*@/org/freedesktop/Notifications
.TP
\fB\-\-dbus-system.call=name=[member][@path]
Allows the application to call the indicated interface member at the indicated
object path exposed by the indicated bus name on the system DBus.
The name may have a .* suffix to match all names underneath it, including
itself.
The interface member may have a .* to match all members of an interface, or be * to match all interfaces.
The path may have a /* suffix to indicate all objects underneath it, including
itself.
Omitting the interface member or the object path will match all members and
object paths, respectively.
.br
.br
Example:
.br
$ firejail --dbus-system=filter --dbus-system.call=\\
.br
org.freedesktop.Notifications=\\
.br
org.freedesktop.Notifications.*@/org/freedesktop/Notifications
.TP
\fB\-\-dbus-system.log
Turn on DBus logging for the system DBus. This option requires --dbus-system=filter.
.br
Example:
.br
$ firejail --dbus-system=filter --dbus-system.log
.TP
\fB\-\-dbus-system.own=name
Allows the application to own the specified well-known name on the system DBus.
The name may have a .* suffix to match all names underneath it, including itself
(e.g. "foo.bar.*" matches "foo.bar", "foo.bar.baz" and "foo.bar.baz.quux", but
not "foobar").
.br
.br
Example:
.br
$ firejail --dbus-system=filter --dbus-system.own=\\
.br
org.gnome.ghex.*
.TP
\fB\-\-dbus-system.see=name
Allows the application to see, but not talk to the specified well-known name on
the system DBus.
The name may have a .* suffix to match all names underneath it, including itself
(e.g. "foo.bar.*" matches "foo.bar", "foo.bar.baz" and "foo.bar.baz.quux", but
not "foobar").
.br
.br
Example:
.br
$ firejail --dbus-system=filter --dbus-system.see=\\
.br
org.freedesktop.Notifications
.TP
\fB\-\-dbus-system.talk=name
Allows the application to talk to the specified well-known name on the system DBus.
The name may have a .* suffix to match all names underneath it, including itself
(e.g. "foo.bar.*" matches "foo.bar", "foo.bar.baz" and "foo.bar.baz.quux", but
not "foobar").
.br
.br
Example:
.br
$ firejail --dbus-system=filter --dbus-system.talk=\\
.br
org.freedesktop.Notifications
.TP
\fB\-\-dbus-user=filter|none
Set session DBus sandboxing policy.
.br
.br
The \fBfilter\fR policy enables the session DBus filter. This option requires
installing the xdg-dbus-proxy utility. Permissions for well-known names can be
added with the --dbus-user.talk and --dbus-user.own options.
.br
.br
The \fBnone\fR policy disables access to the session DBus.
.br
.br
Only the regular session DBus UNIX socket is handled by this option. To disable
the abstract sockets (and force applications to use the filtered UNIX socket)
you would need to request a new network namespace using \-\-net command. Another
option is to remove unix from the \-\-protocol set.
.br
.br
Example:
.br
$ firejail \-\-dbus-user=none
.TP
\fB\-\-dbus-user.broadcast=name=[member][@path]
Allows the application to receive broadcast signals from theindicated interface
member at the indicated object path exposed by the indicated bus name on the
session DBus.
The name may have a .* suffix to match all names underneath it, including
itself.
The interface member may have a .* to match all members of an interface, or be * to match all interfaces.
The path may have a /* suffix to indicate all objects underneath it, including
itself.
Omitting the interface member or the object path will match all members and
object paths, respectively.
.br
.br
Example:
.br
$ firejail --dbus-user=filter --dbus-user.broadcast=\\
.br
org.freedesktop.Notifications=\\
.br
org.freedesktop.Notifications.*@/org/freedesktop/Notifications
.TP
\fB\-\-dbus-user.call=name=[member][@path]
Allows the application to call the indicated interface member at the indicated
object path exposed by the indicated bus name on the session DBus.
The name may have a .* suffix to match all names underneath it, including
itself.
The interface member may have a .* to match all members of an interface, or be * to match all interfaces.
The path may have a /* suffix to indicate all objects underneath it, including
itself.
Omitting the interface member or the object path will match all members and
object paths, respectively.
.br
.br
Example:
.br
$ firejail --dbus-user=filter --dbus-user.call=\\
.br
org.freedesktop.Notifications=\\
.br
org.freedesktop.Notifications.*@/org/freedesktop/Notifications
.TP
\fB\-\-dbus-user.log
Turn on DBus logging for the session DBus. This option requires --dbus-user=filter.
.br
Example:
.br
$ firejail --dbus-user=filter --dbus-user.log
.TP
\fB\-\-dbus-user.own=name
Allows the application to own the specified well-known name on the session DBus.
The name may have a .* suffix to match all names underneath it, including itself
(e.g. "foo.bar.*" matches "foo.bar", "foo.bar.baz" and "foo.bar.baz.quux", but
not "foobar").
.br
.br
Example:
.br
$ firejail --dbus-user=filter --dbus-user.own=org.gnome.ghex.*
.TP
\fB\-\-dbus-user.talk=name
Allows the application to talk to the specified well-known name on the session DBus.
The name may have a .* suffix to match all names underneath it, including itself
(e.g. "foo.bar.*" matches "foo.bar", "foo.bar.baz" and "foo.bar.baz.quux", but
not "foobar").
.br
.br
Example:
.br
$ firejail --dbus-user=filter --dbus-user.talk=\\
.br
org.freedesktop.Notifications
.TP
\fB\-\-dbus-user.see=name
Allows the application to see, but not talk to the specified well-known name on
the session DBus.
The name may have a .* suffix to match all names underneath it, including itself
(e.g. "foo.bar.*" matches "foo.bar", "foo.bar.baz" and "foo.bar.baz.quux", but
not "foobar").
.br
.br
Example:
.br
$ firejail --dbus-user=filter --dbus-user.see=\\
.br
org.freedesktop.Notifications
#endif
.TP
\fB\-\-debug\fR
Print debug messages.
.br
.br
Example:
.br
$ firejail \-\-debug firefox
.TP
\fB\-\-debug-blacklists\fR
Debug blacklisting.
.br
.br
Example:
.br
$ firejail \-\-debug-blacklists firefox
.TP
\fB\-\-debug-caps
Print all recognized capabilities in the current Firejail software build and exit.
.br
.br
Example:
.br
$ firejail \-\-debug-caps
.TP
\fB\-\-debug-errnos
Print all recognized error numbers in the current Firejail software build and exit.
.br
.br
Example:
.br
$ firejail \-\-debug-errnos
.TP
\fB\-\-debug-private-lib
Debug messages for --private-lib option.
.TP
\fB\-\-debug-protocols
Print all recognized protocols in the current Firejail software build and exit.
.br
.br
Example:
.br
$ firejail \-\-debug-protocols
.TP
\fB\-\-debug-syscalls
Print all recognized system calls in the current Firejail software build and exit.
.br
.br
Example:
.br
$ firejail \-\-debug-syscalls
.TP
\fB\-\-debug-syscalls32
Print all recognized 32 bit system calls in the current Firejail software build and exit.
.br
.TP
\fB\-\-debug-whitelists\fR
Debug whitelisting.
.br
.br
Example:
.br
$ firejail \-\-debug-whitelists firefox
#ifdef HAVE_NETWORK
.TP
\fB\-\-defaultgw=address
Use this address as default gateway in the new network namespace.
.br
.br
Example:
.br
$ firejail \-\-net=eth0 \-\-defaultgw=10.10.20.1 firefox
#endif
.TP
\fB\-\-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.
.br
.TP
\fB\-\-disable-mnt
Blacklist /mnt, /media, /run/mount and /run/media access.
.br
.br
Example:
.br
$ firejail \-\-disable-mnt firefox
.TP
\fB\-\-dns=address
Set a DNS server for the sandbox. Up to three DNS servers can be defined.
Use this option if you don't trust the DNS setup on your network.
.br
.br
Example:
.br
$ firejail \-\-dns=8.8.8.8 \-\-dns=8.8.4.4 firefox
.br
.br
Note: this feature is not supported on systemd-resolved setups.
.TP
\fB\-\-dns.print=name|pid
Print DNS configuration for a sandbox identified by name or by PID.
.br
.br
Example:
.br
$ firejail \-\-name=mygame \-\-caps.drop=all warzone2100 &
.br
$ firejail \-\-dns.print=mygame
.br
.br
Example:
.br
$ firejail \-\-list
.br
3272:netblue::firejail \-\-private firefox
.br
$ firejail \-\-dns.print=3272
.TP
\fB\-\-env=name=value
Set environment variable in the new sandbox.
.br
.br
Example:
.br
$ firejail \-\-env=LD_LIBRARY_PATH=/opt/test/lib
.TP
\fB\-\-fs.print=name|pid
Print the filesystem log for the sandbox identified by name or by PID.
.br
.br
Example:
.br
$ firejail \-\-name=mygame \-\-caps.drop=all warzone2100 &
.br
$ firejail \-\-fs.print=mygame
.br
.br
Example:
.br
$ firejail \-\-list
.br
3272:netblue::firejail \-\-private firefox
.br
$ firejail \-\-fs.print=3272
#ifdef HAVE_FILE_TRANSFER
.TP
\fB\-\-get=name|pid filename
Get a file from sandbox container, see \fBFILE TRANSFER\fR section for more details.
#endif
.TP
\fB\-?\fR, \fB\-\-help\fR
Print options end exit.
.TP
\fB\-\-hostname=name
Set sandbox hostname.
.br
.br
Example:
.br
$ firejail \-\-hostname=officepc firefox
.TP
\fB\-\-hosts-file=file
Use file as /etc/hosts.
.br
.br
Example:
.br
$ firejail \-\-hosts-file=~/myhosts firefox
.TP
\fB\-\-ignore=command
Ignore command in profile file.
.br
.br
Example:
.br
$ firejail \-\-ignore=shell --ignore=seccomp firefox
#ifdef HAVE_NETWORK
.br
$ firejail \-\-ignore="net eth0" firefox
#endif
.TP
\fB\-\-\include=file.profile
Include a profile file before the regular profiles are used.
.br
.br
Example:
.br
$ firejail --include=/etc/firejail/disable-devel.inc gedit
#ifdef HAVE_NETWORK
.TP
\fB\-\-interface=interface
Move interface in a new network namespace. Up to four --interface options can be specified.
Note: wlan devices are not supported for this option.
.br
.br
Example:
.br
$ firejail \-\-interface=eth1 \-\-interface=eth0.vlan100
.TP
\fB\-\-ip=address
Assign IP addresses to the last network interface defined by a \-\-net option. A
default gateway is assigned by default.
.br
.br
Example:
.br
$ firejail \-\-net=eth0 \-\-ip=10.10.20.56 firefox
.TP
\fB\-\-ip=none
No IP address and no default gateway are configured for the last interface
defined by a \-\-net option. Use this option
in case you intend to start an external DHCP client in the sandbox.
.br
.br
Example:
.br
$ firejail \-\-net=eth0 \-\-\ip=none
.br
.br
If the corresponding interface doesn't have an IP address configured, this
option is enabled by default.
.TP
\fB\-\-ip=dhcp
Acquire an IP address and default gateway for the last interface defined by a
\-\-net option, as well as set the DNS servers according to the DHCP response.
This option requires the ISC dhclient DHCP client to be installed and will start
it automatically inside the sandbox.
.br
.br
Example:
.br
$ firejail \-\-net=br0 \-\-ip=dhcp
.br
.br
This option should not be used in conjunction with the \-\-dns option if the
DHCP server is set to configure DNS servers for the clients, because the
manually specified DNS servers will be overwritten.
.br
The DHCP client will NOT release the DHCP lease when the sandbox terminates.
If your DHCP server requires leases to be explicitly released, consider running
a DHCP client and releasing the lease manually in conjunction with the
\-\-net=none option.
.TP
\fB\-\-ip6=address
Assign IPv6 addresses to the last network interface defined by a \-\-net option.
.br
.br
Example:
.br
$ firejail \-\-net=eth0 \-\-ip6=2001:0db8:0:f101::1/64 firefox
Note: you don't need this option if you obtain your ip6 address from router via SLAAC (your ip6 address and default route will be configured by kernel automatically).
.TP
\fB\-\-ip6=dhcp
Acquire an IPv6 address and default gateway for the last interface defined by a
\-\-net option, as well as set the DNS servers according to the DHCP response.
This option requires the ISC dhclient DHCP client to be installed and will start
it automatically inside the sandbox.
.br
.br
Example:
.br
$ firejail \-\-net=br0 \-\-ip6=dhcp
.br
.br
This option should not be used in conjunction with the \-\-dns option if the
DHCP server is set to configure DNS servers for the clients, because the
manually specified DNS servers will be overwritten.
.br
The DHCP client will NOT release the DHCP lease when the sandbox terminates.
If your DHCP server requires leases to be explicitly released, consider running
a DHCP client and releasing the lease manually.
.TP
\fB\-\-iprange=address,address
Assign an IP address in the provided range to the last network interface defined by a \-\-net option. A
default gateway is assigned by default.
.br
.br
Example:
.br
$ firejail \-\-net=eth0 \-\-\iprange=192.168.1.100,192.168.1.150
.TP
\fB\-\-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.
.br
.br
Example:
.br
$ firejail \-\-ipc-namespace firefox
#endif
.TP
\fB\-\-join=name|pid
Join the sandbox identified by name or by PID. By default a /bin/bash shell is started after joining the sandbox.
If a program is specified, the program is run in the sandbox. If \-\-join command is issued as a regular user,
all security filters are configured for the new process the same they are configured in the sandbox.
If \-\-join command is issued as root, the security filters, cgroups and cpus configurations are not applied
to the process joining the sandbox.
.br
.br
Example:
.br
$ firejail \-\-name=mygame \-\-caps.drop=all warzone2100 &
.br
$ firejail \-\-join=mygame
.br
.br
Example:
.br
$ firejail \-\-list
.br
3272:netblue::firejail \-\-private firefox
.br
$ firejail \-\-join=3272
.TP
\fB\-\-join-filesystem=name|pid
Join the mount namespace of the sandbox identified by name or PID. By default a /bin/bash shell is started after joining the sandbox.
If a program is specified, the program is run in the sandbox. This command is available only to root user.
Security filters, cgroups and cpus configurations are not applied to the process joining the sandbox.
#ifdef HAVE_NETWORK
.TP
\fB\-\-join-network=name|pid
Join the network namespace of the sandbox identified by name. By default a /bin/bash shell is started after joining the sandbox.
If a program is specified, the program is run in the sandbox. This command is available only to root user.
Security filters, cgroups and cpus configurations are not applied to the process joining the sandbox. Example:
.br
.br
# start firefox
.br