UDP Port Testing
list Jeff Stuart
Does anyone know of a plugin (or a way) to test a UDP port? Yes, I know that may sound strange (IE UDP IS stateless) but I need to be able to basically test if a port responds or not. Or failing that. I seem to remember a long time ago a plugin for BB that used the qstat game server query program to test game servers. Does that ring a bell to anyone? -- Jeff Stuart Network Admin MyInternetServices.com 1-800-300-HOST --
list Henrik Størner
▸
On Thu, Nov 24, 2005 at 12:09:02AM -0500, Jeff Stuart wrote:
Does anyone know of a plugin (or a way) to test a UDP port? Yes, I know that may sound strange (IE UDP IS stateless) but I need to be able to basically test if a port responds or not.
Since there's no handshake in UDP, there is no general way of testing a random UDP port like you can with TCP. What you *can* do is send a packet to the UDP port, and see if you get an ICMP error message back - if you do, then you can safely assume that there is no service running on that port. The problem is that in many cases you just won't get a reply, in which case you cannot tell for sure if there is a service running or not. You can run the nmap port scanner in UDP mode and see what is says, but the only really sure way of testing a UDP port is to talk to the service that is supposed to run there, and see if any sensible response comes back to you. Regards, Henrik
list Figaro Nicolas
You can also try to use hping in an external script. But as Henrik wrote, you can't be sure you'll have an answer if a service/daemon is listening to that UDP port. You can find some infos about hping (with UDP examples) at this URL : http://www.antionline.com/showthread.php?s=&threadid=258387 Nicolas Figaro
▸
-----Message d'origine----- De : Jeff Stuart [mailto:user-968ca3722b80@xymon.invalid] Envoyé : jeudi 24 novembre 2005 06:09 À : Hobbit Monitoring Program Mailing List Objet : [hobbit] UDP Port Testing Does anyone know of a plugin (or a way) to test a UDP port? Yes, I know that may sound strange (IE UDP IS stateless) but I need to be able to basically test if a port responds or not. Or failing that. I seem to remember a long time ago a plugin for BB that used the qstat game server query program to test game servers. Does that ring a bell to anyone? -- Jeff Stuart Network Admin MyInternetServices.com 1-800-300-HOST --
Date: 11/20/2005
list Jeff Stuart
▸
Henrik Stoerner wrote:
On Thu, Nov 24, 2005 at 12:09:02AM -0500, Jeff Stuart wrote:Does anyone know of a plugin (or a way) to test a UDP port? Yes, I know that may sound strange (IE UDP IS stateless) but I need to be able to basically test if a port responds or not.Since there's no handshake in UDP, there is no general way of testing a random UDP port like you can with TCP. What you *can* do is send a packet to the UDP port, and see if you get an ICMP error message back - if you do, then you can safely assume that there is no service running on that port. The problem is that in many cases you just won't get a reply, in which case you cannot tell for sure if there is a service running or not. You can run the nmap port scanner in UDP mode and see what is says, but the only really sure way of testing a UDP port is to talk to the service that is supposed to run there, and see if any sensible response comes back to you. Regards, Henrik
Yeah, thx Henrik.. ;) Kinda what I figured... ahh well... time to write my qstat plugin then. :D -- Jeff Stuart Network Admin MyInternetServices.com 1-800-300-HOST --