OpenBSD Handbook

    Theme
    • Part I. Install & Configure
      • Introduction to OpenBSD
      • Installing OpenBSD
      • The X Window System
      • Networking on OpenBSD
      • System Configuration
      • OpenBSD Basics
      • Managing Software: Packages and Ports
    • Part II. Daily Operations
      • OpenBSD Desktop Environments
      • Multimedia
      • Printing
      • Linux Compatibility
      • Windows Compatibility
      • Games
    • Part III. System Administration
      • Virtualization
      • Storage and File Systems
      • Updating and Upgrading
      • Localization
      • The OpenBSD Boot Process
      • Security
    • Part IV. Networking & Daemons
      • Services
        • Database
          • MariaDB
          • PostgreSQL
          • Redis
          • memcached
        • Directory
          • YP (NIS)
          • LDAP
        • File
          • NFS
          • Samba
        • FTP Services
          • ftpd
          • ProFTPD
          • vsftpd
          • Pure-FTPd
          • TFTP
        • Mail
          • OpenSMTPD Mail Server
          • Dovecot IMAP and POP3 Server
          • Postfix
          • Exim
          • Rspamd
        • Name
          • Unbound DNS Resolver
          • NSD Authoritative DNS Server
          • BIND DNS Server
        • Networking
          • OpenBGPD
          • rad
          • DHCP on OpenBSD
          • slaacd
        • Web
          • Apache HTTP Server
          • nginx Web Server
          • OpenBSD httpd Web Server
          • relayd Reverse Proxy
        • Logging
          • syslogd
        • Monitoring
          • SNMP
        • Remote Access
          • Audit OpenSSH
          • OpenSSH Server
        • File Synchronization
          • rsync
        • Messaging
          • RabbitMQ Message Broker
        • Time
          • NTP Time Synchronization
      • PF
        • pfctl cheat sheet
        • PF Anchors
        • PF Filter Rules
        • PF Forwarding
        • PF Lists and Macros
        • PF Load Balancing
        • PF Logging
        • PF NAT
        • PF Options
        • PF Policies
        • PF Shortcuts
        • PF Tables
      • Advanced Networking
        • High Availability and State Replication
        • Multi-WAN and Policy-Based Routing
        • VPN and Cryptographic Tunneling
        • Classic and Lightweight Tunnels
        • IPv6 at Scale
        • QoS and Traffic Shaping
        • MPLS and Label Distribution
        • Network Services at Scale
        • Virtualization and Host Networking
        • Large-Scale L2 and L3 Design
        • Telemetry, Logging, and Flow Export
        • Hardening and Operational Safety
        • Reference Architectures
        • Troubleshooting Playbooks
      • Serial Communication
    • Part V. Miscellaneous
      • Virtualization Cheat Sheet
      • OpenBSD Cheatsheet
      • How-to Guides
        • Complete the First 30 Minutes After Installation
        • Check Hardware Compatibility Before Installing
        • Bootstrap Wi-Fi Firmware Without Ethernet
        • Set Up OpenBSD as a Laptop or Workstation
        • Configure Laptop Power Management
        • Run OpenBSD as a Virtual Machine Guest
        • Install OpenBSD on a VPS or Cloud Server
        • Install OpenBSD with Full-Disk Encryption
        • Troubleshoot Web Browsers on OpenBSD
        • Create an Administrator Account with doas and SSH Keys
        • Establish a Conservative Security Baseline
        • Manage OpenBSD with Ansible
        • Recover Access and Reset the Root Password
        • Collect OpenBSD Diagnostic Evidence
        • Configure Secure Remote Access with OpenSSH
        • Set Up WordPress on OpenBSD
        • Build Third-Party Software from Ports
        • Use FIDO Security Keys with OpenSSH
        • Build OpenBSD from Source
        • Configure Wi-Fi Roaming and Wired Failover
        • Dual-Boot OpenBSD on a UEFI System
        • Troubleshoot PF, NAT, and Routing
        • Automate OpenBSD Installation with Autoinstall and PXE
        • Route Multiple VLANs with PF
        • Configure a Road-Warrior WireGuard VPN
        • Troubleshoot Package Installation and Update Failures
        • Route IPv6 Networks without NAT
        • Schedule Recurring Maintenance
        • Plan a Docker Workload Migration to OpenBSD
        • Build a Mail Server with OpenSMTPD, Dovecot, and Rspamd
        • Build a Simple Router and Firewall
        • Monitor an OpenBSD System
        • Back Up and Restore an OpenBSD System
        • Configure softraid RAID1
        • Recover an OpenBSD System That Does Not Boot
        • Install Z shell (zsh)
      • OpenBSD for Linux Users
      • OpenBSD for FreeBSD Users
      • OpenBSD for macOS Users
    • OpenBSD FAQ
    • OpenBSD Architectures
      • OpenBSD Package Search

        opendnssec-2.1.14p1-sqlite3

        Package search / Categories / Current snapshot
        โ† Back to search
        OpenBSD branch
        OpenBSD 8.0 releaseCurrent snapshot

        Current snapshot ยท amd64

        open-source turn-key solution for DNSSEC

        Project homepage: https://www.opendnssec.org/

        Description

        OpenDNSSEC was created as an open-source turn-key solution for DNSSEC. It secures zone data just before it is published in an authoritative name server.

        Package information

        Ports path
        security/opendnssec
        Package architecture
        amd64
        Maintainer
        Pavel Korovin <pvk@openbsd.org>
        Categories
        security
        Available flavors
        sqlite3, mysql

        Ports list build and test dependencies as well as runtime dependencies. pkg_add selects those needed for installation.

        Direct dependencies

        Library

        • converters/libiconv
        • net/ldns
        • textproc/libxml
        • databases/sqlite3

        Build

        • devel/cunit

        Test

        • devel/cunit
        • security/softhsm2
        OpenBSD README
        +-----------------------------------------------------------------------
        | Running opendnssec on OpenBSD
        +-----------------------------------------------------------------------
        
        Getting started
        ===============
        This is a summary of steps needed to get OpenDNSSEC up and running in a
        basic state using SoftHSM as the key storage backend.
        
        Initial setup of SoftHSM
        ------------------------
        Install softhsm2 package:
        
            # pkg_add softhsm2
        
        Create /var/opendnssec/softhsm/ directory for token storage, and instruct
        SoftHSM to use this location:
        
            # install -d -o _opendnssec -g _opendnssec -m 700 /var/opendnssec/softhsm/
        
            # sed -i "s#/var/db/softhsm/tokens#/var/opendnssec/softhsm#g" \
                /etc/softhsm2.conf
        
        Choose preferred token storage method, either 'file' (default) or 'db', e.g.:
        
            # sed -i "s#objectstore.backend = file#objectstore.backend = db#g" \
                /etc/softhsm2.conf
        
        Initialize SoftHSM token (here assuming you are using slot 0):
        
            # doas -u _opendnssec softhsm2-util --init-token --slot 0 \
                --label OpenDNSSEC
        
        You will need to enter Security Officer (SO) PIN and user PIN.
        The SO PIN can be used to re-initalize the token. User PIN will be used
        by OpenDNSSEC for accessing SoftHSM.
        
        User PIN and token label must be reflected in appropriate sections
        of /etc/opendnssec/conf.xml:
        
            # grep /etc/opendnssec/conf.xml
                                <PIN>MySecretUserPIN</PIN>
        
            # grep TokenLabel /etc/opendnssec/conf.xml
                                <TokenLabel>OpenDNSSEC</TokenLabel>
        
        Verify OpenDNSSEC has access to SoftHSM token:
        
                # doas -u _opendnssec ods-hsmutil info
                Repository: SoftHSM
        		Module:		/usr/local/lib/softhsm/libsofthsm2.so
        		Slot:		1557156002
        		Token Label:	OpenDNSSEC
        		Manufacturer:	SoftHSM project
        		Model:		SoftHSM v2
        		Serial:		e1a305015cd050a2
        
        Verify token:
        
        	# doas -u _opendnssec softhsm2-util --show-slots
                Available slots:
                Slot 1557156002
                    Slot info:
                        Description:      SoftHSM slot ID 0x5cd050a2
                        Manufacturer ID:  SoftHSM project
                        Hardware version: 2.6
                        Firmware version: 2.6
                        Token present:    yes
                    Token info:
                        Manufacturer ID:  SoftHSM project
                        Model:            SoftHSM v2
                        Hardware version: 2.6
                        Firmware version: 2.6
                        Serial number:    e1a305015cd050a2
                        Initialized:      yes
                        User PIN init.:   yes
                        Label:            OpenDNSSEC
        
        Test SoftHSM:
        
        	# doas -u _opendnssec ods-hsmutil test SoftHSM
        
        Speed-test SoftHSM, if needed:
        
                # doas -u _opendnssec ods-hsmspeed -r SoftHSM -i 1000 -s 2048 -t 1
        
        Bootstrapping OpenDNSSEC
        ------------------------
        
        Check if the configuration is valid:
        
            # doas -u _opendnssec ods-kaspcheck
            INFO: The XML in /etc/opendnssec/conf.xml is valid
            ERROR: SQLite datastore (/var/opendnssec/kasp.db) does not exist
            INFO: The XML in /etc/opendnssec/kasp.xml is valid
            INFO: The XML in /etc/opendnssec/zonelist.xml is valid
        
        Create an initial KASP database (if you are running mysql flavor, first
        you will need to configure mariadb-server and modify <Datastore> in
        /etc/opendnssec/conf.xml):
        
            # doas -u _opendnssec ods-enforcer-db-setup
            *WARNING* This will erase all data in the database; are you sure? [y/N] y
            Database setup successfully.
        
        Start OpenDNSSEC:
        
            # rcctl start opendnssec
        
        Import policy:
        
            # doas -u _opendnssec ods-enforcer policy import
            Created policy default successfully
        
        Check policy:
        
            # doas -u _opendnssec ods-enforcer policy list
            Policy:                         Description:
            default                         ECDSAP256SHA256 NSEC3 KSK1Y ZSK90D
        
        Copy an unsigned zone file into the unsigned/ directory:
        
            # cp <somewhere>/example.com /var/opendnssec/unsigned/
        
        Import zones from zonelist.xml:
        
            # doas -u _opendnssec ods-enforcer zonelist import
            Zone example.com created successfully
        
        Or add the zone from the command line:
        
            # doas -u _opendnssec ods-enforcer zone add --zone example.com
            input is set to /var/opendnssec/unsigned/example.com.
            output is set to /var/opendnssec/signed/example.com.
            Zone example.com added successfully
        
        Check the zone:
        
            # doas -u _opendnssec ods-enforcer zone list
            Zones:
            Zone:                           Policy:       Next change:
            example.com                     default       Fri Nov 16 14:50:25 2018
        
        List the keys:
        
            # doas -u _opendnssec ods-enforcer key list
            Keys:
            Zone:                           Keytype: State:    Date of next transition:
            example.com                     KSK      publish   2018-11-16 14:50:25
            example.com                     ZSK      ready     2018-11-16 14:50:25
        
        After the KSK state transitions to "waiting for ds-seen", export the DS record:
        
            # doas -u _opendnssec ods-enforcer key list
            Keys:
            Zone:
            example.com                     KSK      ready     waiting for ds-seen
            example.com                     ZSK      active    2019-02-14 00:50:25
        
            # doas -u _opendnssec ods-enforcer key export --zone example.com \
                --keystate ready --keytype KSK --ds
            ;ready KSK DS record (SHA256):
            example.com.    600     IN      DS      65331 13 2 <DSKEY>
        
        Before submitting DS record to the parent zone, run:
        
            # doas -u _opendnssec \
                ods-enforcer key ds-submit --zone example.com --keytag 65331
        
        Then submit the DS record to the parent zone.
        
        When DS RR appears in the parent zone, activate the KSK:
        
            # doas -u _opendnssec ods-enforcer key ds-seen --zone example.com --keytag 65331
            1 KSK matches found.
            1 KSKs changed.
            # ods-enforcer key list -v
            Keys:
            Zone:                           Keytype: State:    Date of next transition:
            example.com                     KSK      active    2018-11-17 20:07:31
            example.com                     ZSK      active    2018-11-17 20:07:31
        
        The signed zone will appear in /var/opendnssec/signed/ directory
        or will be transferred to your authoritative DNS server, depending
        on the zone output configuration.
        
        Upgrading from version 1.4.x to 2.x
        -----------------------------------
        OpenDNSSEC enforcer database migration is required if you are upgrading from
        1.4.x to 2.x. Read /usr/local/share/doc/opendnssec/MIGRATION
        for more information.
        
        Database conversion scripts
        ---------------------------
        Note that OpenDNSSEC database conversion scripts are installed in
        /usr/local/sbin and renamed:
            convert_mysql_to_sqlite to ods-convert_mysql_to_sqlite
            convert_sqlite_to_mysql to ods-convert_sqlite_to_mysql
        

        Package guides

        • Installing and updating packages

        Package details as JSON

        Report a bug