This morning, I was setting up a couple of new websites on my development server. The way I do this is very simple: since I use IIS7 on my development box, I change the default binding and map each new website to its new port — easy, quick and clean.

But today I encountered a small glitch: after I mapped port 87, I couldn't manage to access it from Firefox, no matter what I tried. Mozilla's browser wouldn't simply open the pages, and constantly kept to return the same error message.

After a bit of googling around the topic, I found out that Firefox blocks specific ports by default. And also, that it's possible to unblock those ports by changing some settings in the preferences. Unfortunately, you'll have to dig into the depths of your hard disk, since you can't tweak those specific settings from the about:config panel.

In order to unblock the ports you need to access, you should go to your Firefox installation folder, and from there move to <your-ff-folder>/defaults/pref. Look for a file named user.js, or just create a new text file with that name if it doesn't exist already. Then add the following line:

pref("network.security.ports.banned.override", "<ports>");

where you replace <ports> with the list of all ports you want to unlock, for example:

pref("network.security.ports.banned.override", "42,87,6000");

Save the file, restart your browser, and you're done. You can read more about port blocking (and un-blocking) in Firefox in the link below.

» Mozilla Port Blocking