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

Search fqdn for regex not working

New Member
Posts: 3
4334     0

Hi,

 

I'm trying to use a regular expression to search the fqdn, but the regular expression doesn't appear to be working.

 

A simple working example:

 

$ curl -n "https://ipam.domain/wapi/v2.11.1/search?fqdn~=test-device&_return_fields=name"                                                
[
    {
        "_ref": "record:host/......",
        "name": "test-device.domain"
    }
]

But, if I use ".est-device" instead of "test-device" (where the leading "." should match any single character, including "t") I get no results:

 

$ curl -n "https://ipam-uat.domain/wapi/v2.11.1/search?fqdn~=.est-device&_return_fields=name" 
[]

 

Why is this simple regular expression fqdn search not working?

Re: Search fqdn for regex not working

Superuser
Posts: 22
4334     0

Hi,

 

I tested this against my lab box which has WAPI version 2.10.5, and it appears to work correctly. Perhaps you could try to re-run the same curl command against your machine, but just change the version from 2.11.1 to 2.10.5 and see if it makes a difference? If it does, then you'd know it's a specific issue with 2.11.x.

 

Also, try use single quotes instead of double quotes around your URL, see if that makes a difference. (It did not make a difference on my system).

 

 

Re: Search fqdn for regex not working

New Member
Posts: 3
4334     0

Hi JKuo,

 

Thanks for your reply. Following your suggestion I tried with 2.10.5, single quotes (and various combinations), but I'm still not getting any results:

 

$ curl -n 'https://ipam-uat.domain/wapi/v2.10.5/search?fqdn~=.est-device&_return_fields=name'
[]

I originally encountered the problem accessing WAPI from python, and then reduced it back to the minimal curl example to which still demonstrates the problem.

 

Re: Search fqdn for regex not working

Superuser
Posts: 22
4335     0

I cannot think of any reason why it wouldn't work... perhaps re-write the single dot in URL encoding (%2E)? I am not showing this behavior on my lab Grid.

Re: Search fqdn for regex not working

New Member
Posts: 3
4335     0

Using %2E didn't work either.

 

Your confirmation that it works on your infoblox server is helpful in that my query is probably correct, and it may be a problem with my infoblox instance.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You