Opening a port in Windows VPS can have various reasons, including hosting online games, sharing a specific program, accessing some networks or services that must be used from a specific port, and sharing Specific protocols.
For all these services, opening the Windows VPS port is considered vital and necessary.
First, we will teach you how to open the port step by step with several methods along with the image
If you are using Windows Firewall to open the Windows VPS port, you need to open the Port Number you selected in that firewall. Then the firewall accepts the connection to the port you want.
Note: The firewall can control ingress and egress and only allow inbound ports that you approve.
Different operating systems use different firewalls to manage ports. This is done by the built-in Windows firewall in the case of Windows VPS.
We have 3 ways to do this in the Windows VPS firewall:
Step 1 – First, execute the run with “Windows key + R” keys, type wf.msc and press OK.
Step 2 – Now choose “Inbound Rules” and then click on the “New Rule…“
Step 3 – Select “port” and then click on “Next“.
Step 4 – Write the “Port Number” that you want to be opened and click “Next“.
Step 5 – Choose to “Allow the connection” and then click “Next“.
Step 6 – Choose an available situation and then click “Next“.
Step 7 – Write a custom “name” for the number you want to open and then click “Next“.
Step 8 – Reboot the server to apply the changes.
Step 1- This time, use the Windows key + R and type CMD and press OK.
Step 2- Type this code.
netsh advfirewall firewall add rule name="Port 20875" dir=in action=allow protocol=TCP localport=20875
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 the server to apply the settings changes.
Step 1: execute the run using the (Windows key + R), type PowerShell, and then press OK.
Step 2- you should type this command on Powershell :
New-NetFirewallRule -DisplayName "Port 6985" -Direction inbound -LocalPort 6985 -Protocol TCP -Action Allow
Step 3- 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.
Finally, according to the above methods, you can open the new port. Configure the firewall to control ingress. Be sure to make the settings and changes in such a way that it has the necessary security when using the VPS remotely. Port security includes (opening necessary ports, updating software, monitoring and management, using encrypted protocols, recording events, and finally using a firewall).
After opening a new port, you need an IP address to host. If you want to find the IP address of your server, use this article: How to find VPS IP Address in Windows Server?
We hope this article is useful for you.