How to open port on Windows VPS?

Windows Firewall is a Microsoft program that blocks most programs from communicating with your system to filter harmful programs from external sources and the internet. It also protects your system from unauthorized access attempts when using public networks.

How Can Add the New PortNumber to The Firewall at VPS?

If you are using Windows Firewall, you should now open the PortNumber you have chosen in that firewall. The firewall will then accept the connection to your chosen port.

Different operating systems use different firewalls to manage ports. This is something that is done by the Windows built-in firewall in the case of Windows VPS.

We have 3 ways to do this in the Windows VPS firewall:

    1. Windows Firewall GUI (Graphical User Interface)
    2. CMD (Command Line)
    3. Windows PowerShell

1 – How can use Windows Firewall GUI?

Step 1 – Run CMD

First, execute the run with Windows key + keys, type wf.msc , and press OK.
Run CMD

Step 2 -Add New Rule

Now choose Inbound Rules and then click on the New Rule…

Add New Rule

Step 3 – Rule Type

Select the port and then click on Next.Rule Type

Step 4 – Protocol and Ports

Write the Port Number that you want to be opened and click Next.Protocol and Ports

Step 5 – Set Action

Choose to Allow the connection and then click Next.Set Action

Step 6 – Set Profile

Choose an available situation and then click Next.Set Profile

Step 7 – Set the name of the port

Write a custom name for the number you want to open and then click Next.Set the name of the port

Step 8 – Reboot

Reboot the server to apply the changes.

2 – How can use Windows Firewall CMD?

Step 1 – Open CMD

This time, use the Windows key R and type CMD and press OK.Open CMD

Step 2 – Typing Command

Type this code.

netsh advfirewall firewall add rule name="Port 20875" dir=in action=allow protocol=TCP localport=20875

Typing Command

Note: The name section is your custom name, and the local port section, is the number of the port you want to open.

Step 3 – Reboot

Reboot the server to apply the settings changes.

3 – How can use Windows Firewall Powershell?

Step 1 – Run Powershell of Windows

execute the run using the (Windows key + R), type PowerShell, and then press OK.

Run Powershell of Windows

Step 2 – Write the command

you should type this command on Powershell :

New-NetFirewallRule -DisplayName "Port 6985" -Direction inbound -LocalPort 6985 -Protocol TCP -Action Allow

Write the command

Step 3 – Reboot

Reboot your server to apply changes.

Note: In the DisplayName field, you must write the name of the port you want, and in the -LocalPort field, you must write the number of the port you want to open.

Conclusion

Windows Firewall is silent and protects you from all known threats. It was first introduced in Windows XP and has been improved in each new version, allowing you to access the network and the Internet while protecting your computer or device from the local network or Internet attacks.


author image

The Author Emily.J

Emily started working as a member of the sales team, and because of his strong passion for providing solutions to the problems of users, he has become a successful person in the field of content creation, and so far he has been able to solve many problems. Also, Emily is trying to increase his expertise and experience with serious challenges.

More from Emily.J

Post Your Comment

Your email address will not be published. Required fields are marked *