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("", "<ports>");

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

pref("", "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