mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6760] firefox: program not in sync with network adapter changes (VPN) #3358
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#3358
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 @aminvakil on GitHub (May 28, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6760
Description
Firefox does not pick network adapter changes (vpn connection / disconnection) and still uses old IP in new network interface.
Steps to Reproduce
Open firefox and connect a VPN system-wide.
Or connect a VPN system-wide, open firefox and then disconnect VPN.
Expected behavior
Use correct IP address in each interface.
Actual behavior
Firefox gets disconnected. I've checked using wireshark and it's using previous IP in new interface.
For example my wifi IP is 192.168.1.2/24 and my VPN local IP is 10.0.0.2/24, when I connect VPN, it uses 192.168.1.2/24 in vpn network interface.
It does not get fixed until a complete restart.
It happens the same when disconnecting, it uses 10.0.0.2/24 in wifi interface which does not work.
Behavior without a profile
Additional context
I cannot remember exactly when this starts to happen, about a couple of months ago
https://bugzilla.mozilla.org/show_bug.cgi?id=1960897
Environment
was compiled (
git rev-parse HEAD): NoChecklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail /usr/bin/firefoxOutput of
LC_ALL=C firejail --debug /usr/bin/firefoxIt's outputing lots of details from system which I prefer not to share publicly.
@kmk3 commented on GitHub (May 28, 2025):
Does it work with the following in ~/.config/firejail/firefox.local?
@aminvakil commented on GitHub (May 28, 2025):
No, the problem is the same, I can still see previous IP in new interface in wireshark.
I can also confirm it's reading config
@aminvakil commented on GitHub (May 28, 2025):
Ah, it's working indeed, it just does not pick DNS changes, as DNS server in VPN network is not available it does not work.
But when I browse an IP, it uses correct IP.
@pranaovs commented on GitHub (Jun 8, 2025):
Network connectivity to firefox is disconnected when I stop my VPN (TUN/TAP interface).
Flow:
I have to relaunch firefox if i want to continue using it without a VPN interface.
How do i allow firefox to continue working even if network interfaces change?
I have already tried
ignore netandignore private-devbut in vain.@aminvakil commented on GitHub (Jun 9, 2025):
@pranaovs Can you check browsing an IP? My problem has been fixed with
ignore netandignore private-dev, but DNS is not getting changed, which I think it's most probably because of firefox not picking up changes.@aminvakil commented on GitHub (Jun 9, 2025):
Firefox does pick up changes in /etc/resolv.conf when VPN gets connected / disconnected when it has been run without firejail.
@pranaovs commented on GitHub (Jun 9, 2025):
Okay this is interesting. I am able to enter ip addresses of sites and firefox is able to connect to those ip addresses.
Some cases, the ip is being redirected to the (correct) domain name and firefox fails (example, 1.1.1.1 -> one.one.one.one and 1.1.1.2 -> https://one.one.one.one/family), and in some cases, the websites don't redirect and I get some HTML back (example 96.7.128.198).
I am not able to find a simple website i can test connecting using just the IP. But i can confirm I'm able to reach because I get various errors like "Cloudflare: direct connection not allowed" or some other errors.
But this works even without
ignore netandignore private-devInterestingly, if i enable maximum protection in firefox DNS setting, it says DNS is active, but thats all. No improvements.
It's not DNS
There's no way it's DNS
It was DNS
-SSBroski
@rusty-snake commented on GitHub (Jun 9, 2025):
OT: Because Firefox still uses the system DNS to initialy resolve the configured DoH server domain.
@kmk3 commented on GitHub (Jun 9, 2025):
Potential duplicate of:
@kmk3 commented on GitHub (Jun 9, 2025):
Does it work with the following in ~/.config/firejail/firefox.local?
Was this working with a previous version of firefox/firejail?
If so, which versions?
Also, what is the name/version of the system dns manager?
@pranaovs commented on GitHub (Jun 9, 2025):
It works with these lines in firefox.local. I am able to disconnect my active VPN connection and still have firefox work. Thank you very much.
Mozilla Firefox 139.0.1
I don't know how to find that so here's a bunch of logs:
@kmk3 commented on GitHub (Jun 9, 2025):
Glad it worked!
What is the distribution name/version?
What is the output of the following?
Depending on the file type, this could also be related to:
@pranaovs commented on GitHub (Jun 9, 2025):
Arch Linux
@aminvakil commented on GitHub (Jun 10, 2025):
Yes, adding
ignore netandignore private-devfixed the issue with IP as I've stated in https://github.com/netblue30/firejail/issues/6760#issuecomment-2916263852.And adding
ignore private-etcfixed the issue for DNS as well. I check specific domains / subdomains which are only resolvalbe through VPN to make sure.Yes, but I can't pinpoint to exact firefox / firejal version which triggered this change, it was a couple of months ago.
I'm using NetworkManager and my VPN is getting activated through NetworkManager as well which changes resolv.conf directly.
It's not a symlink (i.e. I'm not using systemd-resolved).