Giter Club home page Giter Club logo

hostname-check's Introduction

hostname-check

This script checks RR of a zone which have a QTYPE with an external (out-of-bailiwick) hostname. It will check if these hostnames are resolvable or in the case of QTYPE NS, whether there is mismatch between parent and child zone. Specifically, this scripts supports rdata hostname checks of the QTYPEs NS, CNAME, MX, SRV and DNAME.

The script sends DNS queries to your local resolver but also to authoritative name servers directly (only needed for zone apex NS rrset checks). Zone apex NS rrset checks are skipped if queries to authoritative name servers fail.

Dependencies

If you have installed python you should be able to install dnsypthon with the command pip3:

pip3 install dnspython

Usage

./hostname-check.py OPTIONS [-n address|-i zonefile] -o origin
-o origin     zone origin e.g. switch.ch
-n address    get zone via zone transfer from nameserver ip address
-i zonefile   read zone from file (BIND zone format)

OPTIONS:
-r address    recursive resolver ip address instead of system default
-k keyfile    specify tsig key file for zone transfer access
-x policy     comma seperated list of qtype to check. default if not
              specified: NS,MX,CNAME,SRV,DNAME
-t timeout    DNS query timeout (default 3 sec)
-v            verbose output (debugging)
-h            print this help

Notes:

  • tsig key file expects a BIND key file (See also BIND ARM)
  • The script sends DNS queries to your local resolver but also to authoritative name servers directly

License

Licensed under the term of MIT License.

Alternatives

You might also want to check out the following tools with the same goal:

hostname-check's People

Contributors

stirnim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hostname-check's Issues

Script throws Exception on MacOS

Running the script on a MacOS 10.16 El Capitan immediately throws an Exception before showing the usage help text:

โžœ  hostname-check git:(master) ./hostname-check.py
Traceback (most recent call last):
  File "./hostname-check.py", line 19, in <module>
    import dns.query
ImportError: No module named dns.query

Could you add to the README, what the recommended Environment and/or requirements are to have a base for running that script (well, for non Python experienced ones like me)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.