Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--interface option does not work for tun interfaces #1814

Open
Boyardism opened this issue Mar 13, 2018 · 2 comments
Open

--interface option does not work for tun interfaces #1814

Boyardism opened this issue Mar 13, 2018 · 2 comments
Labels
enhancement New feature request

Comments

@Boyardism
Copy link

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 #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
Copy link
Owner

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.

@netblue30 netblue30 added the enhancement New feature request label Mar 14, 2018
@Boyardism
Copy link
Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request
Projects
None yet
Development

No branches or pull requests

2 participants