typcn
V2EX  ›  DNS

在装有 Luci 的 OpenWrt 上 配置 dnsmasq-china-list 加速域名解析

  •  
  •   typcn · Feb 28, 2015 · 10591 views
    This topic created in 4166 days ago, the information mentioned may be changed or developed.

    修改启动脚本

    由于 OpenWrt (luci) 的配置文件是自动生成的,要对他的启动脚本进行小 hack
    修改 /etc/init.d/dnsmasq 的 start() 函数,加入

    echo "conf-dir=/etc/dnsmasq.d" >> $CONFIGFILE

    下载和配置

    地址: https://github.com/felixonmars/dnsmasq-china-list

    新建文件夹 /etc/dnsmasq.d

    将 accelerated-domains.china.conf 和 bogus-nxdomain.china.conf 放到 /etc/dnsmasq.d 中

    重启 dnsmasq
    配置完成 试试效果

    Before

    blogpic

    After

    blogpic

    原文: http://blog.eqoe.cn/posts/dnsmasq-china-list-openwrt.html

    3 replies    2015-02-28 22:36:42 +08:00
    LazyZhu
        1
    LazyZhu  
       Feb 28, 2015
    不需要这么麻烦, Openwrt BB dnsmasq 自带参数 "conf-dir=/tmp/dnsmasq.d"
    typcn
        2
    typcn  
    OP
       Feb 28, 2015
    @LazyZhu 其他版本都没这个设置,还有一些旧版也没有
    LazyZhu
        3
    LazyZhu  
       Feb 28, 2015
    OpenWRT BB 及以后都默认这样设置了,就是方便自定义配置软连接,再说 官方只对BB进行安全更新, BB 以前的有漏洞的, 使用旧版就是对自己不负责.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2532 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 15:52 · PVG 23:52 · LAX 08:52 · JFK 11:52
    ♥ Do have faith in what you're doing.