【安装笔记-20240607-Linux-在 OpenWrt-23.05 上安装配置域名服务器】

安装笔记-系列文章目录

安装笔记-20240607-Linux-在 OpenWrt-23.05 上安装配置域名服务器



前言

本文记录在 OpenWRT-23.05 上安装配置域名服务器 Bind9 的步骤。

实验使用的电脑如下:

CPU:

Intel Core Processor (Broadwell, no TSX, IBRS)

操作系统:

OpenWrt 23.05.3 r23809-234f1a2efa

一、软件介绍


名称:Bind9


主页

项目主页:https://www.isc.org/bind/


官方介绍

多功能的、经典的、完整的域名服务器软件。

BIND 9已经发展成为一个非常灵活、功能齐全的DNS系统。无论你的应用是什么,BIND 9很可能已经具备了所需的功能。作为第一个、最古老且最常部署的解决方案,已经有比任何其他系统更多的网络工程师熟悉BIND 9。


二、安装步骤

测试版本:bind-9.18.24

在 OpenWrt 主机上

1、安装需要的服务器端软件包

opkg update
opkg install bind-tools
opkg install bind-server

2、安装需要的客户端软件包

opkg update
opkg install bind-client

3、生成动态更新 dns 的密钥

$ /usr/sbin/ddns-confgen -s openwrt.example.org
# To activate this key, place the following in named.conf, and
# in a separate keyfile on the system or systems from which nsupdate
# will be run:
key "ddns-key.openwrt.example.org" {
        algorithm hmac-sha256;
        secret "B1m6Xb1ngrEeNFSExr8homgfzeN8kWIBkJpnoAHF5D8=";
};

# Then, in the "zone" statement for the zone containing the
# name "openwrt.example.org", place an "update-policy" statement
# like this one, adjusted as needed for your preferred permissions:
update-policy {
          grant ddns-key.openwrt.example.org name openwrt.example.org ANY;
};

# After the keyfile has been placed, the following command will
# execute nsupdate using this key:
nsupdate -k <keyfile>

4、编辑 named 的配置文件 /etc/bind/named.conf

key "ddns-key.openwrt.example.org" {
        algorithm hmac-sha256;
        secret "B1m6Xb1ngrEeNFSExr8homgfzeN8kWIBkJpnoAHF5D8=";
};

zone example.com. {
    type master;
    file "/var/lib/bind/db.example.com";
    allow-update { key ddns-key.openwrt.example.org; };
};

在这里插入图片描述


三、应用场景

构建本地域名服务器

网站开发测试环境


四、参考资料

1、DDNS client / bind nsupdate

2、OpenWrt bind

3、Set up your own DDNS Server with bind9 and go


总结

本文介绍了在 Vultr 云主机上运行的 OpenWRT-23.05 上安装配置域名服务器 Bind9 的步骤,并给出了解决所遇问题的方法。

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-06-08 07:34:03       91 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-06-08 07:34:03       97 阅读
  3. 在Django里面运行非项目文件

    2024-06-08 07:34:03       78 阅读
  4. Python语言-面向对象

    2024-06-08 07:34:03       88 阅读

热门阅读

  1. Docker 部署 OCRmyPDF、提取PDF内容

    2024-06-08 07:34:03       30 阅读
  2. gitlab远端指定分支回退到之前的版本

    2024-06-08 07:34:03       29 阅读
  3. 【HarmonyOS】应用屏蔽截屏和录屏

    2024-06-08 07:34:03       33 阅读
  4. Git:版本控制的艺术与GitLab实战指南

    2024-06-08 07:34:03       33 阅读
  5. gitlab中配置全局钩子

    2024-06-08 07:34:03       29 阅读
  6. k8s更改master节点IP

    2024-06-08 07:34:03       24 阅读
  7. Vue3 响应式 API:工具函数(一)

    2024-06-08 07:34:03       27 阅读
  8. 在 VSCode 中搭建 Flutter 开发环境并运行项目

    2024-06-08 07:34:03       25 阅读
  9. flutter文件分类模板之modules

    2024-06-08 07:34:03       28 阅读
  10. Docker 容器中运行Certbot获取和管理 SSL 证书

    2024-06-08 07:34:03       27 阅读
  11. 【leetcode】LRU & LFU

    2024-06-08 07:34:03       29 阅读
  12. 力扣1574.删除最短的子数组使剩余数组有序

    2024-06-08 07:34:03       26 阅读
  13. setattr前端接收方法深度解析

    2024-06-08 07:34:03       28 阅读
  14. VmWare的网络配置说明

    2024-06-08 07:34:03       23 阅读
  15. WPF添加动画过渡效果

    2024-06-08 07:34:03       23 阅读