How to test if a port is open or not on any server?

test if a port is open or not on any server - redserverhost

How to test if a port is open or not on any server?

Here in this tutorial, we will explain to you “How to test if a port is open or not on your server?”

So let us begin this tutorial by watching out this video to learn “How to test if a port is open or not on any server?”

Follow the steps to test if a port is open or not in any server via cPanel:

Step::1 Login to your cPanel and go to the File Manager section

code for testing open ports in any server

Step::2 Go inside public_html and create a new file i.e portopen.php

code for testing open ports in any server

Step::3 Once the file is created, right click over the file and choose the Edit option

code for testing open ports in any server

Step::4 Now copy the code given in the link below and paste it into the newly created PHP file https://pastebin.com/6Q5LXf91

code for testing open ports in any server

(Make sure you replace the host IP address with your actual server IP address and ports which you would like to test)

code for testing open ports in any server

Step::5 Now open your web browser and run this file with the exact path like my domain is cricketfeed.tk and I am going to enter the following URL

cricketfeed.tk/openport.php

Now check the result below

code for testing open ports in any server

Once you hit this file, you will be able to see the list of all ports which are opened and closed

That’s it!! You’re done.

If you enjoyed this tutorial, please consider following us on Facebook and Twitter.

Facebook Page- https://facebook.com/redserverhost
Twitter Page- https://twitter.com/redserverhost

If you have any queries, feel free to let us know via the comments section below.

Scroll to Top