5 ways to check that a port is open

5 ways to check that a port is open
5 ways to check that a port is open
Anonim

Knowing if a specific port is open or closed on your connection or on a local router can be useful data to know the current permissions and to know which applications are blocked or not. The procedure for checking whether a local port is open or closed varies depending on the operating system you have, but is easily applicable on Windows or Mac.

Steps

Method 1 of 5: Check an external port

Step 1. Go to

This site is able to determine if a port on your computer or on your network is accessible online. Your IP address will be automatically detected and displayed in the “Your IP” box.

There are many sites on the Internet that you can use to check the availability of an open port. Do a search like "open port detection tool" in your favorite search engine if you want to try a different one

Step 2. Enter a port

Type the number of the port whose availability you want to determine (eg 22 for SSH) in the “Port to Check” box.

Step 3. Click Check Port

Whether the port in question is open and available. You will see a confirmation message. Otherwise, you will see an error message in English communicating the following information: “Error: this service was not detected on (your IP address number) for the port (port number)."

Method 2 of 5: Check permissions in Windows Firewall

Step 1. Start Windows search then type firewall

If the search bar is not already displayed, click on the magnifying glass to the right of the start menu to make it appear.

  • Use this method to determine if Windows is set to allow an installed program to access the Internet through the firewall.
  • Windows Firewall is enabled by default. If you have installed third-party firewall software, this is the one you need to run to find out the different permissions granted to the programs.

Step 2. Click Windows Defender Firewall

Your firewall and network protection settings will then be displayed.

Step 3. Click Allow an application through firewall

This is a hypertext link located in the choices on the left of the window. A list of applications allowed by the firewall will appear.

  • If an application is allowed by the firewall only when your connection is private and labeled as such (for example, the network you use at home), the "Private" box will be checked in the column just in front of the program name..
  • If the application is authorized by the firewall when you are on a public network, a check mark will also appear in the “Public” box.

Step 4. Authorize an application that is not displayed

In case you can't find the program in the section Allow apps to communicate through Windows Defender Firewall, click on Modify the parameters at the top right and follow the process described below:

  • click on Authorize another application at the bottom of the window;
  • click on Browse, select the program, then confirm with To open;
  • click on Types of networks at the bottom left to choose a privacy setting then confirm with OK;
  • finish by confirming by clicking on OK at the very bottom of the window.

Method 3 of 5: Check permissions in Mac firewall

Step 1. Click on the menu

Macapple1
and choose them System Preferences.

The firewall is not enabled by default.

Step 2. Click Security & Privacy

It's the house icon in the top row.

Step 3. Click the Firewall tab

It's in the middle of the window, at the top.

  • If you see the message "Firewall: Enabled" at the top of the tab, it means your firewall is active.
  • If your firewall is not activated when you want it to be, click on the padlock icon at the bottom left of the window. Then provide your administrator password, then click Activate the firewall.

Step 4. Access Firewall Options

The settings and a list of applications and services will be displayed. You can see which features allow and disallow incoming connections.

  • Software and services that have a green dot accompanied by the text Allow incoming communications are applications whose port is open.
  • On the contrary, if you see a red dot followed by Block incoming communications, it means that the port is closed.
  • You can change the authorization status of a port by clicking on the double arrow symbol following the application status text and choosing the desired option.

Method 4 of 5: See if a port is open on the router (Windows)

Step 1. Activate Telnet for Windows

You can use Telnet to find out if a particular port is open on your router or on your local access point. Here's how to activate Telnet:

  • type windows features in the search bar. If the search bar is not already displayed, click on the magnifying glass to the right of the start menu to make it appear;
  • click on Enable or disable Windows features;
  • check the box just after Telnet Client then click on OK;
  • click on To close when the program has been installed.

Step 2. Then open a command prompt

Proceed as follows:

  • type cmd in the Windows search bar;
  • click on Command Prompt in search results.

Step 3. Type ipconfig at the prompt and press Enter

This action will display detailed information about the network.

Step 4. Write down the IP address of the router

The address that appears after Default Gateway is the local address of your router.

Step 5. Enter telnet at the prompt then press Enter

The Microsoft Telnet prompt will then start.

Step 6. Enter open (router IP address) (port number)

For example, if you want to know if port 25 is open on your router and your router's IP address is 10.0.0.1, you should write open 10.0.0.1 25.

Step 7. Press Enter

Telnet will attempt to connect to this port.

  • If a message like "Please press Enter" or "Press any key to continue" appears, it means that the indicated port is open.
  • If on the other hand you get a message saying that the connection is impossible, then this port is closed.

Method 5 of 5: See if a port is open on the router (Mac)

Step 1. Open a terminal window

To open a terminal window, start by clicking on the magnifying glass at the top right of the screen to reveal Spotlight. Then type the word terminal, then click on Terminal in search results.

Use this method to find out if a port is open on your local router or on your access point

Step 2. Type netstat -nr | grep default at the prompt and press Enter

The router's IP address will appear after the word "default" at the top of the search results.

Step 3. Type nc -vz (your router's IP address) (port)

For example, if you want to know if port 25 is open on your router and the router IP address is 10.0.0.1, you would write nc -vz 10.0.0.1 25.

Step 4. Press Enter

You will then know the results of this test.

  • If the port is open, you will get a message confirming that the connection was successful.
  • If the port is closed, on the other hand, you will get a message indicating the refusal of the connection or the expiration of the connection attempt.

Popular by topic