When a program or game requires access to the Internet or another network computer, it must be able to send information over a network port. A firewall protects a computer from unauthorized access and blocks all unnecessary network ports, which prevents a network program from communicating with another computer. Select your computers Windows version from the links below, and follow the steps to allow access to a program through the Windows Firewall.
Opening a port in the Windows 11 Firewall
- Open the Control Panel.
- Under Windows Defender Firewall, click the Allow an app through Windows Firewall link.
- If the Windows Defender Firewall window is displayed, click Allow an app or feature through Windows Defender Firewall link in the left navigation menu to open a window like the picture below.
Administrator privileges are required to modify program access through the Windows Firewall.
- Windows 11
- Windows 8 and 10
- Windows Vista and Windows 7
- Windows XP
If you’re trying to allow access to a multiplayer computer game when the game is run, the Windows Firewall prompts you to allow that program to access the Internet.
- Click the Change settings button to make access changes for programs in the list.
- Check the box for the program you want to grant to access through the Windows Firewall. If you play a network game in your local network, only check the Home/Work (Private) box. If you need the program to have Internet access, check the Public box.
Opening a port in the Windows 8 and Windows 10 Firewall
- Open the Control Panel.
- Click the System and Security option.
- Under Windows Firewall, click Allow a program or feature through Windows Firewall to open a window similar to the picture below.
If you’re trying to allow access to a multiplayer computer game, the Windows Firewall prompts you to allow that program to access the Internet when the game is run.
- Click the Change settings button to make access changes for programs in the list.
- Check the box for the program you want to grant access through the Windows Firewall. If you play a network game in your local network, only check the Home/Work (Private) box. If you need the program to have Internet access, check the Public box.
Opening a port in the Windows Vista and Windows 7 Firewall
- Click Start, type firewall in the Search for Programs and Files box, and click Windows Firewall in the found programs list.
- Click Allow a program or feature through Windows Firewall on the left column to open a window similar to the picture below.
Windows XP users
- Open the Control Panel.
- Click Security Center and then Windows Firewall.
- Click Add Program to add a program you want to add as an exception to the Windows Firewall or Add Port if you know the port number you want to open.
Related information
- How to open or forward a port on a router.
- See the firewall, port, Windows Defender Firewall pages for further information.
- Microsoft Windows help and support.
- Network and network card help and support.