This article will show you how to open ports in your router firewall or Windows firewall. By default, most ports in the firewall are closed to prevent intrusion. Opening the ports can fix the problem with connecting the device to the router and the software to the device, but it will also reduce the security of the system.
Steps
Method 1 of 3: How to Open Router Firewall Ports

Step 1. Find out the IP address of the router
To open the router's settings, you need to know its IP address.
- Windows: Click Start> Settings> Network & Internet> Network Settings, and then find the IP address in the Default Gateway line.
- Mac OS X: Open the Apple menu, click System Preferences> Network> Advanced> TCP / IP, and then look for the IP address in the Router row.

Step 2. Open the router settings
Launch a web browser and enter the IP address of the router in the address bar.

Step 3. Enter your username and password
If you have already changed the settings of the router, enter the selected username and password; otherwise, enter the credentials that can be found in the instructions for the router or on the manufacturer's website.
If you forgot your username and password, reset your router

Step 4. Locate the Port Forwarding section
The modem settings interface depends on the device model. Therefore, look for this section on the following tabs:
- Port Forwarding;
- Applications;
- "Gaming" (Games);
- Virtual Servers;
- Firewall;
- Protected Setup;
- You can also look under the “Advanced Settings” tab.

Step 5. Open the desired port
This process depends on the router model, but in most cases, you will need to enter the following information:
- Name (Name) or Description (Description): Enter the name of the program.
- Type (Type) or Service Type (Service Type): Select "TCP", "UDP" or "TCP / UDP". If you are not sure which type to select, click TCP / UDP or Both.
- Inbound (Input) or Start (Initial): Enter the port number. If you need to open more than one port, enter the first port number.
- Private (Private) or End (End): Enter the same port number. If you need to open more than one port, enter the last port number.

Step 6. Enter the IP address of the computer
Do this on the “Private IP” line or on the “Device IP” line. You can find the IP address on a Windows or Mac OS X computer.

Step 7. Save the settings
Click the Save or Apply button. If prompted, restart the router for the changes to take effect.
You may need to check the “Enabled” or “On” checkbox next to the line with the port number
Method 2 of 3: How to Open Windows Firewall Ports

Step 1. Open the Start Menu

To do this, click on the Windows logo in the lower left corner of the screen.

Step 2. In the Start menu search bar, type Windows Firewall with Advanced Security
The search process for the specified program will start.

Step 3. Click on Windows Firewall with Advanced Security
This program appears at the top of the Start menu.

Step 4. Enter your password if prompted
If you are logged in as a guest, enter the administrator password.

Step 5. Click Inbound Rules
It's in the upper-left side of the window.

Step 6. Click Create Rule
You will see this option on the right side of the window.

Step 7. Check the "For Port" checkbox, and then click Next
This will allow you to select the ports to open.

Step 8. Select the "TCP Protocol" or "UDP Protocol" option
To do this, check the box next to the required option. Unlike most routers, there are two protocols to choose from to create a rule.
Read the documentation for the program to find out which protocol to choose

Step 9. Enter the port range
Check the box next to Specific local ports, and then enter the port numbers you want to open. You can open multiple individual ports by separating them with a comma, or you can enter a port range using a dash between the first and last port numbers.
For example, enter 8830 to open port 8830; enter 8830, 8824 to open port 8830 and port 8824; enter 8830-8835 to open ports 8830 through 8835

Step 10. Click Next
This button is at the bottom of the window.

Step 11. Check the box next to "Allow the connection" and then click Next

Step 12. Check the boxes next to the three options
Domain, Private and Public.

Step 13. Click Next
This button is at the bottom of the window.

Step 14. Enter a name for the rule, and then click Finish
This will save your settings and open the port (s).
Method 3 of 3: How to Allow Programs to Go Online (Mac OS X)

Step 1. Open the Apple menu

To do this, click on the Apple logo in the upper left corner of the screen.
Be aware that the Mac OS X firewall is turned off by default. If you have not enabled the firewall, you do not need to follow the process described

Step 2. Click System Preferences
It's in the Apple drop-down menu.

Step 3. Click on Protection and Security
This house-shaped icon is at the top of the System Preferences window.

Step 4. Click the Firewall tab
It's at the top of the Security & Privacy window.

Step 5. Unlock firewall settings
Click the padlock, enter your administrator password and click Unlock.

Step 6. Click on Firewall Options
It's on the right side of the firewall page.

Step 7. Click on +
You will find this icon below the window in the middle of the page.

Step 8. Select the program that will be allowed to go online
Just click on a program to select it.

Step 9. Click Add
This button is at the bottom of the window. The program will be added to the firewall exceptions list.

Step 10. Make sure that the notification "Allow incoming connections" is displayed next to the name of the program
If there is no such notification to the right of the program name, hold down Control, click on the program name, and then click "Allow Incoming Connections."

Step 11. Click on OK
This will save the settings and allow the program to go online.