gardner1 has asked for the wisdom of the Perl Monks concerning the following question:
My question is this:
Can I use Net::Pcap or Net::xxxx?? to lookup subnet info for a "foreign" address.
Usage - I am trying to write a PHP + Perl combination of scripts for a work related web application, that in conjuction with Nagios, can auto discover information about the current subnet, and hopefully (this is the related question) tangential subnet's information related to live hosts.
The application - Well, w/o giving up too much info =) I want to create a front end to setting up Nagios on the fly with as much auto-discovered information about connected hosts, both on the current subnet from the installed base, and if possible info on connected hosts on subnets that are Grokkable beyond the current subnet.
Progress so far - I have written enough code in PHP and perl to be able to lookup live hosts and their port info based upon (my testing front end form) a beginning and an ending IP range. This of course I can do 'as_long_as_I_know' which range of addresses to query, and using that method, of course, I don't really need to know whether or not its the current subnet or not....
But, I am trying to develop this as a support application to be installed on "any" private network, and let the script do the work of "crawling" the current and/or appended networks, obviously up until they are met with squashing/filtering gateways, routers, firewalls etc...
I don't care if I fail on a search of a subnet, I just want to know where the query fails, and what info about that failure it gives back, e.g., what ports "are" open at that dead end...
I am not attempting to grok any info, other than is_alive, or not, in order to map that info into the hosts.cfg, services.cfg, hostgroups.cfg, that would in turn then come back to me (my script's logic) to map that info into the dependencies.cfg, checkcommands.cfg, etc... so that I don't really have to DO any work in order to setup Nagios.
nest pas?
any help appreciated. TIA, El Rico
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Pcap or Net::xxxx?? to lookup subnet info...
by neilh (Pilgrim) on Oct 25, 2004 at 01:39 UTC | |
|
Re: Net::Pcap or Net::xxxx?? to lookup subnet info...
by Steve_p (Priest) on Oct 25, 2004 at 03:14 UTC | |
by gardner1 (Initiate) on Oct 25, 2004 at 04:52 UTC |