bschelst/ January 5, 2017/ PowerShell/ 0 comments

If you want to test a firewall rule, while the application isn’t ready yet, you can start that port on the Windows server using Powershell.
This way you can test the firewall functionality.
Those actions can be done with the following commands:

$Listener = [System.Net.Sockets.TcpListener]4444; $Listener.Start(); 

Where “4444” is the TCP port that you want to open.
Once ready, you need to stop the listener again. You can use the following command for this:

$Listener.Stop(); 

 

Enjoy!

Share this Post

Leave a Comment

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*

four + thirteen =