not empty "Allowed hosts" for API method "history.push" behaves strange way

XMLWordPrintable

    • Type: Incident report
    • Resolution: Unresolved
    • Priority: Major
    • None
    • Affects Version/s: 7.0.21
    • Component/s: None
    • None

      https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/zabbix_server/trapper/trapper_history_push.c#294

      Testing scenario:
      On a test Linux box connecting locally to API endpoint, using 127.0.0.1 OR "localhost" OR IP 10.33.0.4 (ETH interface)

      When use 127.0.0.1 for API and also 127.0.0.1 for "Allowed hosts" - it works.

      When use 10.33.0.4 for API and:
      a) 10.33.0.4 for "Allowed hosts" - it fails with:

      "Connection source address is not in item's allowed hosts list."
      

      b) 127.0.0.1 for "Allowed hosts" - it fails with:

      "Client IP is not in item's allowed hosts list."
      

      c) 127.0.0.1,10.33.0.4 for "Allowed hosts" - it works!

      When I use "localhost" for API and "localhost,127.0.0.1,10.33.0.4" for "Allowed hosts" - I could not send data in any way, I always getting errors:

      "Client IP is not in item's allowed hosts list."
      

       

      In the same time, sending data by zabbix_sender (with different -z values) - works fine in all possible scenarios and values combination.

            Assignee:
            Zabbix Development Team
            Reporter:
            Oleksii Zagorskyi
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: