05-12-2021 07:00 AM - edited 05-13-2021 05:32 PM
While doing some automation tasks, we noticed the infoblox API is not accessible from cli using curl or other tools. (We are not sure this is the right issue yet; please see scenario below)
$ curl -k -s \ -H 'content-type: application/json' \ -X GET \ --user username:password \ "https://INFOBLOX_IP/wapi/v2.9/record:rpz:a?zone=my-list07&_return_as_object=1&name=exampleurl.org.my-list07"
- API is working from a browser window - we can access WAPI after username/password authentication.
- But the same API is not able to access from another machine using curl (auth is happening but says Forbidden)
- Firewall/route are fine as the API is resonding with Error message after Authentication (Forbidden)
Any idea if there is any whitelisting of source IP to access the API ?
Note: We have tested with another test infoblox machine, and no such issues. So, this is something to do with current production infoblox node (we guess)
Thank you in advance.
05-12-2021 09:26 AM
Can you please post the curl example
Change your password to "password"
05-13-2021 05:33 PM
Thank you for replying.
I missed to add that in hurry, updated the question with `curl` sample.
Thank you in adavnce.
05-13-2021 08:56 PM
At first glance your example looks good. I ran it against my gridmaster and it returns an empty list (which is what I expected).
Can you check if there is an ACL configured on the grid manager, which prevents access from your IP address:
Also check if your account is in a group that doesn't have API permissions:
Or your account doesn't have access to RPZ records, either by not given access, or by denying access:
05-17-2021 05:30 PM
@MRichard, Thank you.
Here see the update:
- We have checked all those items and everything found normal.
- Luckily we noticed some automated proxy settings in system which was causing this issue !!!. So tried with -x "" in curl and it worked.
thank you again for sharing those trubleshooting tips.