/home/ /tech/ /links/ /other/

Hardening Firefox

Firefox’s defaults settings absolutely suck. Thankfully, due to Firefox’s open nature, you can harden it by using a custom user.js. There are many places to find one, like FFProfile, but personally I just use Arkenfox user.js. From my experience it works quite well. Here’s my way of installing it :

  1. Download Arkenfox
  2. Open up Firefox atleast once so it generates your default profile folder
  3. Find your current profile’s folder, mine for example is ~/.mozilla/firefox/r4nd0mn6ms.default-esr/
  4. Delete everything inside of it and place the user.js you downloaded there
  5. Modify Arkenfox if needed, for example I recommend setting “keyword.enabled” to true so you can use the search bar like a normal human being
  6. Launch Firefox

After that, install Ublock Origin and you should be good to go.
I guess you could also set up DNS over HTTPS, but I won’t cover it here. Personally, I use Mullvad’s DNS and it just werks. Here’s their guide for it.

A few notes about arkenfox

  1. By default, all cookies and site data are wiped on close. There’s no need to mess around in the user.js, simply add exceptions in Settings > Privacy & Security > Cookies & Site Data > Manage Exceptions to keep cookies for certain sites.
  2. The letterboxing might annoy you. To disable it, change “privacy.resistFingerprinting.letterboxing” to false. You should really only do this if necessary, as it opens your browser up for potential fingerprinting.
  3. A lot of sites will break. The only problem I’ve had is with Discord, but it was fixed by allowing it to extract canvas data. If a site doesn’t work, just look up a solution. Someone probably asked for help already.

Sources :
https://spyware.neocities.org/articles/firefox
https://github.com/arkenfox/user.js/wiki