Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API & Integration, DevOps,NetOps,SecOps

Reply

Unable to Access infoblox API from CLI (Curl/Automation)

[ Edited ]
New Member
Posts: 4
3561     0

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)

Superuser
Posts: 115
3561     0

Can you please post the curl example Smiley Happy

 

Change your password to "password"

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

https://sifbaksh.com

Re: Unable to Access infoblox API from CLI (Curl/Automation)

New Member
Posts: 4
3561     0

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)

Moderator
Moderator
Posts: 289
3561     0

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:

 

named-acl.png

 

Also check if your account is in a group that doesn't have API permissions:

 

api-access.png

 

Or your account doesn't have access to RPZ records, either by not given access, or by denying access:

 

rpz-access.png

 

 

Re: Unable to Access infoblox API from CLI (Curl/Automation)

New Member
Posts: 4
3561     0

Thank you so much @MRichard,
Sure, I will check this and update back.

Re: Unable to Access infoblox API from CLI (Curl/Automation)

New Member
Posts: 4
3561     0

@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

Showing results for 
Search instead for 
Did you mean: 

Recommended for You