This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: reply: problem with nc 1.107-4


On Wed, Mar 29, 2017 at 11:28 PM, 高锋 wrote:
> Two days ago,i wanted to determine whether a udp port of another machine is open or not, which is deployed on different subnet.
> But windows platform does not provide utility that can dose this.So i downloaded a setup.exe from cygwin,of which version is 2.877(64 bit),and i had never use this utility before.

I tried this command on Debian 8.7. My conclusion is that this didn't
tell me that the UDP port is listened to by another machine. I used
your exact command, which had similarly uninformative results as
yours. There is no 10.31.x.x machine that I can reach, yet 'nc -u'
allowed me to send text to that address and port. Strace of 'nc -uz'
showed that the special -z option (zero i/o port scan) code "sent
successfully" a single byte to the destination, even though it doesn't
exist.

I conclude that "nc -uz" can't be used to determine unambiguously if a
UDP host is available, because it will succeed even if the host is not
present. And that carries to all systems that use the same 'nc'
utility as Debian or Cygwin.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]