Git Product home page Git Product logo

generate_dnssec's Introduction

Automate DNSSEC

Scripts to automate DNSSEC management

Recommendation

Execute script

bash auto_dnssec.sh
# or
chmod +x auto_dnssec.sh
./auto_dnssec.sh

If you wish to use sh, it is advisable to check that the symbolic link does not point to dash. Because of the base-10 conversion on the serial, the script cannot be launched with dash.

To check, run this command.

$ readlink -f /bin/sh
/usr/bin/dash

Required

To run the script, you need to define three variables in the script:

  • zone_file: this file is your zone record. It often takes the form db.domain.tld.
  • fichier_dest: this path must correspond to the location of the zone_file file, and will contain the ksk and zsk keys after script execution.
  • domain_zone: This variable corresponds to the name of the zone for which you wish to define DNSSEC. It takes the form domain.tld.

Options

There are 3 options for DNSSEC management:

  • --ksk this option must be run every year on the dns server and will create / recreate the zsk and ksk keys, modify the SOA series, sign the zone and restart bind.
bash auto_dnssec.sh --ksk
  • --zsk this command is run every 3 months and creates the zsk keys, modifies the SOA serial number, signs the zone and restarts bind.
bash auto_dnssec.sh --zsk
  • --sign this option is used after zone records have been modified. It will sign the registration file and restart bind.
bash auto_dnssec.sh --sign

Crontab

This script must be run periodically, and can be launched with a crontab.

For example, to recreate zsk keys every 3 months and ksk keys every year.

crontab -e
0 0 1 */3 * /path/to/script/setup_dnssec.sh --zsk
0 0 * 4 * /path/to/script/setup_dnssec.sh --ksk

You can then check that the crontab has been saved with crontab -l.

To check the logs you can run the command:

cat /var/log/syslog | grep "cron"

generate_dnssec's People

Contributors

onsagerhe avatar

Watchers

 avatar

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.