Hardening Firefox on Linux is mostly about reducing attack surface, strengthening privacy, and keeping usability at a level you're comfortable with. Here are the most effective changes.
- Keep Firefox Updated
The most important security measure is running the latest version, since updates frequently patch security vulnerabilities.
If your Linux distribution ships an older Firefox version, consider using Mozilla's official release instead.
- Enable HTTPS-Only Mode
Go to:
Settings → Privacy & Security → HTTPS-Only Mode
Turn on Enable HTTPS-Only Mode in all windows.
This forces encrypted connections whenever possible.
- Enable DNS over HTTPS (DoH)
Navigate to:
Settings → Privacy & Security → DNS over HTTPS
Choose a trusted provider or your own secure DNS service.
- Turn On Enhanced Tracking Protection
Set Enhanced Tracking Protection to:
Strict for maximum privacy
Standard if Strict breaks some websites
Strict blocks many trackers, cryptominers, and fingerprinting scripts.
- Disable Telemetry (Optional)
Open about:config and set:
toolkit.telemetry.enabled = false toolkit.telemetry.unified = false datareporting.healthreport.uploadEnabled = false
This reduces data sent to Mozilla.
- Enable Fission
Modern Firefox enables site isolation (Fission) by default on most systems.
Verify:
about:support
Search for Fission and ensure it is enabled.
- Enable HTTPS Certificate Revocation
In about:config:
security.OCSP.enabled = 1
This helps Firefox check whether certificates have been revoked.
- Disable WebRTC if You Don't Need It
If you never use browser-based video calls:
media.peerconnection.enabled = false
This can reduce IP address leakage.
- Resist Fingerprinting
Enable:
privacy.resistFingerprinting = true
Be aware this may cause some websites to behave differently.
- Enable First-Party Isolation (Advanced)
privacy.firstparty.isolate = true
This provides stronger separation between websites but may break some sign-in flows.
- Use Secure Extensions Sparingly
Only install extensions you truly need. Every extension increases attack surface.
Good choices include:
A reputable password manager
A content blocker such as uBlock Origin
Multi-Account Containers if you separate work and personal browsing
Avoid installing many extensions from unknown developers.
- Review Site Permissions
Go to:
Settings → Privacy & Security → Permissions
Disable or tightly control:
Camera
Microphone
Location
Notifications
Autoplay
Remove permissions you no longer use.
- Disable Pocket (Optional)
If unused:
extensions.pocket.enabled = false
- Enable Secure DNS and Safe Browsing
Keep these enabled:
Fraud protection
Malware protection
Download protection
These features help detect malicious websites and files.
- Clear Data on Exit
Under:
Privacy & Security → Cookies and Site Data
Enable:
Delete cookies and site data when Firefox is closed
Or use Temporary Containers if you want automatic isolation between browsing sessions.
- Use Firefox Containers
Containers isolate cookies between different contexts.
For example:
Work
Banking
Social media
Shopping
This limits cross-site tracking and reduces session leakage.
- Sandbox Firefox Further on Linux
Run Firefox using an additional sandbox such as:
Flatpak (with carefully reviewed permissions)
Firejail
Bubblewrap
This adds another layer of isolation beyond Firefox's own sandbox.
- Harden about:config Carefully
Useful settings include:
privacy.trackingprotection.enabled = true privacy.resistFingerprinting = true network.cookie.cookieBehavior = 5 media.peerconnection.enabled = false
Avoid copying large "hardening lists" from the internet without understanding them, as they often break websites or become outdated.
For Maximum Security
If security is your top priority:
Keep Firefox updated.
Use Strict Enhanced Tracking Protection.
Enable HTTPS-Only Mode.
Install only trusted, minimal extensions.
Use a password manager and enable multi-factor authentication on important accounts.
Run Firefox inside an additional sandbox.
Keep your Linux system fully updated.
Use a standard (non-root) user account for daily work.
These measures provide strong protection while maintaining good compatibility for most users.
