NSClient++ Help (#1) - allowed_hosts wildcard (#733) - Message List

allowed_hosts wildcard

Is it possible to use a wildcard with the allowed_hosts?

10.1.1.* or 10.1.1.0/24

I have several subnets used for management and would like to just specify those networks rather than hosts as the list could potentially be unmaintainably long.

Thanks!

  • Message #2057

    Humm... Not sure I follow... The point of the netmask in the string is to do subnet matching right?

    For instance:

    192.168.0.1/32 is just the one host where as 192.168.0.1/24 is the entire range (192.168.0.0 to 192.168.0.255). And you can go wider as well for instance: 192.168.0.1/0 would be "the entire world" as it spans 0.0.0.0 to 255.255.255.255.

    Michael Medin

    • Message #2065

      Exactly...

      I would like to say allow 3 subnets:

      192.168.1.0/24, 192.168.5.0/25, 192.168.10.0/24

      This would allow:

      192.168.1.0-255 192.168.5.0-255 192.168.10.0-255

      Is this possible? (Does it already allow this and I just haven't figured it out yet?)

      -Zach

      • Message #2066

        Yes... just like that....

        allowed_hosts=192.168.1.0/24,192.168.5.0/25,192.168.10.0/24
        

        Michael Medin

        • Message #2067

          Sorry, I realized this after I looked at the INI. The documentation make it look like it's a host at a time... Is there a limit though?

          I am trying to do:

          192.168.32.0/20

          Which would allow:

          192.168.32.0 - 192.168.47.255

          but it doesn't appear to be working on greater than a /24...

          -Zach

          • Message #2068

            Not in theory, was a reported issue a whil back saying "strange host masks" was not working, thuought I had fixed it though... Do you get "refused" in the log?

            Michael Medin

            • Message #2071

              Yah... I get host denied.. Heh.. Strange hosts masks...

              • Message #2072

                Well, I only really use 24 and 32 myself... well, I'll see if I can look into it, might be broken still..

                Could you give me the exact ip which failes the host mask (and which mask you have) and I shall look intp it...

Subscriptions