bind nagios to a fix ip

Andreas Ericsson ae at op5.se
Thu Jul 28 20:19:02 CEST 2005


Darren Dunham wrote:
>>Short answer; No.
>>
>>Long answer; It's possible but extremely cumbersome and the necessary 
>>changes to the plugins requires a substantial amount of C-coding 
>>knowledge as well as a complete insight into how IP networks work.
>>
>>Since the plugins initiate the connection you'd have to make all the 
>>plugins use raw sockets (all of them need to be setsuid for this to 
>>work). That way they can set the outgoing IP by themselves. This is 
>>almost always a very bad idea, since you might end up sending packets 
>>that doesn't have a return route to send the responses through unless 
>>each network has a default route that is interconnected with all the 
>>other gateways (and all the networks know of each other). If you don't 
>>know what I'm talking about, see the short answer above.
> 
> 
> It wouldn't be much easier since you're still talking about modifying
> all the individual plug-ins, but it shouldn't require raw sockets.  I
> would hope that simply having them bind to the requested address rather
> than to INADDR_ANY would do the trick.
> 

Supposing you aren't talking about the web-interface (which is 
blindingly obvious how to configure if you've even opened the apache 
configuration file) you won't have any success without modifying the 
plugins to use raw sockets. bind(2) isn't used by the plugins at all, 
since they initiate the connection rather than wait for one.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list