<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24">
<TITLE>RE : [Nagios-users] Wildcards for allowed_hosts in nsca.cfg</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>> Is there a way to use wildcard for allowed_hosts in nsca.cfg? </FONT>
<BR><FONT SIZE=2>> If there was a way to simply allow access from *every* host, </FONT>
<BR><FONT SIZE=2>> I would be happy.</FONT>
</P>

<P><FONT SIZE=2>No, it is not supported.</FONT>
</P>

<P><FONT SIZE=2>Here is an ugly patch to authorize it : In nsca.c, add the following line at the beginning of the is_an_allowed_host() function :</FONT></P>

<P><FONT SIZE=2>if ((allowed_hosts[0]=='*')&&(allowed_hosts[0]=='\0')) return 1;</FONT>
</P>

<P><FONT SIZE=2>Then, you can use '*' to authorize access from everywhere.</FONT>
</P>

<P><FONT SIZE=2>Hope this helps, although not very nice :)</FONT>
</P>

<P><FONT SIZE=2>François</FONT>
</P>

</BODY>
</HTML>