mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2032] Run program with the tun0 interface #1369
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#1369
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 @Bundy01 on GitHub (Jul 5, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2032
Hi,
I would like to run firefox only in my VPN interface (disconnect if my VPN picks up).
I tried adding
net tun0in the profile or running it with this command:firejail --net=tun0 firefox. I have that mistake:Is it possible it could work?
@netblue30 commented on GitHub (Jul 6, 2018):
I did some experiments here, it should definitely work. I'll bring in support for tap devices in two or three days.What tunneling software are you using: openvpn, wireguard ...?
Also, when you set the tunnel, does it assign an address to your tap interface? If you do /sbin/ifconfig or "ip addr show" what address do you get? I'm asking because the sandbox will automatically assign an address for the interface connected to your tap device and we need to make sure the address is on the same network as the tap device.
@Bundy01 commented on GitHub (Jul 12, 2018):
Hi,
I use openvpn and my interface name is
tun0and that of my ethernet connectionenp3s0f1.Thanks
@netblue30 commented on GitHub (Jul 17, 2018):
tun device will not work, you need a tap device. Move openvpn to a bridging configuration, they have an example here: https://openvpn.net/index.php/open-source/documentation/miscellaneous/76-ethernet-bridging.html. Basically you must use server-bridge and dev tap instead of server and dev tun in your configuration.
On the client you connect firejail to the tap device. Use the firejail version in git, I just added support for tap devices.
Then, try to ping the server end of the tunnel. There could be a problem with how openvpn assigns the address, but we'll figure it out.
There is also a similar discussion going on here: #2046
@Futureknows commented on GitHub (Jul 18, 2018):
Is this why routed network setups (--net=br0) are broken when the OS openvpn connection is activated? My direct networked ethernet devices (--net=eth0) allow me to activate/deactivate a VPN through the system network manager seamlessly, but on wifi devices activating openvpn breaks the connection on firejailed network namespaced sandboxes.
@Bundy01 commented on GitHub (Jul 21, 2018):
I've checked the tap interface of my vpn provider, but unfortunately I can't connect with tap :(
@veloute commented on GitHub (Jul 22, 2018):
In the case that this isn't added, you could look into something like vpnfailsafe, which uses iptables to prevent internet access if the VPN tunnel drops (thereby preventing IP and DNS leaks).
@Bundy01 commented on GitHub (Jul 23, 2018):
Hi,
I finally opted for ufw, the following rules seem to work:
@sebastianst commented on GitHub (Oct 17, 2018):
This is an old issue #59. Many VPN providers don't support tap interfaces, so please find a solution, maybe with network namespaces?
@kramer9 commented on GitHub (Nov 5, 2018):
I +1 the request to be able to direct the traffic directly to a vpn (--net=tun0)
@rugabunda commented on GitHub (Feb 18, 2019):
+1 Definitely would like to see support for tun.
@intika commented on GitHub (Apr 9, 2019):
An other solution is to use a bridge and iptables to route the jail over the tun interface https://firejail.wordpress.com/documentation-2/basic-usage/#routed (require masquerade and vlan kernel modules + ip_forward enabled) ...
supporting tun interface would really be amazing
@rusty-snake commented on GitHub (Nov 27, 2019):
Is this a duplicate of #1814? If so, we can close.
@intika commented on GitHub (Nov 27, 2019):
@rusty-snake you are right ;)
@rusty-snake commented on GitHub (Nov 27, 2019):
Duplicate of #1814