Posted On April 8, 2019

How to Discover Active Ports on a Windows Machine

kimconnect 0 comments
blog.KimConnect.com >> Networking >> How to Discover Active Ports on a Windows Machine
PS C:\Users\kimconnect> get-nettcpsetting | select SettingName,DynamicPortRangeStartPort,DynamicPortRangeNumberOfPorts

SettingName DynamicPortRangeStartPort DynamicPortRangeNumberOfPorts
----------- ------------------------- -----------------------------
Automatic
InternetCustom 49152 16384
DatacenterCustom 49152 16384
Compat 49152 16384
Datacenter 49152 16384
Internet 49152 16384

Step 1: discover inbound ports that are actively used

netstat | findstr -i "ESTABLISHED LISTEN CLOSE_WAIT TIME_WAIT"

Step 2: find all outbound dynamic ports that are expected to be allowed through the firewalls

netsh int ipv4 show dynamicport tcp

Please note that the output of this command does not explicitly provide the named end-port. Thus, we must add the “starting port” number with the “number of ports” to derive at that value. In the example below, 49152 + 16384 = 65536

Leave a Reply

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

Related Post

How To Clear ARP Table in Windows?

Answer: Nothing fancy, just use this simple legacy command: netsh interface ip delete arpcache Done.

How to List All DNS Servers in a Domain

CMD Method: PS C:\Windows\system32> nslookup Default Server: dc02.intranet.kimconnect.com Address: 10.20.10.10 > set type=ns > intranet.kimconnect.com…

Websense Filtering Precedence

1.  Username 2.  Workstation IP 3.  Network Range 4.  User Groups 5.  OU Structure 6. …
Other project: DragonCoin.com