Skip to content
Snippets Groups Projects
user avatar
Hahn Axel (hahn) authored
02617bfc
History

Infoblox Dns Helperscripts

Institute for Medical Education; University of Bern

Source: https://git-repo.iml.unibe.ch/open-source/infoblox-dns-helperscripts

License: GNU GPL 3.0

Requirements

  • Bash
  • curl in $PATH
  • jq in $PATH (optional for coloring json data)

Installation

  • Execute a git pull of the repository url or download and extract the files somewhere in your filesystem
  • copy inc_ib_config.sh.dist to inc_ib_config.sh
  • edit inc_ib_config.sh and enter hsotname of server with API and the credentials to access it

Usage

dns-api.sh

Low level command to access the api

dns-api.sh [METHOD] URL

This script is used by dns-search.sh. Maybe you don't want to execute it directly.

dns-search.sh

Search for aliases and hosts.

./dns-search.sh

Search for hostnames or aliases in Infoblox API
It uses dns-api.sh and adds the return field for aliases.

SYNTAX: dns-search.sh [name|alias] REGEX

EXAMPLES:

(1)
search for a hostname / A record
    dns-search.sh name www.iml.unibe.ch

(2)
search for CNAME - use "alias" as 1st parameter
    dns-search.sh alias www.ufive.ch

(3)
The search supports regex:
    dns-search.sh name ^assets
    dns-search.sh name "^(connector|examinator).*measured.stage"

(4)
Lazy mode: do not add name or alias to start 2 requests to search in name and 
alias fields
    dns-search.sh ufive