What does HackerNews think of user.js?
Firefox privacy, security and anti-tracking: a comprehensive user.js template for configuration and hardening
Don't get me wrong, I've been using Firefox for the last decade and I don't intend on using anything else for the foreseeable future, but Mozilla has no idea what they're doing with Firefox nowadays. Firefox View is the most useless thing I've ever seen, that expiring "independent voices" theme picker was some weird hippie stunt[1], the latest UI redesign which split the tab from the window looks hideous, and it's not like Firefox doesn't have things you can tweak for a more private experience[2]. I miss Firefox Test Pilot where they tried out different new features, I found a lot of them to be very useful but sadly lots of them didn't make it. I don't know what's going on at Mozilla but they seem to lack any vision, they're just existing as an option without trying to be the best option.
[1] https://blog.mozilla.org/en/products/firefox/firefox-news/in...
I don't use or recommend exactly what they do but they have a long list of settings you might want to change that is better documented than any other source I've seen and if you click the wiki link there is detailed info about how user.js works.
This is includes settings for removing or disabling all the integration with Mozilla services and their ads.
See for example: https://github.com/arkenfox/user.js
https://github.com/arkenfox/user.js -- If you're constrained using ff
It's a custom build of Firefox with somewhat sensible, sometimes strict, privacy respecting default settings.
There's also the Arkenfox user.js which you can put on top of vanilla Firefox, aiming for the most privacy and security possible. https://github.com/arkenfox/user.js
Fun fact: this makes you extremely easy to identify, because it gives your browser a very unique fingerprint. If JS is enabled, that is, which you can disable by default, but JS is simply a requirement for many websites to function.
I wonder how they approached this problem this for the Mullvad Browser.
But it needs tech skill to adopt, so even if this Mullvad Browser is basically just prepackaged Arkenfox, that's great to drive adoption.
There are also firefox forks that disable background requests. Librewolf (https://librewolf.net/) is a popular fork that uses a combination of about:config tweaks, policies, and patches to disable all background requests (technically some requests still go through, but are replaced with a dummy url that you can block). Librewolf also downloads uBlock Origin by default, and is close to upstream. Overall it's a pretty good out-of-the-box solution.
My browsers block connections to trackers and 3rd party cookies. Sometimes scripts too, for good measure, and some selected stuff from user.js (https://github.com/arkenfox/user.js). Separate profiles for each service just to make really sure important stuff doesn't get affected by casual browsing, and vice versa.
No google- or apple- owned phone. Phoning home from the PC is also at minimum - just Firefox does it and the package manager.
It's not total privacy because for some interactions you want to share your details, like payment info, but what I get is that I know where I pierce the boundary.
I would interpret that as a Linux distribution that is kept up to date, is easy to configure, does not have dial-home cruft and has decent documentation. This is just my own take but opinions will vary wildly for everything I will add here.
- Kept up to date would be all the popular distributions that are not niche focused such as the security/privacy distro's that you mentioned. They have a small user base and do not has as regular of a cadence of updates. So Arch, Alpine, Alma, Debian, CentOS/Redhat, Fedora, QubesOS, Rocky, Void, Ubuntu. Fedora and Ubuntu will have the most recent a.k.a. bleeding edge versions of upstream packages but most of the distributions are not far behind. The oldest and most battle hardened versions of software would be on CentOS/RHEL with back-ported bug and security fixes. I intentionally left out Gentoo and LinuxFromScratch as those are for people that love tinkering and troubleshooting.
- Not dialing home is devolving by the day but Alpine, Alma, Arch, Debian, CentOS, Qubues, Rocky, Void are not chatty. Fedora recently started dialing home quite heavily for desktop users and even mimic some Microsoft behavior in the latest Beta. Hopefully they will turn this off after Beta because blocking it breaks the desktop. Ubuntu had a few mis-steps in this area in the past but I do not know if Canonical curtailed the dialing home, this was some time ago. Something to keep an eye on in this area is systemd-resolvd as this is evolving and has the potential to get leaky but that is a topic in and of itself.
- Arch has incredible documentation. They are an outlier in this area. Behind them I would place Debian, CentOS, Fedora and Ubuntu. The others have hit-or-miss documentation that sometimes requires a search engine to fill the gaps, especially as it pertains to real world examples.
- Easiest to configure would be Ubuntu as it had heavy adoption early on by many developers, followed by Fedora. Both have a myriad of example configurations in their documentation and endless examples on StackExchange, Serverfault, etc...
Again, just my own opinions. I tried to not be biased. I am a pragmatic minimalist and do not like shiny or trendy things. I personally prefer Void and Qubes for desktop and Alpine for VM's, Routers, Firewalls, etc... Qubes should have a decent amount of memory, maybe 32GB+. Both have some minor annoyances that would frustrate people new to Linux. All of the popular distributions can be locked down to be less chatty using outbound firewall rules with the iptables "owner" module with exception to Fedora's Beta.
If you want to go beyond user-based+port-based rules then there is an open source project called OpenSnitch that mimics the behavior of LittleSnitch (mac). [1] Blocking the chatty behavior of Fedora will break it, especially their admin sub-domain. It is equivalent to Microsofts access sub-domain used heavily be the Home edition.
Beyond the basic hardening of an OS if one wanted to really lock things down and assuming they understand Linux networking principals, then QubesOS + a custom Firewall VM clone + Custom Whonix VM clone has the potential to leak the least data but this assumes that one already greatly understands networking, linux, all the internet services. There are no turn-key solutions for this that fill knowledge gaps, despite there being several that claim to do so. If going down this path, I suggest using a spare machine that you would not mind blowing away and re-configuring VM's as a matter of a learning exercise.
Reducing chatty'ness of user-space applications like Firefox would be user.js [2] and controlling what those applications can see or not see would be firejail available in some distro repos. [3]
Additional hardening can be implemented using one of the five security modules in the Linux kernel, with the most common being AppArmor and SELinux but one must really learn how these work to get the most out of them. Most applications in a Linux distro have existing MAC rules. Custom applications would need custom MAC rules to secure them. The default rules in AppArmor and SELinux are designed for a balance of security and usability rather than security+privacy.
All of the distributions can be stripped down to be as lean as you want.
[1] - https://github.com/evilsocket/opensnitch
https://gist.github.com/ryandaniels/33e443bb401dde665fce15dd...
but yes, a single setting is necessary if you want to also opt out of any _future_ telemetry settings without always having to update your prefs.
I was not a fan of their cache location changes as I had to write custom rules in bleachbit [2] to vacuum/compress/clean database files created by LibreWolf. In a weird way I think they made their browser less private with that move as not everyone is going to write custom bleachbit rules.
programs.firefox.profiles..extraConfig = builtins.readFile ./user.js;
One of my favorite settings is setting "keyword.enabled" to false, to prevent leaking mistyped URLs to the search engine provider. It feels much cleaner to explicitly specify the search engine using e.g. "g" when you want to search.https://github.com/arkenfox/user.js
Contrary to what LibreWolf claims you do have to sacrifice usability though, including WebGL, DRM, Firefox Sync, autofill, history, and the occasional breakage. With arkenfox there is also letterboxing, and even more breakage. If you set uBlock Origin to the recommended medium mode you usually still have to whitelist third-party scripts to make websites work.
Additionally, upon first launch of Firefox, a unique client identifier is created, and this is sent to Mozilla by default probably before you get a chance to disable telemetry features within the preferences dialogs. See [2], [7], [8] and [9].
As these privacy impacting features are enabled by default, before first launch of Firefox on Linux, you should disable these third party and telemetry features and also lock down other security and privacy settings. See [10] and [11] for the method of doing so, and an example user.js that contains decent documentation on well over a 100+ recommended configuration changes to make Firefox more respectful of privacy and security. If you don't reconfigure a user.js before first launch, at least the "New Profile" event will be notified to Mozilla with the unique client ID after a delay of only 30 minutes from creation of the first Firefox profile[9] (first launch).
[1] https://glandium.org/blog/?p=3923
[2] https://github.com/mozilla/gecko-dev/blob/HEAD/build/moz.con...
[3] resource://gre/modules/URLFormatter.jsm (use within Firefox URI bar)
[4] resource://gre/modules/AppConstants.jsm (use within Firefox URI bar)
[5] https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/fi...
[6] https://github.com/archlinux/svntogit-packages/blob/packages...
[7] resource://gre/modules/ClientID.jsm (use within Firefox URI bar)
[8] resource:///modules/BrowserUsageTelemetry.jsm (use within Firefox URI bar)
[9] https://github.com/mozilla/gecko-dev/blob/c3ec016fafa4cea6a0...
It's a pain to go through all of it the first time, less so with subsequent updates, but it's extremely comprehensive for most Firefox issues.
Then, I run uBO, uMatrix, NoScript, and Temporary Containers.
This being said, I'm interested in LibreWolf and how much user.js manipulation they make unnecessary.
For addons in general I recommend sticking to this: https://github.com/arkenfox/user.js/wiki/4.1-Extensions
For Firefox on Android I maintain Mull for 4+ years now:
- https://f-droid.org/en/packages/us.spotco.fennec_dos/
- Comparison: https://divestos.org/index.php?page=browsers
Chromium-based browsers like Brave are ideal for security [2].
An ideal solution for privacy and security would be running Firefox+user.js in Qubes OS [3], or for even more anonymity, Tor Browser in Qubes-Whonix [4]. However, even this isn't bulletproof, and a 3 letter agency can still determine who you are with techniques like keystroke deanonymization [5] or other techniques [6] like traffic analysis. Tor is also not reliable for anonymity because the project is kind of a shitshow [7], so there's really nothing you can do to truly hide.
[1]: https://github.com/arkenfox/user.js
[2]: https://madaidans-insecurities.github.io/firefox-chromium.ht...
[3]: https://www.qubes-os.org/
[4]: https://www.whonix.org/wiki/Qubes
[5]: https://www.whonix.org/wiki/Keystroke_Deanonymization
[6]: https://www.whonix.org/wiki/Warning
[7]: https://www.hackerfactor.com/blog/index.php?/archives/906-To...
But not as great as how fingerprint generalization works in a hardened Firefox[0].
[1] https://github.com/arkenfox/user.js
plus
rm /usr/lib/firefox/browser/features/*.xpi
takes care of pretty much all of the firefox bloat for me(honest question) Why is this necessary then: https://github.com/arkenfox/user.js
This is one of the leading reasons why I think Firefox is a better browser than competitors because they don't allow this level of customization without hacking on the source code, like say Brave does. However not even Brave or Ungoogled Chromium is hardened as much as Firefox is with this user.js.
If you have some time you can look through:
- all the .enabled entrys in
- all the .disabled entrys
Since you have Firefox, you could sync with a community-developed user.js like Arkenfox (previously GHacks) [1], which seems to go much farther and still not break much! At least the settings privacy.resistFingerprinting and privacy.firstparty.isolate looked indispensable as soon as I learned what they do.
And without FPI (first party isolation), not getting LocalCDN [2] (Decentraleyes successor) and Temporary Containers [3] seems like a gross oversight. They have a great discussion on add-ons at the Arkenfox wiki [4].
[1] https://github.com/arkenfox/user.js
[2] https://addons.mozilla.org/en-US/firefox/addon/localcdn-fork...
[3] https://addons.mozilla.org/en-US/firefox/addon/temporary-con...
chrome: ungoogled-chromium
It is incredibly difficult to make a browser fingerprint non-unique. Only the Tor browser has strict enough settings with a large enough user base to overcome fingerprinting.
If you don’t want to use Tor, try these:
- uBlock Origin (which has a larger blacklist of fingerprinting scripts)
- Enable the privacy.resistFingerprinting setting in about:config to make your browser more similar to other users with that setting enabled (but not entirely non-unique)
- The nuclear option: arkenfox user.js [1]. It’s github repo also contains a lot of further information about fingerprinting.