mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #403] Change iptables rules #293
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#293
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 @nick75e on GitHub (Apr 1, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/403
iptablesrules can only be set when starting a sandbox.Is it possible to have an option to load a different config file while a sandbox is running.
Thanks.
@netblue30 commented on GitHub (Apr 2, 2016):
Use --join-network. It is very flexible, you can do much more than changing netfilter, you can also change IP addresses, add interfaces etc. Example:
@nick75e commented on GitHub (Apr 2, 2016):
It works, thanks! But there's something weird. I tried
ifconfigand it gives me an ipv6 address even though I have added these lines to/etc/sysctl.conf:and
protocoldoesn't containinet6. Does that mean I still have a ipv6 connection in any way?@NoAgendaIT commented on GitHub (Apr 12, 2016):
First you might want to verify if those settings are still active by running
sysctl net.ipv6.conf.all.disable_ipv6 net.ipv6.conf.default.disable_ipv6 net.ipv6.conf.lo.disable_ipv6because some network managers (and dhcp clients) just set these back to0. sysctl.conf is normally only read once: at boot time.Did you try ifconfig inside the jail or on the host? And the address, is it an address that starts with
fe80:? And if so, does the other end of the veth pair (the one on the host with a name likeveth1234eth0) also have an fe80:: address?What do you mean with "protocol doesn't contain
inet6"?To answer your question of "does it mean you have an IPv6 connection in any way" the honest answer is yes, at least partially, iff both endpoints have that fe80 address. I'll briefly try to explain.
What I mean is, the
fe80:address you see is called a link local address. It is not routed, meaning that the address is only reachable by "the other end". (virtual or physical). I was tempted to explain more about what the address is used for among other things, but I deleted all of that, figuring it's better to keep it at this rather than go into all kinds of scenarios. Instead I'd like to advice you, in order to be sure whether ipv6 traffic is flowing across, to play around with tcpdump, and see if you can capture such traffic for yourself.@nick75e commented on GitHub (Apr 13, 2016):
I've just checked and
sysctl net.ipv6.conf.*.disable_ipv6=1ifconfigwas inside a jail.I never use
inet6withprotocolSince I use
openvpn, I was worried about ipv6 leaking. Then I remembered that it was inside a bridge and my system doesn't support ipv6 so there's probably no risks but I still created anetfilter6config file blocking everything. Better be safe than sorry!@netblue30 commented on GitHub (Apr 13, 2016):
I still have to look into it. I think that net.ipv6.conf entries are per-namespace. It could be possible to totally disable ipv6 or ipv4 as requested in --protocol command.
@chiraag-nataraj commented on GitHub (Aug 19, 2018):
@nick75e Is this still an issue?
@nick75e commented on GitHub (Aug 20, 2018):
yes, I still get an IPv6 address.
Linux Mint 19, firejail 0.9.54
@chiraag-nataraj commented on GitHub (Oct 3, 2018):
Hmm, this is definitely not ideal. Inside the jail (
firejail --noprofile --net=wlp60s0 --protocol=inet,netlink,unix),sysctl net.ipv6.conf.all.disable_ipv6returns0, suggestingfirejail(or whatever it calls) is resetting that somehow during its network setup. This does not happen when--net=is not used.@smitsohu commented on GitHub (Jun 19, 2019):
Some sysctl settings are per network namespace,
net.ipv4.tcp_syncookiesis affected as well.