in reply to UDP port scan?
You're right, UDP scanning is inherently unreliable. You could do what nmap does and send a simple empty UDP packet to every port. The host will respond with an ICMP type 3 (Destination unreachable) packet if the port is closed. If it doesn't send back an ICMP message, the port is either open or behind a firewall which dropped your UDP packet (in the latter case you can forget about scanning for open ports with this method).
Actually, I'd suggest you look at using nmap for this task (maybe with one of the Nmap modules from CPAN), it has lots of inbuilt probes for specific services which can be used to more reliably detect whether a port is open, and the service version behind it. If you don't you should at least read the manpage, it also explains about ICMP response rate limiting in many operating systems.
|
|---|