- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Unable to Access infoblox API from CLI (Curl/Automation)
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2021 07:00 AM - edited 05-13-2021 05:32 PM
Hi Team,
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.
Re: Unable to Access infoblox API from CLI (Curl/Automation)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2021 09:26 AM
Can you please post the curl example
Change your password to "password"
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: Unable to Access infoblox API from CLI (Curl/Automation)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2021 05:33 PM
Hi @SBaksh,
Thank you for replying.
I missed to add that in hurry, updated the question with `curl` sample.
Thank you in adavnce.
Re: Unable to Access infoblox API from CLI (Curl/Automation)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
Re: Unable to Access infoblox API from CLI (Curl/Automation)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2021 12:11 AM
Thank you so much @MRichard,
Sure, I will check this and update back.
Re: Unable to Access infoblox API from CLI (Curl/Automation)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
#staysafe