[ale] lightweight testing for remote services
Chris Fowler
cfowler at outpostsentinel.com
Fri Mar 21 09:18:40 EST 2003
I Know that for TCP, you can do a simple connect() and if it fails you
have a service down. But from M$ world we've learned that in some cases
it is possible for the kernel to accept the conneciton but the service
does not respond.
In perl you can use IO::Socket::INET to do a simple connect test. UDP
is a totallty different story. Many UDP protocols are a form of
communications that do not use a connect() to start the talk. To test
DNS services, you may actually have to build a DNS query and send it.
When you get a response you'll know it is up.
Big Brother can do some of this monitoring for you.
-- connect test --
#!/usr/bin/perl
$sock = new IO:Socket::INET(PeerAddr => $TARGET,
PeerPort => $PORT,
Proto => 'tcp') or
die "Could not create socket $!\n";
---- end --
That could be your simple lightweight connect test.
I've had problems with nmap detecting my natted ports. Not sure why.
On Fri, 2003-03-21 at 09:06, Stephen Leonard wrote:
> Keith Hopkins <hne at hopnet.net> writes:
>
> > Hi folks,
> >
> > Anyone know a lightweight way to test if a service (dns,http,ssh,insert-your-favorite-protocol-here) is being serviced on a remote server?
>
> Mon is a nice (robust) tool for monitoring remote services. It
> may not be lighter than your nmap script, but it provides a nice
> way to test if services are alive (like pulling an index page to
> test http). It also has several other features such as automatic
> paging.
>
> http://www.kernel.org/software/mon
>
> hth,
> stephen
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list