How to Allow Ports through a Firewall Windows 7
In the world of computer networks, firewalls are used as a way to protect against intruders. For those who want to allow access from an external network or the internet into their local network, ports need to be opened on the firewall for that traffic. In this article, we will show you how you can open up ports through your firewall in Windows 7.
How to Open a Port in the Windows 7 Firewall
- To open a port on the Windows firewall,
- Click the “Start” button and type “firewall.” Click on “Allow an app or feature through Windows Firewall.”
- Click on “Change Settings.” This will open the Windows Firewall settings page.
- Under Inbound Rules, click on “New Rule” to create a new firewall rule for opening ports. The New Inbound Rule Wizard window will pop up with different configuration options that you can choose from under each category.
- When asked what kind of rule you want to create, click on “Port.” Click next when asked which type of network connection is being used. For this example we are going to port forward from the internet into a local area network so select option three, “Specific Local Ports.”
- In the next window under Specific Local Ports you can configure what ports need to be opened for traffic coming in from the internet into your network. Use the “Port range” drop down menu and select a port number to be opened, such as 27015 for steam gaming ports.
- Click next when you are done configuring which port needs to be open and then click on finish in the last window of this wizard.
- Now that we have created our new port rule, we need to enable it.
- Click on “OK” and then click on the new port rule you created in order to turn that particular firewall rule on. You will now be able to see your new newly opened ports under Inbound Rules as an allowed program with a check mark next to them.
How to Block Port in Windows Firewall
To Block a Port click on “New Rule” under Inbound Rulers.
- Click next when asked which type of network connection is being used. For this example we are going to block traffic through our firewall so select option four, “Programs and Services” from the list of New Inbound Rule Wizard window options that pops up.
- Now click on “Custom.” This will allow you to create a rule to block specific ports through your firewall.
- From here we can Block or Unblock specific ports. If you wanted to block a port type in the name of that particular application and select “Block the connection.” To unblock a program, click on “Allow another app through this firewall” and browse for your Steam client.
- Click next when finished configuring which ports need to be opened through your firewall for a particular program and then click on finish in the last window of this wizard.
- Now that we have created our new rule for blocking programs access through Windows Firewall, we need to enable it. Click on “OK” and Save changes.
How to allow programs to pass through Windows Firewall?
- On the Windows Firewall settings page under Inbound Rules click on “New Rule.”
- Click next when asked which type of network connection is being used. For this example we are going to allow programs through our firewall so select option four, “Programs and Services” from the list of New Inbound Rule Wizard window options that pops up.
- In the next window under Programs and Services click on “Allow another program” so we can choose which application needs to have access through our firewall.
- Click Browse for a Program, then select your Steam gaming service that you want traffic from the internet going into your network to go towards. In this example I will be choosing my steam client. Click on “OK.”
- Now click Next in the next window under Programs and Services so we can configure which port needs to be opened for traffic coming from programs. Use the drop down menu under “Specific local ports” to select a program that is opening up communication with an outside internet domain, then change this rule by changing it from TCP/All Ports to only the port that is used by this specific program, in my case 27015.
- Click next when finished configuring which ports need to be opened through your network’s firewall for a particular program and then click on finish in the last window of this wizard.
- Now that we have created our new rule for allowing programs access through Windows Firewall, we need to enable it. Click on “OK” and Save changes.
Where do I find inbound rules in Windows Firewall?
- Right-click the Start Button and select Control Panel. In the search bar, type “firewall.” Click on Windows Firewall.
- In the left panel of this window under Advanced Settings you will see a menu called Inbound Rules.
- This is where all your firewall rules are located and configured to open up ports for traffic through your network’s firewall into local area networks behind that firewall.
How do I open a port in Windows 7 with CMD?
- Open Command Prompt. Type “netsh advfirewall firewall add rule name=”PortNumber” dir=in action=allow protocol=TCP localport=#”
- Replace PortNumber with the port you want to open, e.g., 27015 and replace # with a specific number for that port (most commonly used is 26000-27050).
- After the program has been added to Windows Firewall, you must enable it. Type “netsh advfirewall firewall set rule name=”PortNumber” new enable=yes”
- Replace PortNumber with the port you want to open again and replace yes with Y or Yes depending on your keyboard layout. You can also use “No” to disable the rule.
You can use this method for any port you want to open on your computer except those reserved by Windows Firewall, which are all ports between 1024-5000. Ports that are already in use will not be allowed through unless it is necessary or if there’s no firewall running at all on the machine.
In this article we have learned how to allow or block programs and ports. By blocking a port you can also block all the traffic coming from that program or service trying to access your network.