mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1814] --interface option does not work for tun interfaces #1233
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#1233
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 @Boyardism on GitHub (Mar 13, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1814
expected behavior
firejail --interface=tun4 --noprofile --dns=85.214.20.141 /bin/bash
would create a sandbox with network traffic going through the tun interface until tun is torn down or something
Actual behavior: the tun does get brought into sandbox, but no traffic can go through the tun interface (nothing can be pinged, curled or wget from inside
I am aware of https://github.com/netblue30/firejail/issues/59 but thought that it only applies to --net= option.
P.S.:
I suspect that the result I want (traffic to/from the sandbox goes only through a particularly named tun (tun4) interface, applications out of sandbox remain un-affected and don't go through that particular tun4 interface) can probably be achieved via a combination of static routes, iptables rules and bridged interface (analogously to "routed bridge interfaces" from firejail tutorial) but I am not sure how to achieve that.
I am not very good with routing and environment with >1 tun interface (each set up automatically) is a bit above my linux-knowledge (in fact, I wanted to use firejail as an "easy" substitute for actually setting up the correct routes)
@netblue30 commented on GitHub (Mar 14, 2018):
It is not supported in this moment. I guess we also need to bring in the sandbox the programs handling the tun (or tap) interface, just a guess. We'll try to fix it.
@Boyardism commented on GitHub (Mar 24, 2018):
@netblue30 yes, it seems it needs whole VPN program in the sandbox as well.
BTW, running the tun interface setup script from inside the jail worked perfectly (thanks for pointer!)
Now I guess I need some help understanding routing (both in general and in context of firejail :) ) but that's another issue