Results 1 to 10 of 12
Hi Everyone,
This is going to be an easy one! (hopefully)
With my Win32 version on netcat (nc.exe) I can do the following...
(No windoze comments please!)
nc -u 192.168.1.255 ...
- 11-30-2007 #1Just Joined!
- Join Date
- Nov 2007
- Posts
- 17
netcat - UDP Broadcast
Hi Everyone,
This is going to be an easy one! (hopefully)
With my Win32 version on netcat (nc.exe) I can do the following...
(No windoze comments please!)
nc -u 192.168.1.255 9999
This broadcasts any data over my LAN on UDP 9999.
I can't manage to achieve the same effect from my Centos (or other) boxes.
It does nothing and returns me to prompt.
Can anyone show me how stupid i'm being please?
Thanks,
E
- 11-30-2007 #2
- 12-03-2007 #3Just Joined!
- Join Date
- Nov 2007
- Posts
- 17
I know it does nothing because I'm already monitoring with a packet sniffer.
So thanks.
I have not read the man page (I will do so now).
However, If the functionality is not supported, I would still like a solution.
Am I right in thinking you don't know another way of sending data to a broadcast address?
Can anyone suggest an alternative/fixed method?
- 12-03-2007 #4
- 12-04-2007 #5
Weird - this isn't working as I'd expected. nc returns to the command line immediately on my CentOS box; probably the same behavior you're seeing. No error, no explanation (but a non-zero return code).
I tried a few different udp ping combinations using nmap, and that doesn't appear to be the right tool for the job either.Code:[root@fugu ~]# nc -u 10.0.0.255 9999 [root@fugu ~]# echo $? 1
I haven't had a need to arbitrarily send udp packets to a broadcast address before, so I'm not sure what else to recommend.
- 12-04-2007 #6Just Joined!
- Join Date
- Nov 2007
- Posts
- 17
I also have this problem on a slackware distro.
So I don't think this is a CentOS thing.
Hopefully someone else will pipe up with a reply.
I KNEW YOU DIDN'T HAVE THE ANSWER!
- 12-04-2007 #7
- 12-04-2007 #8Just Joined!
- Join Date
- Nov 2007
- Posts
- 17
Well in that case...
5$ via paypal for the solution! or anyone else for that matter.
I'll leave it with you
- 12-04-2007 #9
FIVE dollars!!! (Isn't that like 3.50 after paypal tax?)
Tempting, but I'll pass on that... generous offer.
Here's my latest stab at it:
Using nmap -- UDP scan, don't bother with ping discovery (which should allow packets to be sent to the broadcast address), port 9999.Code:# nmap -PU -P0 10.0.0.255 -p 9999
Note the tcpdump packets captured:
Ok?Code:fugu# tcpdump port 9999 ... 09:50:09.868410 IP fugu.someplace.45585 > 10.0.0.255.9999:... 09:50:10.868663 IP fugu.someplace.45586 > 10.0.0.255.9999:...
(This nmap scan was run from a FBSD box, but nmap options should be standard across platforms.)
- 12-04-2007 #10Just Joined!
- Join Date
- Nov 2007
- Posts
- 17
Thanks mate.
No quite what I was after though. I don't think nmap is the right tool for the job really.
I need the ability to pipe to the stream POSIX styleeee.
e.g.
nc -u 10.0.0.255 9999 < /dev/random
Thanks for trying. I'll keep looking and post if i find anything.


Reply With Quote
