本地自用dns服务搭建配置 Coredns 配置

略去下载过程
产品官网
https://coredns.io/

自用配置

(s) {
    errors
    cache
    log
    forward . 114.114.114.114 233.5.5.5 8.8.8.8 {
    policy sequential
    }

}
baidubce.com:53 {
  import s
}


.:53 {
    errors
    cache
    hosts {
    10.0.9.8 dd.example.com
    fallthrough
    }
    forward . 10.88.88.66 10.88.99.88 114.114.114.114 8.8.8.8 {
    policy sequential
    }
}

第一段是配置片段,可以在其他片段中直接引用,
第二段,这里将被公司自建的dns污染的域名指向公网,并引用配置片段
第三段里的hosts 这里可以用hosts文件格式写A记录
然后默认走公司内部的dns

posted @ 2024-06-03 16:23  li66  阅读(1)  评论(0编辑  收藏  举报