WWW FAQs: How do I let connections come into my computer's firewall?


2006-01-25: Hopefully, your computer has firewall software to prevent unwanted incoming connections from rogue computers on the Internet. This is great, but if you are hosting a web site at home or hosting a BitTorrent download at home, then you'll need to tell the firewall to let traffic on the appropriate ports come through.

On Windows, with Microsoft Windows Firewall software, follow these instructions. Similar procedures can be followed on MacOS or Linux, or with other firewall programs for Windows. See the documentation for your operating system or software:

1. Start -> Control Panel -> Windows Firewall

2. Make sure the firewall is set to "On," turn it on if not... unless you know exactly what you're doing.

3. Select the "Exceptions" tab.

4. Click "Add Port." The "Add a Port" window appears.

5. Make up an appropriate name for the "Name:" field, such as "web server" or "bittorrent."

6. Enter the port number you want to allow in the "Port number:" field (80 for a typical web server, or 40156 for a bittorrent if you are following my article how can I distribute large files without using too much bandwidth?

7. Select either TCP or UDP as appropriate. If you're not sure, you probably need only TCP (for example, both web servers and bittorrents use only TCP). If you need both, follow these steps a second time to add the port for UDP as well.

8. Click "OK." The "Add a Port" window disappears.

9. Click "OK" again. The "Windows Firewall" window disappears.

Traffic on the desired port is now allowed into the computer.

Microsoft Windows Firewall can also be set up "on the fly" to allow traffic the first time it blocks traffic to a particular program, such as Internet Information Server, Apache or the Azureus BitTorrent program. I prefer to open traffic only on the specific ports I want, so that I know exactly what is going on. This way I don't have to trust programs to "listen" only on the ports I think they are listening on.

Legal Note: yes, you may use sample HTML, Javascript, PHP and other code presented above in your own projects. You may not reproduce large portions of the text of the article without our express permission.

Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!