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

Network Zones

Corporate Head-Quarter:DMZ: Extranet: VendorsWeb: Front-end Sites (a) Web (b) Application (c) DataPublic: Public, satellite VPN…

How to Enable GPUPDATE When Connected via OpenVPN Client

// Explanation: to prevent locking of processes, we set a proxy batch file (on_connect.bat) to…

How to configure Ubiquiti EdgeRouter to send logs to a Syslog Server

Method 1: using text editor # Edit the syslog config sudo vi /etc/rsyslog.d/vyatta-log.conf # Change…
Other project: DragonCoin.com