LKBDE11323: Wie man feststellt, ob ein bestimmter Port eines Windows Systems offen ist, im Gebrauch oder horcht ("listening")
Symptom
Für eine Verbindung zu einem bestimmten Windows System soll vorher geklärt sein, ob der Server auf einen bestimmten Port hört
Cause
Fehleranalyse
Solution
Windows kennt einen recht netten Portabfragebefehl: "Portqry" kann einen bestimmten Port mit seinem Status abfragen.
Beispiele:
-----------------
portqry -n lubbysrv -p tcp -e 135
Querying target system called:
lubbysrv
Attempting to resolve name to IP address...
Name resolved to 192.168.123.13
TCP port 135 (epmap service): LISTENING
Querying Endpoint Mapper Database...
Server’s response:
UUID: a4f1db00-ca47-1067-b31f-00dd010662da
Exchange 2003 Server STORE EMSMDB Interface
ncacn_http:192.168.123.6[6001]
-----------------
portqry -n lubbyex1 -e 25
Querying target system called:
lubby1-ex1
Attempting to resolve name to IP address...
Name resolved to 192.168.123.40
TCP port 25 (smtp service): LISTENING
Data returned from port:
220 lubby1-ex1.lubby.test Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959
ready at Mon, 17 Mar 2008 16:03:30 +0100
-----------------
portqry -n TSE01 -e 1494
Querying target system called:
TSE01
Attempting to resolve name to IP address...
Name resolved to 192.168.123.100
TCP port 1494 (unknown service): LISTENING
-----------------
Hier wird gecheckt, ob RDP aktiv ist:
portqry -n DC01 -e 3389
Querying target system called:
DC01
Attempting to resolve name to IP address...
Name resolved to 192.168.123.10
TCP port 3389 (sapgw89 service): LISTENING
------------------------
Und noch ein paar weitere Beispiele:
portqry -n myserver.com -e 25
portqry -n 10.0.0.1 -e 53 -p UDP -i
portqry -n host1.dev.reskit.com -r 21:445
portqry -n 10.0.0.1 -o 25,445,1024 -p both
Disclaimer:
The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!About the Author
Author:
- Keskon GmbH & Co. KGWim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.