how to check connectivity to server by windows tools?
Try portqry , the Microsoft command line port scanner. This will tell you what ports you can connect to from a system
If telnet hostname port
results in a blank screen with a cursor in the top-left corner, you are connected.
No further tools are necessary.
Here is a VBScript TCP Ping solution I came up with using the MSXML2 ServerXMLHTTP control to test tcp connectivity to a port. It should work on most systems without any additional downloads.
address = "www.example.com"
WScript.Echo "http: " & TCPPing( address, 80)
WScript.Echo "ssh: " & TCPPing( address, 22)
WScript.Echo "smb: " & TCPPing( address, 139)
WScript.Echo "https: " & TCPPing( address, 443)
Function TCPPing( address, port )
Set xhr = WScript.CreateObject("MSXML2.ServerXMLHTTP")
xhr.SetTimeouts 8000,8000,8000,8000
On Error Resume Next
xhr.Open "GET", "http://" & address & ":" & port, False
xhr.Send
Select Case Err.Number
' ok, tcp connect but no web response, 401 auth failure
Case 0, -2147012744, -2147024891
msg = "OK"
Case -2147012867
msg = "Connection Rejected"
Case -2147012894
msg = "Timed out"
Case -2147012889
msg = "Could not resolve address"
Case -2147467259
msg = "Cannot test that port with this tool"
Case Else
msg = "Unknown error " & Err.Number
End Select
On Error Goto 0
Set xhr = Nothing
TCPPing = msg
End Function
If you're testing firewalls blocking the port, instead of your custom application run netcat on the server machine on that port in question, then connect to it from the client and netcat will let you see the results. That will tell you if the port is blocked or not and not throw in variables regarding your application's functionality.