mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1635] Allow passing in a netfilter configuration via the command line #1100
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#1100
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 @legoktm on GitHub (Nov 7, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1635
Please correct me if I'm wrong, but as I understand it from the man page, currently the netfilter configuration has to be saved in a file, and that is provided as a command-line argument.
For my use in MediaWiki, I'd like to be able to create dynamic netfilter configurations based on different configuration settings the user has provided (port numbers). Ideally I'd be able to pass in the configuration as a command-line option to firejail - is that something that would be possible? I'd like to avoid writing a file with dynamic contents at run time to avoid problems with webapps being able to write to the filesystem.
@reinerh commented on GitHub (Nov 7, 2017):
I don't think the firejail command line is the right interface to pass in iptables rules.
Is it really better to allow webapps influencing the commandline instead of files?
@netblue30 commented on GitHub (Nov 9, 2017):
I think I can bring in something generic. It will allow you to set port numbers, IP addresses etc. from the command line.
@netblue30 commented on GitHub (Nov 18, 2017):
I added template support for netfilter. You start as usual and pass some arguments on the command line after the filter file:
Firejail will replace $ARG1, $ARG2 and $ARG3 in your filter file with arg1, arg2, and arg3. Up to 16 arguments are allowed. There is a small example in /etc/firejail/tcpserver.net file. Let me know if you run into problems.