Test Port Connectivity Through a Firewall

KB ID 0001541


Test Port Connectivity: I was asked if I had a test Exchange server that someone could test TCP port 587 to this morning. Usually if I need to test a port I simply use Microsoft IIS and then set it to the appropriate port, add a ‘welcome banner’ and telnet to it. This time it didn’t work, so I found a small application that you can use for this very purpose.

How to Test Port Connectivity

Test Port Connectivity with PowerShell

Use the following syntax;

Test-NetConnection {Target-IP} -Port {Port-Number}

Test Port Connectivity with PowerShell

Test Port Connectivity with Telnet and Listen.exe

The application is called listen.exe and is from Allscoop.com Simply run it after a port number and a welcome banner message > Listen.

Listen exe port listener Testing Port

Test it internally first ‘telnet localhost {port-number}‘, on the machine where you are running it, and from another machine on the LAN.

Test port open internally

Then assuming your firewalls are setup correctly you can test it from outside the network.

Test port open extermaly

Each time there’s a successful connection you will see it, and the time stamp.

Show Port Connections

Related Articles, References, Credits, or External Links

Windows – ‘Telnet’ is not recognized as an internal or external command

Mac High Sierra – Telnet and FTP Missing?

Author: PeteLong

Share This Post On


  1. Hi, thanks for sharing, i love your website,

    Post a Reply
  2. I always love your short and nice articles. I always read them.

    Post a Reply

Submit a Comment

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