美文网首页
局域网内配置私有的下游dns

局域网内配置私有的下游dns

作者: 雨读千年 | 来源:发表于2022-11-14 10:03 被阅读0次

    常见的dns开源软件有很多,bind,dnsmasq,smartdns等等,本文主要介绍比较容易上手的smartdns。

    安装

    环境是centos7
    从github下载smartdns
    https://github.com/pymumu/smartdns/releases

    image.png
    下载后上传到服务器,然后执行如下命令
     tar zxf smartdns.1.yyyy.MM.dd-REL.x86_64-linux-all.tar.gz
     cd smartdns
     chmod +x ./install
     ./install -i
    

    配置

    1. 配置上游服务器
      默认配置文件 /etc/smartdns/smartdns.conf
      在smartdns.conf文件中配置上游服务器

    上游dns

    server 182.16.188.13
    server 8.8.8.8

    配置想要的域名

    自定义域名

    address /xxx.xxx.com/182.18.4.112
    上述配置含义:xxx.xxx.com 映射到182.18.4.112
    每条映射一行
    每次增加域名后需要重启服务,所以该软件只适用于局域网内部开发测试使用。

    启动命令

    systemctl enable smartdns
    systemctl start smartdns
    systemctl restart smartdns
    

    相关文章

      网友评论

          本文标题:局域网内配置私有的下游dns

          本文链接:https://www.haomeiwen.com/subject/pbcdxdtx.html