mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #151] Disabled network in overlay mode. #101
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#101
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 @Javapraca on GitHub (Nov 20, 2015).
Original GitHub issue: https://github.com/netblue30/firejail/issues/151
I cannot access network when running Firejail in overlay mode. I tested versions: firejail_0.9.34_1_i386.deb and firejail_0.9.32_1_i386.deb on Ubuntu 14.04.3 (LTS), installed on computer with Atom CPU.
By the way I would like to thank you for developing Firejail - it is a great software, I use it every day.
The following logs come from Firejail version 0.9.32
bug.txt
In this case one can run firefox/ping/etc. but there is no network connection:
@netblue30 commented on GitHub (Nov 20, 2015):
From 0.9.32 to 0.9.34 quite a number of bugs have been fixed. I would suggest you move to version 0.9.34.
There seem to be a problem with user namespaces in your kernel, so for now let's try to get around it. Instead of "firejail --overlay firefox", try:
This disables user namespace. I'll do some more testing here, maybe I can understand what is going on. Network should work with overlayfs. Thanks for the bug.
@Javapraca commented on GitHub (Nov 21, 2015):
It works fine with "--overlay --ignore=noroot" (tested on version 0.9.34).
I am a bit surprised though - in the Firejail manual you wrote about "--noroot" option: "The option is not supported for --chroot and --overlay configurations, or for sandboxes started as root.", so I thought that "--noroot" and "--overlay" are mutually exclusive.
Outputs for firejail 0.9.34 (executed without "--ignore=noroot" option) look similar to the ones I have already added (version 0.9.32) - would you want me to paste them?
@Javapraca commented on GitHub (Nov 21, 2015):
UPDATE:
Command:
$ firejail --overlay --ignore=noroot firefoxdoes not work. It runs Firefox with access to the network but only when another Firefox instance is already running (otherwise there is no network access).@netblue30 commented on GitHub (Nov 23, 2015):
I've fixed the first problem:
Let's look into the network problem. I need you to do a test. Start the sandbox and do a /sbin/ifconfig followed by a ping and post the output here:
Thanks.
@Javapraca commented on GitHub (Nov 26, 2015):
Here is the output you wanted:
@netblue30 commented on GitHub (Nov 26, 2015):
I know what the problem is: --net doesn't work for wireless interfaces. I works only for regular wired Ethernet interfaces - wireless doesn't have support in the kernel for some features I need in the network namespace.
@Javapraca commented on GitHub (Nov 26, 2015):
On my other computer (also connected via WiFi) I am using similar configuration with Firejail version 0.9.28 and Ubuntu 12.04.2 LTS - and there is network connection inside Firejail sandbox. How it is possible?
@Javapraca commented on GitHub (Nov 26, 2015):
With all due respect :) - have you tried this concept:
http://superuser.com/questions/653996/how-to-move-wireless-connection-to-other-network-namespace
@Javapraca commented on GitHub (Nov 26, 2015):
And one more idea - would it be possible/safe to add a parameter to disable network namespaces inside the sandbox (in case one uses WiFi connection e.g.)?
@netblue30 commented on GitHub (Nov 27, 2015):
Maybe is the DNS setting, try this command:
Also, do a "netstat -rn" inside the sandbox, just to make sure the default gateway is configured.
To disable network namespace use --net=none:
@Javapraca commented on GitHub (Nov 27, 2015):
Yes, this is problem with default DNS inside "--overlay" sandbox. Command:
firejail --overlay --dns=8.8.8.8works fine (--noprofile option can be skipped). When I set --dns option to DNS IP given by nm-tool command or DNS IP from /etc/resolv.conf then it works as well. Maybe Firejail in default overlay mode denies access to some expected DNS configuration data (I have checked that nm-tool and /etc/resolv.conf do not give information about DNS in this case)?PS.
firejail --net=none- "Enable a new, unconnected network namespace." (quote from manual) and does not "disable network namespace". It does not help with "--overlay" problem anyway, but it would be really handy to have an option to disable network namespace.@netblue30 commented on GitHub (Nov 28, 2015):
I think Ubuntu runs a DNS proxy, and somehow the proxy clashes with --overlay. I don't see it here on my Ubuntu boxes (all 64bit). I'll try to get a 32bit Ubuntu install, I'll add it on my todo list.
For now stay with "--dns=8.8.8.8 --dns=8.8.4.4" - usually two DNS servers are used, just in case one of them goes down.
--network=none - There is no way to disable the networking subsystem once it is compiled into the kernel. The next best thing is to have it unconnected.
@Javapraca commented on GitHub (Nov 28, 2015):
So in this scenario you do not create a new network namespace in the sandbox?
@netblue30 commented on GitHub (Nov 28, 2015):
No, by default is not creating a network namespace, is just reusing the existing one. To create a network namespace you use --net=interface_name, something like this:
--net accepts only ethernet or bridge interfaces, it will not work with wireless.
@Javapraca commented on GitHub (Nov 28, 2015):
I was convinced that new network namespace is created with every sandbox instance. Thank you for explanation.