Specifying Firefox setting (like proxy) on a machine across the enterprise.

We are interested in how to “push” proxy settings for Firefox across the environment. There are custom builds that claim to work with Group policy, but I wanted to manage the standard Firefox. A little digging shows that you need to create 2 files.

First, a file named mozilla.cfg and place it in “C:\Program Files\Mozilla Firefox”. This file contains the setting you want to “Set”/Lock down. For example:

//
lockPref(“network.proxy.type”, 1);
lockPref(“network.proxy.http”, “poxyserver.domain.com”);
lockPref(“network.proxy.http_port”, 80)

Second you place a file named “local-setting.js” in “C:\Program Files\Mozilla Firefox\defaults\pref”. The contents of that file would be something like this:

pref(“general.config.obscure_value”, 0); // only needed if you do not want to obscure the content with ROT-13
pref(“general.config.filename”, “mozilla.cfg”);

Here is some PowerShell code to create these files.

echo 'pref("general.config.obscure_value", 0);' >> "C:\Program Files\Mozilla Firefox\defaults\pref\local-etting.js"
echo 'pref("general.config.filename", "mozilla.cfg');' >> Out-File -filepath "C:\Program Files\Mozilla Firefox\defaults\pref\local-etting.js"
echo '//' >> "C:\Program Files\Mozilla Firefox\mozilla.cfg"
echo 'lockPref("network.proxy.type", 1);' >> "C:\Program Files\Mozilla Firefox\mozilla.cfg"
echo 'lockPref("network.proxy.http", "poxyserver.domain.com");' >> "C:\Program Files\Mozilla Firefox\mozilla.cfg"
echo 'lockPref("network.proxy.http_port", 80);' >> "C:\Program Files\Mozilla Firefox\mozilla.cfg"

Trackbacks/Pingbacks

  1. Be-Digit - July 16, 2015

    […] Lockdown Firefox settings – enterprise proxy […]