>On 2012/02/06 00:21, Bryan Steele wrote: >> On Mon, Feb 06, 2012 at 04:47:45AM +0000, Mark Lumsden wrote: >> > There is a CAVEAT section in the man page that should also be >> > amended, I suspect. >> >> Heh, whoops. :) >> >> > Although useless on the initaiting machine, is it of any use to >> > be able to scan a range of UDP ports, for diagnotic reasons, and >> > to see what is received (or not) on the receiving machine? As in, >> > can anything be infered from the opens reaching (or not) >> > the scanned machine? >> >> From what I can tell, no traffic is actually generated on the initaiting >> machine.. nothing in tcpdump anyway. > >Traffic is generated for me, but it's inconsistent, if I try >'nc -z -u somehost 1-65535' sometimes I get 10K ports, sometimes >a few hundred. Haven't seen the full set. >
The source code has a comment in udptest() in netcat.c about this problem. Irrespective, I'd suggest it is a useful combination and probably worth keeping... Index: nc.1 =================================================================== RCS file: /cvs/src/usr.bin/nc/nc.1,v retrieving revision 1.59 diff -u -p -r1.59 nc.1 --- nc.1 4 Oct 2011 08:34:34 -0000 1.59 +++ nc.1 6 Feb 2012 10:45:22 -0000 @@ -449,8 +449,14 @@ Original implementation by *Hobbit* Rewritten with IPv6 support by .An Eric Jackson Aq [email protected] . .Sh CAVEATS -UDP port scans will always succeed -(i.e. report the port as open), -rendering the +UDP port scans will always succeed, +therefore the .Fl uz -combination of flags relatively useless. +combination of flags will always report success irrespective of +the target machines state. +However, +in conjunction with a traffic sniffer either on the target machine +or an intermediary device, +the +.Fl uz +combination could be useful for communications diagnostics.
