V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
typcn
V2EX  ›  DNS

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

  •  
  •   typcn · 2015-02-28 22:02:31 +08:00 · 9913 次点击
    这是一个创建于 3343 天前的主题,其中的信息可能已经有所发展或是发生改变。

    修改启动脚本

    由于 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 条回复    2015-02-28 22:36:42 +08:00
    LazyZhu
        1
    LazyZhu  
       2015-02-28 22:22:58 +08:00
    不需要这么麻烦, Openwrt BB dnsmasq 自带参数 "conf-dir=/tmp/dnsmasq.d"
    typcn
        2
    typcn  
    OP
       2015-02-28 22:27:36 +08:00
    @LazyZhu 其他版本都没这个设置,还有一些旧版也没有
    LazyZhu
        3
    LazyZhu  
       2015-02-28 22:36:42 +08:00
    OpenWRT BB 及以后都默认这样设置了,就是方便自定义配置软连接,再说 官方只对BB进行安全更新, BB 以前的有漏洞的, 使用旧版就是对自己不负责.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1013 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 21:59 · PVG 05:59 · LAX 14:59 · JFK 17:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.