overture开源项目:https://github.com/shawn1m/overture
overture是一个DNS服务程序,RainDNS也是采用这款程序搭建的,最大的特点就是小巧、快速,支持Linux和Windows环境,且是开源项目放心安全,可以用来搭建企业DNS服务。
overture工作配置流程

下载overture

前往Github下载:

由于我的系统是Centos7 64位的,所以我下载了overture-linux-amd64.zip

释放overture

unzip -d /usr/local/overture overture-linux-amd64.zip

修改config.json

{
  "BindAddress": ":53",
  "PrimaryDNS": [
    {
      "Name": "RainDNS",
      "Address": "119.28.28.28:53",
      "Protocol": "udp",
      "SOCKS5Address": "",
      "Timeout": 6,
      "EDNSClientSubnet": {
        "Policy": "auto",
        "ExternalIP": ""
      }
    }
  ],
  "AlternativeDNS": [
    {
      "Name": "RainPOd",
      "Address": "119.29.29.29:53",
      "Protocol": "udp",
      "SOCKS5Address": "",
      "Timeout": 6,
      "EDNSClientSubnet": {
        "Policy": "auto",
        "ExternalIP": ""
      }
    }
  ],
  "OnlyPrimaryDNS": false,
  "RedirectIPv6Record": false,
  "IPNetworkFile": "./ip_network_sample",
  "DomainFile": "./domain_sample",
  "DomainBase64Decode": true,
  "HostsFile": "./hosts_sample",
  "MinimumTTL": 0,
  "CacheSize" : 0,
  "RejectQtype": [255]
}

【BindAddress】DNS端口,默认为53
【PrimaryDNS】主DNS
其他配置信息可以阅读overture的Github底部

修改防火墙

firewall-cmd --permanent --add-port=53/udp
firewall-cmd --permanent --add-port=53/tcp
firewall-cmd --reload

配置开机启动 vi /etc/systemd/system/overture.service

[Unit]
Description=overture
After=network.target
[Service]
ExecStart=/usr/local/overture/overture-linux-amd64 -c /usr/local/overture/config.json
Restart=on-abort
[Install]
WantedBy=multi-user.target

启动overture

systemctl enable overture
systemctl start overture

好了,DNS服务器已经搭建好了!

Last modification:June 25th, 2020 at 09:16 pm
哪怕您打赏0.1元我也感激不尽!