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

Please help : How to get all the unused IP's from a subnet

Authority
Posts: 29
4381     0

Hi Everyone,

 

I understand that you can fetch unused IP's from a subnet by API call like:

 

curl -k1 -u testuser -X GET 'https://10.10.100.51/wapi/v1.4/ipv4address?network=10.10.10.0/24&status=UNUSED'

 

 

But if I replace value of status from Unused to used or to an extensible attribute ( status) value like Blocked 

 

In the below code as suggested by you, if i change the status to USED or to an extrensible attribute value as status=blocked, will the api give me used ip address and blocked ip address respectively ??

Re: Please help : How to get all the unused IP's from a subnet

Moderator
Moderator
Posts: 293
4382     0

The status values for an IP address are either "USED" or "UNUSED".   The "USED" status indicates there is an object of some sort associated with the IP address.

 

EAs are stored on objects (such as hosts, fixedaddrs, networks, etc) , not on IP addresses.  When you search for EA values on an IP address ytou get matches for objects associated with that address.

 

It's a ssubtle diffference but important to understand.

 

You can search for IPs where the value of an EA is "blocked".  You would need to know which EA holds the value.  To keep yourself from getting confused, don't call the EA "stauts"!  Call it somehting else instead.  Perhaps "Condition".

 

And you would not need to specify status = USED because the presense of an object on that address implies that the state is USED.

 

curl -k1 -u admin:infoblox -X GET 'https://192.16.1.2/wapi/v2.8/ipv4address' -d 'network=192.168.1.0/24&*Conditon:=BLOCKED' -d '_return_fields%2b=status,extattrs'

 

 

Re: Please help : How to get all the unused IP's from a subnet

Authority
Posts: 29
4382     0

Thanks Richard. That explains a lot.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin