If you order a VPS and want to host a game, web or anything that requires open ports then here’s a guide for you!
For Windows OS
- To open ports on Windows you'll need to go to "Advance Defender Firewall with Advanced Security"
- Click “Inbound Rules” then on the right side menu click “New Rule”
- A new window will open, click on the option “Port” then follow the built in guide to open the port
- The Port should now be open once you have completed the above
For Ubuntu OS
- Install UFW: If UFW is not already installed on your system, run the following command to install it:
sudo apt-get install ufw
- Check the status of UFW: Before making any changes, it's a good idea to check the current status of UFW. Run the following command:
sudo ufw status
- Allow incoming connections: To allow incoming connections on a specific port, run the following command, replacing "port_number" with the desired port number (tcp or udp can be added to open that required protocol):
sudo ufw allow port_number/tcp
- Check UFW rules: To view the rules that UFW is currently following, run the following command:
sudo ufw show added
- Enable UFW: Once you have added the necessary rules, you can enable UFW by running the following command:
sudo ufw enable
That's it! You have successfully enabled and opened a port using UFW. Remember to check the UFW status regularly to ensure that it's configured as desired.