Netcat anomaly

Rick Stevens ricks at alldigital.com
Thu Jun 26 21:29:25 UTC 2014


On 06/26/2014 12:36 PM, CLOSE Dave issued this missive:
> Rick Stevens wrote:
>
>> Quite odd. Seems to work on my machine. In one window, I did a
>>
>> nc -lu 29531
>>
>> and in another:
>>
>> echo 'Hello there!' | nc -u localhost 29531
>>
>> and the first window saw the message. Try the same and see if it
>> works.
>
> Yes, that works for me. Further, this works when run from a different
> machine on the same network:
>
> echo "UDP broadcast" \
> | socat - UDP4-DATAGRAM:255.255.255.255:29531,so-broadcast
>
> Examining the packets as they are captured by tcpdump, both the ones NC
> sees and the ones it doesn't, I don't find anything unusual. No checksum
> or length errors, for example. And comparing them to the one generated
> by socat doesn't reveal any obvious significant difference, either.

Uhm, gee. Since another host on the same network gets through, the one
sending packets that NC doesn't get must have something set in the TCP
stack that nc doesn't like. I'd check the flags on the packets that nc
doesn't see. It might be really subtle.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks at alldigital.com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-     Try to look unimportant.  The bad guys may be low on ammo.     -
----------------------------------------------------------------------


More information about the users mailing list