Locking Firefox Proxy Settings

Note: Applies to Windows Installations only

In order to inhibit users from bypassing iPrism mobile filtering, an administrative lock should be put on browser proxy settings.

First we must create an extension configuration file for FireFox that will define the proxy settings to lock.

  1. Open a text editor, such as Notepad and create a file anywhere on the hard drive, called mozilla.txt. Later, This will be encoded into a file called mozilla.cfg, and added to the Firefox all.js file so that proxy settings will be locked.

  2. Edit mozilla.txt to contain the preferences necessary for locking FireFox (as shown below). Note that the format should be the same as seen in the profiles prefs.js file, with one exception; user_pref needs to be replaced with lockPref.

Configuration Example below (Note: parenthetical comments do not need to be in the file):

//
lockPref("app.update.enabled", false);  (Admin needs this entry to ensure that the all.jsfile does not get modified by any Firefox updates)
lockPref("network.proxy.http", "10.2.50.1");   (Defines and locks iPrism as http proxy)
lockPref("network.proxy.http_port", 3128);   (Defines and locks http proxy port at 3128)
lockPref("network.proxy.type", 1);  (Signifies "Manual" proxy configuration, as opposed to auto discovery etc, see note below)
lockPref("network.proxy.no_proxies_on", "localhost, 127.0.0.1");  (Networks where proxy is not necessary, i.e., exceptions)
lockPref("network.proxy.share_proxy_settings", true);  (Equivalent to the "Use proxy server for all protocols" setting)

Note: "1" in the provided example configuration (above) signifies that this is a manual proxy configuration;

0 = Direct connection, no proxy. (Default)
1
= Manual proxy configuration
2 = Proxy auto-configuration (ProxyPac)
4 = Auto-detect proxy settings

  1. The file must now be encoded with an offset of 13, and renamed.

You may download a program capable of this here or use an online encoder here (no warranty expressed or implied, there may be other tools available, we are not endorsing any particular tool, consider these examples).

Once the encoding is complete, the resulting file should be named mozilla.cfg and must be placed in the same directory that contains firefox.exe. The typical location is shown below.

 

  1. Go to C:\Program Files\Mozilla Firefox\greprefs\ and locate the all.js file. Open all.js in a text editor.  Add the line below to the end of it:

pref("general.config.filename", "mozilla.cfg");

  1. Save, and launch Firefox to test. Setting changes should now be locked, similar to the example shown below.