找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 84485|回复: 222

【0428更新】【支持OP潘多拉毛子】Dns智能解析、去广告dnsmasq脚本!!!!!稳定发布

 火... [复制链接]
发表于 2016-3-29 10:07 | 显示全部楼层
这个必须支持啊,天天被运营劫持真是烦透了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-2 14:14 | 显示全部楼层
本帖最后由 lukme 于 2016-4-2 14:26 编辑

电信光猫当主路由 192.168.1.1+拨号+DHCP
斐讯K1次级路由模式(老毛子Padavan0326)192.168.2.1+DHCPv4+v6+adbyby
ssh登陆192.168.2.1运行复制的脚本后重启就不能上网了......
后来我先恢复路由器设置(NVRAM)无效>breed恢复出厂+重刷ROM>恢复以前备份的路由器设置(NVRAM)无效>路由器内部存储[脚本文件]恢复出厂 有效...
郁闷,我以为Breed恢复出厂模式+重刷ROM能清空所有东东,所以只有还原路由器内部存储+NVRAM才算完全清除对吧?对吧?

无法联网后第一次重启log



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-2 21:06 | 显示全部楼层
本帖最后由 lukme 于 2016-4-3 10:52 编辑

最近正好在研究本地DNS发现楼主脚本主要实现4个功能:
1:路由充当本地DNS
2:国外域名非标DNS解析
2:国内域名各回各家DNS
3:Hosts去广告
顺便问下没指定 DNS 的 域名 会去哪里解析?感觉上不了网就是因为这个?

个人办法:

1:K1路由DHCP的DNS指定为 路由LAN + 其他DNS




2:自定义设置>脚本>自定义Crontab定时任务配置  添加下列命令:



  1. #每天早上6点01开始更新自定义解析地址( Custom user servers file for dnsmasq)
  2. #01 06 * * * wget -q --no-check-certificate https://c.cn-clouds.com/GL/dnsmasq/openwrt/dnsmasq.servers -O /etc/storage/dnsmasq/dnsmasq.servers --no-check-certificate
  3. #(未下载转换原广告过滤规则,先注释掉)02 06 * * * wget -q --no-check-certificate https://c.cn-clouds.com/GL/dnsmasq/openwrt/dnsmasq.conf -O /etc/storage/dnsmasq/dnsmasq.conf

  4. #每天早上6点05开始更新广告Hosts并重启dnsmasq,为了偷懒我就换了hosts (文件太大可能不适合K1)
  5. #05 06 * * * wget --no-check-certificate <a href="https://raw.githubusercontent.com/sy618/hosts/master/AD" target="_blank">https://raw.githubusercontent.com/sy618/hosts/master/AD</a> -O /etc/storage/dnsmasq/hosts ; killall dnsmasq && /usr/sbin/dnsmasq


复制代码



PS:本人菜鸟
PSS:我错了....sy618的Hosts文件有1M大,放在dnsmasq文件夹后会在路由管理界面不能保存设置,LOG提示文件read bad

PSSS:我在SSH下运行下面的命令成功更新,在路由管理界面也能拉到最后,但是不能保存设置....最后更新到etc/hosts后路由管理界面保存设置成功 。

#wget --no-check-certificate https://raw.githubusercontent.com/sy618/hosts/master/AD -O /etc/storage/dnsmasq/hosts ; killall dnsmasq && /usr/sbin/dnsmasq

更新到 ETC/HOSTS  更新到ETC/hosts下过滤广告失效
过滤广告失效
#wget -q --no-check-certificate https://raw.githubusercontent.com/sy618/hosts/master/AD -O /etc/hosts ; killall dnsmasq && /usr/sbin/dnsmasq

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-4 18:12 | 显示全部楼层
本帖最后由 lukme 于 2016-4-4 18:36 编辑

原来的代码加#号是怕别人运行搞出问题.....

之后实验发现:
etc/stroage/dnsmasq/hosts 文件过大会导致路由管理界面卡顿,保存设置无效
但把1M的hosts文件放到其他地方就不会卡住路由管理页面......所以这是固件BUG?

现在我换了新的广告源,是simple和sy619共同维护的精简型hosts,目前60K(在酷安网adaway应用评论里可以看到两人的声明)
http://coolapk.com/feed/1435953




  1. ##这是手动修改的,这是手动修改的,这是手动修改的,这是手动修改的,这是手动修改的,这是手动修改的,这是手动修改的,这是手动修改的

  2. ####### 需要先在 etc/storage/dnsmasq/ 下创建adblock文件夹
  3. ####### mkdir -p /etc/storage/dnsmasq/adblock
  4. ####### 还要在 内部网络>DHCP>自定义配置文件 "dnsmasq.conf"添加两行参数以支持更新的广告过滤文件
  5. ####### addn-hosts=etc/storage/dnsmasq/adblock/malwaredomainlist.txt
  6. ####### addn-hosts=etc/storage/dnsmasq/adblock/yhosts.txt

  7. ##自定义脚本中添加Crontab定时任务
  8. #每天早上6点04开始更新malwaredomainlist
  9. 04 06 * * * wget --no-check-certificate -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt > /etc/storage/dnsmasq/adblock/malwaredomainlist.txt

  10. #每天早上6点05开始更新广告simple和sy619共同维护的小型hosts并重启dnsmasq
  11. 05 06 * * * wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts.txt > /etc/storage/dnsmasq/adblock/yhosts.txt ; killall dnsmasq && /usr/sbin/dnsmasq
复制代码


PS:firefox下载睿汇云的载数据有时会出现404提示文件不存在.
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-4 18:50 | 显示全部楼层
对了,LZ你还要差一个定时更新广告源的脚本。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-5 07:53 | 显示全部楼层
本帖最后由 lukme 于 2016-4-5 08:17 编辑

今天早上6点多执行定时更新时发现多任务重叠,排查后发现执行的脚本是 /etc/storage/cron/crontabs/下的同路由账号名的脚本,

在路由界面多次修改保存定时任务crontabs可能会导致数据溢出而出现重复命令行,最后还是人工校正解决问题,下次更新脚本可考虑重写该文件。

接着发现 dnsmasq.d 文件夹里的规则容错率为0................没找到无错命令前我是不会再用它了。

昨晚睡前在 定时任务crontabs 界面添加的任务
  1. #每天早上6点03开始更新广告easylistchina+malwaredomainlist+vokins_sy619hosts并重启dnsmasq
  2. 03 06 * * * wget --no-check-certificate -qO - https://easylist-downloads.adblockplus.org/easylistchina.txt | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/127\.0\.0\.1:' > /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  3. 04 06 * * * wget --no-check-certificate -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt > /etc/storage/dnsmasq/adblock/malwaredomainlist.conf
  4. 05 06 * * * wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts > /etc/storage/dnsmasq/adblock/yhosts.conf
  5. 06 06 * * * killall dnsmasq && /usr/sbin/dnsmasq
复制代码




早上6点多执行更新任务的LOG:
  1. Apr  5 06:03:00 crond[1066]: USER lckme pid 1271 cmd wget --no-check-certificate -qO - https://easylist-downloads.adblockplus.org/easylistchina.txt | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.1:' > /etc/storage/dnsmasq/adblock/easylistchina.conf
  2. Apr  5 06:03:00 crond[1066]: USER lckme pid 1272 cmd wget --no-check-certificate -qO - https://easylist-downloads.adblockplus.org/easylistchina.txt | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.1:' > /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  3. Apr  5 06:03:00 crond[1066]: USER lckme pid 1273 cmd wget --no-check-certificate -qO - https://easylist-downloads.adblockplus.org/easylistchina.txt | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/127\.0\.0\.1:' > /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  4. Apr  5 06:04:00 crond[1066]: USER lckme pid 1286 cmd wget --no-check-certificate -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt > /etc/storage/dnsmasq/adblock/malwaredomainlist.conf
  5. Apr  5 06:04:00 crond[1066]: USER lckme pid 1287 cmd wget --no-check-certificate -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt > /etc/storage/dnsmasq/adblock/malwaredomainlist.txt
  6. Apr  5 06:04:00 crond[1066]: USER lckme pid 1288 cmd wget --no-check-certificate -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt | awk '{if(/^
  7. Apr  5 06:04:00 crond[1066]: USER lckme pid 1289 cmd wget --no-check-certificate -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt | awk '{if(/^
  8. Apr  5 06:05:00 crond[1066]: USER lckme pid 1292 cmd wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts > /etc/storage/dnsmasq/adblock/yhosts.conf
  9. Apr  5 06:05:00 crond[1066]: USER lckme pid 1293 cmd wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts > /etc/storage/dnsmasq/adblock/yhosts.conf ; killall dnsmasq && /usr/sbin/dnsmasq
  10. Apr  5 06:05:00 crond[1066]: USER lckme pid 1294 cmd wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts > /etc/storage/dnsmasq/adblock/yhosts.txt ; killall dnsmasq && /usr/sbin/dnsmasq
  11. Apr  5 06:05:00 crond[1066]: USER lckme pid 1296 cmd wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts | awk '{if(/^
  12. Apr  5 06:05:00 crond[1066]: USER lckme pid 1297 cmd wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts | awk '{if(/^
  13. Apr  5 06:05:00 crond[1066]: USER lckme pid 1300 cmd wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts | awk '{if(/^
  14. Apr  5 06:05:00 crond[1066]: USER lckme pid 1301 cmd wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts.txt > /etc/storage/dnsmasq/adblock/yhosts.txt ; killall dnsmasq && /usr/sbin/dnsmasq
  15. Apr  5 06:05:02 dnsmasq[1223]: exiting on receipt of SIGTERM
  16. Apr  5 06:05:02 dnsmasq[1309]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  17. Apr  5 06:05:02 dnsmasq[1309]: FAILED to start up
  18. Apr  5 06:05:16 watchdog: dnsmasq is missing, start again!
  19. Apr  5 06:05:16 dnsmasq[1311]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  20. Apr  5 06:05:16 dnsmasq[1311]: FAILED to start up
  21. Apr  5 06:05:36 watchdog: dnsmasq is missing, start again!
  22. Apr  5 06:05:36 dnsmasq[1312]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  23. Apr  5 06:05:36 dnsmasq[1312]: FAILED to start up
  24. Apr  5 06:05:56 watchdog: dnsmasq is missing, start again!
  25. Apr  5 06:05:56 dnsmasq[1313]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  26. Apr  5 06:05:56 dnsmasq[1313]: FAILED to start up
  27. Apr  5 06:06:00 crond[1066]: USER lckme pid 1314 cmd killall dnsmasq && /usr/sbin/dnsmasq
  28. Apr  5 06:06:16 watchdog: dnsmasq is missing, start again!
  29. Apr  5 06:06:16 dnsmasq[1316]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  30. Apr  5 06:06:16 dnsmasq[1316]: FAILED to start up
  31. Apr  5 06:06:36 watchdog: dnsmasq is missing, start again!
  32. Apr  5 06:06:36 dnsmasq[1317]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  33. Apr  5 06:06:36 dnsmasq[1317]: FAILED to start up
  34. Apr  5 06:06:56 watchdog: dnsmasq is missing, start again!
  35. Apr  5 06:06:56 dnsmasq[1318]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  36. Apr  5 06:06:56 dnsmasq[1318]: FAILED to start up
  37. Apr  5 06:07:16 watchdog: dnsmasq is missing, start again!
  38. Apr  5 06:07:16 dnsmasq[1319]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  39. Apr  5 06:07:16 dnsmasq[1319]: FAILED to start up
  40. Apr  5 06:07:36 watchdog: dnsmasq is missing, start again!
  41. Apr  5 06:07:36 dnsmasq[1320]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  42. Apr  5 06:07:36 dnsmasq[1320]: FAILED to start up
  43. Apr  5 06:07:56 watchdog: dnsmasq is missing, start again!
  44. Apr  5 06:07:56 dnsmasq[1321]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  45. Apr  5 06:07:56 dnsmasq[1321]: FAILED to start up
  46. Apr  5 06:08:16 watchdog: dnsmasq is missing, start again!
  47. Apr  5 06:08:16 dnsmasq[1322]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  48. Apr  5 06:08:16 dnsmasq[1322]: FAILED to start up
  49. Apr  5 06:08:36 watchdog: dnsmasq is missing, start again!
  50. Apr  5 06:08:36 dnsmasq[1323]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  51. Apr  5 06:08:36 dnsmasq[1323]: FAILED to start up
  52. Apr  5 06:08:56 watchdog: dnsmasq is missing, start again!
  53. Apr  5 06:08:56 dnsmasq[1324]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  54. Apr  5 06:08:56 dnsmasq[1324]: FAILED to start up
  55. Apr  5 06:09:16 watchdog: dnsmasq is missing, start again!
  56. Apr  5 06:09:16 dnsmasq[1325]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  57. Apr  5 06:09:16 dnsmasq[1325]: FAILED to start up
  58. Apr  5 06:09:36 watchdog: dnsmasq is missing, start again!
  59. Apr  5 06:09:36 dnsmasq[1326]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  60. Apr  5 06:09:36 dnsmasq[1326]: FAILED to start up
  61. Apr  5 06:09:56 watchdog: dnsmasq is missing, start again!
  62. Apr  5 06:09:56 dnsmasq[1327]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  63. Apr  5 06:09:56 dnsmasq[1327]: FAILED to start up
  64. Apr  5 06:10:16 watchdog: dnsmasq is missing, start again!
  65. Apr  5 06:10:16 dnsmasq[1328]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  66. Apr  5 06:10:16 dnsmasq[1328]: FAILED to start up
  67. Apr  5 06:10:36 watchdog: dnsmasq is missing, start again!
  68. Apr  5 06:10:36 dnsmasq[1329]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  69. Apr  5 06:10:36 dnsmasq[1329]: FAILED to start up
  70. Apr  5 06:10:56 watchdog: dnsmasq is missing, start again!
  71. Apr  5 06:10:56 dnsmasq[1330]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  72. Apr  5 06:10:56 dnsmasq[1330]: FAILED to start up
  73. Apr  5 06:11:16 watchdog: dnsmasq is missing, start again!
  74. Apr  5 06:11:16 dnsmasq[1331]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  75. Apr  5 06:11:16 dnsmasq[1331]: FAILED to start up
  76. Apr  5 06:11:36 watchdog: dnsmasq is missing, start again!
  77. Apr  5 06:11:36 dnsmasq[1332]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  78. Apr  5 06:11:36 dnsmasq[1332]: FAILED to start up
  79. Apr  5 06:11:56 watchdog: dnsmasq is missing, start again!
  80. Apr  5 06:11:56 dnsmasq[1333]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  81. Apr  5 06:11:56 dnsmasq[1333]: FAILED to start up
  82. Apr  5 06:12:16 watchdog: dnsmasq is missing, start again!
  83. Apr  5 06:12:16 dnsmasq[1334]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  84. Apr  5 06:12:16 dnsmasq[1334]: FAILED to start up
  85. Apr  5 06:12:36 watchdog: dnsmasq is missing, start again!
  86. Apr  5 06:12:36 dnsmasq[1335]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  87. Apr  5 06:12:36 dnsmasq[1335]: FAILED to start up
  88. Apr  5 06:12:56 watchdog: dnsmasq is missing, start again!
  89. Apr  5 06:12:56 dnsmasq[1336]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  90. Apr  5 06:12:56 dnsmasq[1336]: FAILED to start up
  91. Apr  5 06:13:16 watchdog: dnsmasq is missing, start again!
  92. Apr  5 06:13:16 dnsmasq[1337]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  93. Apr  5 06:13:16 dnsmasq[1337]: FAILED to start up
  94. Apr  5 06:13:36 watchdog: dnsmasq is missing, start again!
  95. Apr  5 06:13:36 dnsmasq[1338]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  96. Apr  5 06:13:36 dnsmasq[1338]: FAILED to start up
  97. Apr  5 06:13:56 watchdog: dnsmasq is missing, start again!
  98. Apr  5 06:13:56 dnsmasq[1339]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  99. Apr  5 06:13:56 dnsmasq[1339]: FAILED to start up
  100. Apr  5 06:14:16 watchdog: dnsmasq is missing, start again!
  101. Apr  5 06:14:16 dnsmasq[1340]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  102. Apr  5 06:14:16 dnsmasq[1340]: FAILED to start up
  103. Apr  5 06:14:36 watchdog: dnsmasq is missing, start again!
  104. Apr  5 06:14:36 dnsmasq[1341]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  105. Apr  5 06:14:36 dnsmasq[1341]: FAILED to start up
  106. Apr  5 06:14:56 watchdog: dnsmasq is missing, start again!
  107. Apr  5 06:14:56 dnsmasq[1342]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  108. Apr  5 06:14:56 dnsmasq[1342]: FAILED to start up
  109. Apr  5 06:15:16 watchdog: dnsmasq is missing, start again!
  110. Apr  5 06:15:16 dnsmasq[1343]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  111. Apr  5 06:15:16 dnsmasq[1343]: FAILED to start up
  112. Apr  5 06:15:36 watchdog: dnsmasq is missing, start again!
  113. Apr  5 06:15:36 dnsmasq[1344]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  114. Apr  5 06:15:36 dnsmasq[1344]: FAILED to start up
  115. Apr  5 06:15:56 watchdog: dnsmasq is missing, start again!
  116. Apr  5 06:15:56 dnsmasq[1345]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  117. Apr  5 06:15:56 dnsmasq[1345]: FAILED to start up
  118. Apr  5 06:16:16 watchdog: dnsmasq is missing, start again!
  119. Apr  5 06:16:16 dnsmasq[1346]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  120. Apr  5 06:16:16 dnsmasq[1346]: FAILED to start up
  121. Apr  5 06:16:36 watchdog: dnsmasq is missing, start again!
  122. Apr  5 06:16:36 dnsmasq[1347]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  123. Apr  5 06:16:36 dnsmasq[1347]: FAILED to start up
  124. Apr  5 06:16:56 watchdog: dnsmasq is missing, start again!
  125. Apr  5 06:16:56 dnsmasq[1348]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  126. Apr  5 06:16:56 dnsmasq[1348]: FAILED to start up
  127. Apr  5 06:17:16 watchdog: dnsmasq is missing, start again!
  128. Apr  5 06:17:16 dnsmasq[1349]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  129. Apr  5 06:17:16 dnsmasq[1349]: FAILED to start up
  130. Apr  5 06:17:36 watchdog: dnsmasq is missing, start again!
  131. Apr  5 06:17:36 dnsmasq[1350]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  132. Apr  5 06:17:36 dnsmasq[1350]: FAILED to start up
  133. Apr  5 06:17:56 watchdog: dnsmasq is missing, start again!
  134. Apr  5 06:17:56 dnsmasq[1351]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  135. Apr  5 06:17:56 dnsmasq[1351]: FAILED to start up
  136. Apr  5 06:18:16 watchdog: dnsmasq is missing, start again!
  137. Apr  5 06:18:16 dnsmasq[1352]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  138. Apr  5 06:18:16 dnsmasq[1352]: FAILED to start up
  139. Apr  5 06:18:36 watchdog: dnsmasq is missing, start again!
  140. Apr  5 06:18:36 dnsmasq[1353]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  141. Apr  5 06:18:36 dnsmasq[1353]: FAILED to start up
  142. Apr  5 06:18:56 watchdog: dnsmasq is missing, start again!
  143. Apr  5 06:18:56 dnsmasq[1354]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  144. Apr  5 06:18:56 dnsmasq[1354]: FAILED to start up
  145. Apr  5 06:19:16 watchdog: dnsmasq is missing, start again!
  146. Apr  5 06:19:16 dnsmasq[1355]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  147. Apr  5 06:19:16 dnsmasq[1355]: FAILED to start up
  148. Apr  5 06:19:36 watchdog: dnsmasq is missing, start again!
  149. Apr  5 06:19:36 dnsmasq[1356]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  150. Apr  5 06:19:36 dnsmasq[1356]: FAILED to start up
  151. Apr  5 06:19:56 watchdog: dnsmasq is missing, start again!
  152. Apr  5 06:19:56 dnsmasq[1357]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  153. Apr  5 06:19:56 dnsmasq[1357]: FAILED to start up
  154. Apr  5 06:20:16 watchdog: dnsmasq is missing, start again!
  155. Apr  5 06:20:16 dnsmasq[1358]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  156. Apr  5 06:20:16 dnsmasq[1358]: FAILED to start up
  157. Apr  5 06:20:36 watchdog: dnsmasq is missing, start again!
  158. Apr  5 06:20:36 dnsmasq[1359]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  159. Apr  5 06:20:36 dnsmasq[1359]: FAILED to start up
  160. Apr  5 06:20:56 watchdog: dnsmasq is missing, start again!
  161. Apr  5 06:20:56 dnsmasq[1360]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  162. Apr  5 06:20:56 dnsmasq[1360]: FAILED to start up
  163. Apr  5 06:21:16 watchdog: dnsmasq is missing, start again!
  164. Apr  5 06:21:16 dnsmasq[1361]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  165. Apr  5 06:21:16 dnsmasq[1361]: FAILED to start up
  166. Apr  5 06:21:36 watchdog: dnsmasq is missing, start again!
  167. Apr  5 06:21:36 dnsmasq[1362]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  168. Apr  5 06:21:36 dnsmasq[1362]: FAILED to start up
  169. Apr  5 06:21:56 watchdog: dnsmasq is missing, start again!
  170. Apr  5 06:21:56 dnsmasq[1363]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  171. Apr  5 06:21:56 dnsmasq[1363]: FAILED to start up
  172. Apr  5 06:22:16 watchdog: dnsmasq is missing, start again!
  173. Apr  5 06:22:16 dnsmasq[1364]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  174. Apr  5 06:22:16 dnsmasq[1364]: FAILED to start up
  175. Apr  5 06:22:36 watchdog: dnsmasq is missing, start again!
  176. Apr  5 06:22:36 dnsmasq[1365]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  177. Apr  5 06:22:36 dnsmasq[1365]: FAILED to start up
  178. Apr  5 06:22:56 watchdog: dnsmasq is missing, start again!
  179. Apr  5 06:22:56 dnsmasq[1366]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  180. Apr  5 06:22:56 dnsmasq[1366]: FAILED to start up
  181. Apr  5 06:23:16 watchdog: dnsmasq is missing, start again!
  182. Apr  5 06:23:16 dnsmasq[1367]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  183. Apr  5 06:23:16 dnsmasq[1367]: FAILED to start up
  184. Apr  5 06:23:36 watchdog: dnsmasq is missing, start again!
  185. Apr  5 06:23:36 dnsmasq[1368]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  186. Apr  5 06:23:36 dnsmasq[1368]: FAILED to start up
  187. Apr  5 06:23:56 watchdog: dnsmasq is missing, start again!
  188. Apr  5 06:23:56 dnsmasq[1369]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  189. Apr  5 06:23:56 dnsmasq[1369]: FAILED to start up
  190. Apr  5 06:24:16 watchdog: dnsmasq is missing, start again!
  191. Apr  5 06:24:16 dnsmasq[1370]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  192. Apr  5 06:24:16 dnsmasq[1370]: FAILED to start up
  193. Apr  5 06:24:36 watchdog: dnsmasq is missing, start again!
  194. Apr  5 06:24:36 dnsmasq[1371]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  195. Apr  5 06:24:36 dnsmasq[1371]: FAILED to start up
  196. Apr  5 06:24:56 watchdog: dnsmasq is missing, start again!
  197. Apr  5 06:24:56 dnsmasq[1372]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  198. Apr  5 06:24:56 dnsmasq[1372]: FAILED to start up
  199. Apr  5 06:25:16 watchdog: dnsmasq is missing, start again!
  200. Apr  5 06:25:16 dnsmasq[1373]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  201. Apr  5 06:25:16 dnsmasq[1373]: FAILED to start up
  202. Apr  5 06:25:36 watchdog: dnsmasq is missing, start again!
  203. Apr  5 06:25:36 dnsmasq[1374]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  204. Apr  5 06:25:36 dnsmasq[1374]: FAILED to start up
  205. Apr  5 06:25:56 watchdog: dnsmasq is missing, start again!
  206. Apr  5 06:25:56 dnsmasq[1375]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  207. Apr  5 06:25:56 dnsmasq[1375]: FAILED to start up
  208. Apr  5 06:26:16 watchdog: dnsmasq is missing, start again!
  209. Apr  5 06:26:16 dnsmasq[1376]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  210. Apr  5 06:26:16 dnsmasq[1376]: FAILED to start up
  211. Apr  5 06:26:36 watchdog: dnsmasq is missing, start again!
  212. Apr  5 06:26:36 dnsmasq[1377]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  213. Apr  5 06:26:36 dnsmasq[1377]: FAILED to start up
  214. Apr  5 06:26:56 watchdog: dnsmasq is missing, start again!
  215. Apr  5 06:26:56 dnsmasq[1378]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  216. Apr  5 06:26:56 dnsmasq[1378]: FAILED to start up
  217. Apr  5 06:27:16 watchdog: dnsmasq is missing, start again!
  218. Apr  5 06:27:16 dnsmasq[1379]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  219. Apr  5 06:27:16 dnsmasq[1379]: FAILED to start up
  220. Apr  5 06:27:36 watchdog: dnsmasq is missing, start again!
  221. Apr  5 06:27:36 dnsmasq[1380]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  222. Apr  5 06:27:36 dnsmasq[1380]: FAILED to start up
  223. Apr  5 06:27:56 watchdog: dnsmasq is missing, start again!
  224. Apr  5 06:27:56 dnsmasq[1381]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  225. Apr  5 06:27:56 dnsmasq[1381]: FAILED to start up
  226. Apr  5 06:28:16 watchdog: dnsmasq is missing, start again!
  227. Apr  5 06:28:16 dnsmasq[1382]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  228. Apr  5 06:28:16 dnsmasq[1382]: FAILED to start up
  229. Apr  5 06:28:36 watchdog: dnsmasq is missing, start again!
  230. Apr  5 06:28:36 dnsmasq[1383]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  231. Apr  5 06:28:36 dnsmasq[1383]: FAILED to start up
  232. Apr  5 06:28:56 watchdog: dnsmasq is missing, start again!
  233. Apr  5 06:28:56 dnsmasq[1384]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  234. Apr  5 06:28:56 dnsmasq[1384]: FAILED to start up
  235. Apr  5 06:29:16 watchdog: dnsmasq is missing, start again!
  236. Apr  5 06:29:16 dnsmasq[1385]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  237. Apr  5 06:29:16 dnsmasq[1385]: FAILED to start up
  238. Apr  5 06:29:36 watchdog: dnsmasq is missing, start again!
  239. Apr  5 06:29:36 dnsmasq[1386]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  240. Apr  5 06:29:36 dnsmasq[1386]: FAILED to start up
  241. Apr  5 06:29:56 watchdog: dnsmasq is missing, start again!
  242. Apr  5 06:29:56 dnsmasq[1387]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  243. Apr  5 06:29:56 dnsmasq[1387]: FAILED to start up
  244. Apr  5 06:30:16 watchdog: dnsmasq is missing, start again!
  245. Apr  5 06:30:16 dnsmasq[1388]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  246. Apr  5 06:30:16 dnsmasq[1388]: FAILED to start up
  247. Apr  5 06:30:36 watchdog: dnsmasq is missing, start again!
  248. Apr  5 06:30:36 dnsmasq[1389]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  249. Apr  5 06:30:36 dnsmasq[1389]: FAILED to start up
  250. Apr  5 06:30:56 watchdog: dnsmasq is missing, start again!
  251. Apr  5 06:30:56 dnsmasq[1390]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  252. Apr  5 06:30:56 dnsmasq[1390]: FAILED to start up
  253. Apr  5 06:31:16 watchdog: dnsmasq is missing, start again!
  254. Apr  5 06:31:16 dnsmasq[1391]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  255. Apr  5 06:31:16 dnsmasq[1391]: FAILED to start up
  256. Apr  5 06:31:36 watchdog: dnsmasq is missing, start again!
  257. Apr  5 06:31:36 dnsmasq[1392]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  258. Apr  5 06:31:36 dnsmasq[1392]: FAILED to start up
  259. Apr  5 06:31:56 watchdog: dnsmasq is missing, start again!
  260. Apr  5 06:31:56 dnsmasq[1393]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  261. Apr  5 06:31:56 dnsmasq[1393]: FAILED to start up
  262. Apr  5 06:32:16 watchdog: dnsmasq is missing, start again!
  263. Apr  5 06:32:16 dnsmasq[1394]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  264. Apr  5 06:32:16 dnsmasq[1394]: FAILED to start up
  265. Apr  5 06:32:36 watchdog: dnsmasq is missing, start again!
  266. Apr  5 06:32:36 dnsmasq[1395]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  267. Apr  5 06:32:36 dnsmasq[1395]: FAILED to start up
  268. Apr  5 06:32:56 watchdog: dnsmasq is missing, start again!
  269. Apr  5 06:32:56 dnsmasq[1396]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  270. Apr  5 06:32:56 dnsmasq[1396]: FAILED to start up
  271. Apr  5 06:33:16 watchdog: dnsmasq is missing, start again!
  272. Apr  5 06:33:16 dnsmasq[1397]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  273. Apr  5 06:33:16 dnsmasq[1397]: FAILED to start up
  274. Apr  5 06:33:36 watchdog: dnsmasq is missing, start again!
  275. Apr  5 06:33:36 dnsmasq[1398]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  276. Apr  5 06:33:36 dnsmasq[1398]: FAILED to start up
  277. Apr  5 06:33:56 watchdog: dnsmasq is missing, start again!
  278. Apr  5 06:33:56 dnsmasq[1399]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  279. Apr  5 06:33:56 dnsmasq[1399]: FAILED to start up
  280. Apr  5 06:34:16 watchdog: dnsmasq is missing, start again!
  281. Apr  5 06:34:16 dnsmasq[1400]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  282. Apr  5 06:34:16 dnsmasq[1400]: FAILED to start up
  283. Apr  5 06:34:36 watchdog: dnsmasq is missing, start again!
  284. Apr  5 06:34:36 dnsmasq[1401]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  285. Apr  5 06:34:36 dnsmasq[1401]: FAILED to start up
  286. Apr  5 06:34:56 watchdog: dnsmasq is missing, start again!
  287. Apr  5 06:34:56 dnsmasq[1402]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  288. Apr  5 06:34:56 dnsmasq[1402]: FAILED to start up
  289. Apr  5 06:35:16 watchdog: dnsmasq is missing, start again!
  290. Apr  5 06:35:16 dnsmasq[1403]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  291. Apr  5 06:35:16 dnsmasq[1403]: FAILED to start up
  292. Apr  5 06:35:36 watchdog: dnsmasq is missing, start again!
  293. Apr  5 06:35:36 dnsmasq[1404]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  294. Apr  5 06:35:36 dnsmasq[1404]: FAILED to start up
  295. Apr  5 06:35:56 watchdog: dnsmasq is missing, start again!
  296. Apr  5 06:35:56 dnsmasq[1405]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  297. Apr  5 06:35:56 dnsmasq[1405]: FAILED to start up
  298. Apr  5 06:36:16 watchdog: dnsmasq is missing, start again!
  299. Apr  5 06:36:16 dnsmasq[1406]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  300. Apr  5 06:36:16 dnsmasq[1406]: FAILED to start up
  301. Apr  5 06:36:36 watchdog: dnsmasq is missing, start again!
  302. Apr  5 06:36:36 dnsmasq[1407]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  303. Apr  5 06:36:36 dnsmasq[1407]: FAILED to start up
  304. Apr  5 06:36:56 watchdog: dnsmasq is missing, start again!
  305. Apr  5 06:36:56 dnsmasq[1408]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  306. Apr  5 06:36:56 dnsmasq[1408]: FAILED to start up
  307. Apr  5 06:37:16 watchdog: dnsmasq is missing, start again!
  308. Apr  5 06:37:16 dnsmasq[1409]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  309. Apr  5 06:37:16 dnsmasq[1409]: FAILED to start up
  310. Apr  5 06:37:36 watchdog: dnsmasq is missing, start again!
  311. Apr  5 06:37:36 dnsmasq[1410]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  312. Apr  5 06:37:36 dnsmasq[1410]: FAILED to start up
  313. Apr  5 06:37:56 watchdog: dnsmasq is missing, start again!
  314. Apr  5 06:37:56 dnsmasq[1411]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  315. Apr  5 06:37:56 dnsmasq[1411]: FAILED to start up
  316. Apr  5 06:38:16 watchdog: dnsmasq is missing, start again!
  317. Apr  5 06:38:16 dnsmasq[1412]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  318. Apr  5 06:38:16 dnsmasq[1412]: FAILED to start up
  319. Apr  5 06:38:36 watchdog: dnsmasq is missing, start again!
  320. Apr  5 06:38:36 dnsmasq[1413]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  321. Apr  5 06:38:36 dnsmasq[1413]: FAILED to start up
  322. Apr  5 06:38:56 watchdog: dnsmasq is missing, start again!
  323. Apr  5 06:38:56 dnsmasq[1414]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  324. Apr  5 06:38:56 dnsmasq[1414]: FAILED to start up
  325. Apr  5 06:39:16 watchdog: dnsmasq is missing, start again!
  326. Apr  5 06:39:16 dnsmasq[1415]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  327. Apr  5 06:39:16 dnsmasq[1415]: FAILED to start up
  328. Apr  5 06:39:36 watchdog: dnsmasq is missing, start again!
  329. Apr  5 06:39:36 dnsmasq[1416]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  330. Apr  5 06:39:36 dnsmasq[1416]: FAILED to start up
  331. Apr  5 06:39:56 watchdog: dnsmasq is missing, start again!
  332. Apr  5 06:39:56 dnsmasq[1417]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  333. Apr  5 06:39:56 dnsmasq[1417]: FAILED to start up
  334. Apr  5 06:40:16 watchdog: dnsmasq is missing, start again!
  335. Apr  5 06:40:16 dnsmasq[1418]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  336. Apr  5 06:40:16 dnsmasq[1418]: FAILED to start up
  337. Apr  5 06:40:36 watchdog: dnsmasq is missing, start again!
  338. Apr  5 06:40:36 dnsmasq[1419]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  339. Apr  5 06:40:36 dnsmasq[1419]: FAILED to start up
  340. Apr  5 06:40:56 watchdog: dnsmasq is missing, start again!
  341. Apr  5 06:40:56 dnsmasq[1420]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  342. Apr  5 06:40:56 dnsmasq[1420]: FAILED to start up
  343. Apr  5 06:41:16 watchdog: dnsmasq is missing, start again!
  344. Apr  5 06:41:16 dnsmasq[1421]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  345. Apr  5 06:41:16 dnsmasq[1421]: FAILED to start up
  346. Apr  5 06:41:36 watchdog: dnsmasq is missing, start again!
  347. Apr  5 06:41:36 dnsmasq[1422]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  348. Apr  5 06:41:36 dnsmasq[1422]: FAILED to start up
  349. Apr  5 06:41:56 watchdog: dnsmasq is missing, start again!
  350. Apr  5 06:41:56 dnsmasq[1423]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  351. Apr  5 06:41:56 dnsmasq[1423]: FAILED to start up
  352. Apr  5 06:42:16 watchdog: dnsmasq is missing, start again!
  353. Apr  5 06:42:16 dnsmasq[1424]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  354. Apr  5 06:42:16 dnsmasq[1424]: FAILED to start up
  355. Apr  5 06:42:36 watchdog: dnsmasq is missing, start again!
  356. Apr  5 06:42:36 dnsmasq[1425]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  357. Apr  5 06:42:36 dnsmasq[1425]: FAILED to start up
  358. Apr  5 06:42:56 watchdog: dnsmasq is missing, start again!
  359. Apr  5 06:42:56 dnsmasq[1426]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  360. Apr  5 06:42:56 dnsmasq[1426]: FAILED to start up
  361. Apr  5 06:43:16 watchdog: dnsmasq is missing, start again!
  362. Apr  5 06:43:16 dnsmasq[1427]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  363. Apr  5 06:43:16 dnsmasq[1427]: FAILED to start up
  364. Apr  5 06:43:36 watchdog: dnsmasq is missing, start again!
  365. Apr  5 06:43:36 dnsmasq[1428]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  366. Apr  5 06:43:36 dnsmasq[1428]: FAILED to start up
  367. Apr  5 06:43:56 watchdog: dnsmasq is missing, start again!
  368. Apr  5 06:43:56 dnsmasq[1429]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  369. Apr  5 06:43:56 dnsmasq[1429]: FAILED to start up
  370. Apr  5 06:44:16 watchdog: dnsmasq is missing, start again!
  371. Apr  5 06:44:16 dnsmasq[1430]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  372. Apr  5 06:44:16 dnsmasq[1430]: FAILED to start up
  373. Apr  5 06:44:36 watchdog: dnsmasq is missing, start again!
  374. Apr  5 06:44:36 dnsmasq[1431]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  375. Apr  5 06:44:36 dnsmasq[1431]: FAILED to start up
  376. Apr  5 06:44:56 watchdog: dnsmasq is missing, start again!
  377. Apr  5 06:44:56 dnsmasq[1432]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  378. Apr  5 06:44:56 dnsmasq[1432]: FAILED to start up
  379. Apr  5 06:45:16 watchdog: dnsmasq is missing, start again!
  380. Apr  5 06:45:16 dnsmasq[1435]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  381. Apr  5 06:45:16 dnsmasq[1435]: FAILED to start up
  382. Apr  5 06:45:20 dropbear[1436]: Child connection from 192.168.2.12:49703
  383. Apr  5 06:45:27 dropbear[1436]: Pubkey auth succeeded for 'XXXXXX' with key md5 XX:XX:51:XX:64:XX:53:XX:72:XX:25:XX:ca:XX:65:XXfrom 192.168.2.12:49703
  384. Apr  5 06:45:36 watchdog: dnsmasq is missing, start again!
  385. Apr  5 06:45:36 dnsmasq[1439]: bad option at line 463 of /etc/storage/dnsmasq/dnsmasq.d/easylistchina.conf
  386. Apr  5 06:45:36 dnsmasq[1439]: FAILED to start up
  387. Apr  5 06:45:56 watchdog: dnsmasq is missing, start again!
  388. Apr  5 06:45:56 dnsmasq[1442]: started, version 2.75 cachesize 512
  389. Apr  5 06:45:56 dnsmasq[1442]: compile time options: IPv6 GNU-getopt no-RTC no-DBus no-i18n no-IDN DHCP DHCPv6 no-scripts no-TFTP no-conntrack ipset no-auth no-DNSSEC no-loop-detect no-inotify
  390. Apr  5 06:45:56 dnsmasq-dhcp[1442]: DHCP, IP range 192.168.2.2 -- 192.168.2.244, lease time 1d
  391. Apr  5 06:45:56 dnsmasq-dhcp[1442]: DHCP, sockets bound exclusively to interface br0
  392. Apr  5 06:45:56 dnsmasq[1442]: read /etc/hosts - 3 addresses
  393. Apr  5 06:45:56 dnsmasq[1442]: bad address at /etc/storage/dnsmasq/adblock/yhosts.conf line 1487
  394. Apr  5 06:45:56 dnsmasq[1442]: read /etc/storage/dnsmasq/adblock/yhosts.conf - 1692 addresses
  395. Apr  5 06:45:56 dnsmasq[1442]: read /etc/storage/dnsmasq/adblock/malwaredomainlist.conf - 1603 addresses
  396. Apr  5 06:45:56 dnsmasq[1442]: read /etc/storage/dnsmasq/hosts - 0 addresses
  397. Apr  5 06:45:56 dnsmasq-dhcp[1442]: read /etc/dnsmasq/dhcp/dhcp-hosts.rc
  398. Apr  5 06:45:56 dnsmasq[1442]: using nameserver 192.168.1.1#53
  399. Apr  5 06:46:05 dropbear[1443]: Child connection from 192.168.2.12:49749
复制代码


PS:顺便推荐个参数,只要是CN域名都会去114.114.114.119解析。
server=/.cn/114.114.114.119

点评

server=/.cn/114.114.114.119 我用的是server=/.cn/119.29.29.29 114太流氓,你去查一下南京信风就知道了,另外多数域名解析都是在dnspod 也就是马化腾家的  发表于 2016-4-5 15:47
1、路由器账号那玩意。。。我没记错的话crontabs 是可以指定root账号运行的,你可以百度一下linux、centos中的写法。 2、dnsmasq的如果规则错误,那么这货就启动不起来,而且我发现貌似pc的hosts对于dnsmasq很容易  详情 回复 发表于 2016-4-5 15:47
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-5 15:35 | 显示全部楼层
注意:
/etc/dnsmasq.conf 文件里 resolv.conf 路径为 /etc/resolv.conf

/etc/storage/dnsmasq/dnsmasq.conf 文件里指定新的 resolv.conf 路径会出现错误并加载数据失败

点评

会可能导致解析失败,发现了,这个版本这些bug都暴露出来叻 我这两天修复一下,在脚本那里已经注明有问题暂时不要下载。谢谢支持(*@ο@*)  发表于 2016-4-5 15:50
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-6 00:56 | 显示全部楼层
本帖最后由 lukme 于 2016-4-6 01:07 编辑
phrnet 发表于 2016-4-5 15:47
1、路由器账号那玩意。。。我没记错的话crontabs 是可以指定root账号运行的,你可以百度一下linux、cento ...

1:easylistchina报错是因为转换格式失败并放在dnsmasq.d目录下(原来只是想尝试一下该目录效果。。。)

2:wget是系统自带的命令,不用输入完整路径也可以使用。

3: 新的广告规则有去注释版,地址如下

有注释版
https://raw.githubusercontent.com/vokins/yhosts/master/hosts.txt

去注释版
https://raw.githubusercontent.com/vokins/yhosts/master/hosts

4:写进路由定时自定义Crontab定时任务配置的脚本会注入到以下两个文件:

/etc/storage/cron/crontabs/同路由账号名文件,自定义Crontab定时任务 优先运行该文件的内容    (路由自定义Crontab定时任务数据修改不够彻底,有出现重复命令的可能。)

/etc/storage/crontabs_script.sh


5:只要不往/etc/storage/dnsmasq/hosts里写入大量规则导则卡住管理页面就行,

6:我现在的规则是/etc/storage/dnsmasq/adblock/simpleu+yhosts+malwaredomainlist,这些规则读取后应该是将正确数据加载到运存里,所以出错也没关系。

放上正在用的设置脚本(借用LZ的一些资源):
  1. #!/bin/sh

  2. ###本脚本需要手动设置  内部网络>DHCP服务器>DNS 服务器 1: 为本路由的LAN网关(比如:192.168.1.1或者192.168.2.1或者192.168.0.1)####
  3. ###本脚本需要手动设置  内部网络>DHCP服务器>DNS 服务器 1: 为本路由的LAN网关(比如:192.168.1.1或者192.168.2.1或者192.168.0.1)####
  4. ###本脚本需要手动设置  内部网络>DHCP服务器>DNS 服务器 1: 为本路由的LAN网关(比如:192.168.1.1或者192.168.2.1或者192.168.0.1)####
  5. ###本脚本需要手动设置  内部网络>DHCP服务器>DNS 服务器 1: 为本路由的LAN网关(比如:192.168.1.1或者192.168.2.1或者192.168.0.1)####

  6. #添加本地DNS解析服务器(127.0.0.1|119.29.29.29|8.8.8.8|114.114.114.114)
  7. wget --no-check-certificate -qO - https://c.cn-clouds.com/GL/openwrt/dnsmasq/resolv.conf  > /etc/resolv.conf
  8. #国内外DNS解析优化
  9. wget --no-check-certificate -qO - https://c.cn-clouds.com/GL/openwrt/dnsmasq/dnsmasq.servers > /etc/storage/dnsmasq/dnsmasq.servers

  10. ##创建adblock文件夹
  11. mkdir -p /etc/storage/dnsmasq/adblock
  12. cat >>/etc/storage/dnsmasq/dnsmasq.conf<<EOF
  13. addn-hosts=/etc/storage/dnsmasq/adblock/malwaredomainlist.conf
  14. addn-hosts=/etc/storage/dnsmasq/adblock/simpleu.conf
  15. addn-hosts=/etc/storage/dnsmasq/adblock/yhosts.conf
  16. EOF

  17. ##更新广告规则easylistchina+malwaredomainlist+vokins_sy619hosts并重启dnsmasq
  18. wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/simpleu/master/hosts > /etc/storage/dnsmasq/adblock/simpleu.conf
  19. wget --no-check-certificate -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt > /etc/storage/dnsmasq/adblock/malwaredomainlist.conf
  20. wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts > /etc/storage/dnsmasq/adblock/yhosts.conf
  21. killall dnsmasq && /usr/sbin/dnsmasq
复制代码


这是更新脚本,需要进入路由管理页面添加进>自定义设置>脚本>自定义Crontab定时任务配置:

添加位置
# 分 时 日 月 周 命令
# 在以上各个字段中,还可以使用以下特殊字符:
# 第一个数字(分钟)不能为*
# 星号(*):代表所有可能的值,例如month字段如果是星号,则表示在满足其它字段的制约条件后每月都执行该命令操作。
# 逗号(,):可以用逗号隔开的值指定一个列表范围,例如,“1,2,5,7,8,9”
# 中杠(-):可以用整数之间的中杠表示一个整数范围,例如“2-6”表示“2,3,4,5,6”
# 正斜线(/):可以用正斜线指定时间的间隔频率,例如“0-23/2”表示每两小时执行一次。同时正斜线可以和星号一起使用,例如*/10,如果用在minute字段,表示每十分钟执行一次。
#删除开头的#启动命令
# 定时运行脚本规则 (删除前面的#即可启动命令)
命令添加位置

  1. #每天早上6点03开始更新广告simpleu+malwaredomainlist+vokins_sy619hosts并重启dnsmasq
  2. 03 06 * * * wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/simpleu/master/hosts > /etc/storage/dnsmasq/adblock/simpleu.conf
  3. 04 06 * * * wget --no-check-certificate -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt > /etc/storage/dnsmasq/adblock/malwaredomainlist.conf
  4. 05 06 * * * wget --no-check-certificate -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts > /etc/storage/dnsmasq/adblock/yhosts.conf
  5. 06 06 * * * killall dnsmasq && /usr/sbin/dnsmasq
复制代码



PS:dnsmasq用来屏蔽广告,再加个chinadns来排除国内干扰就更好了。

点评

脚本的代码前几天我重新优化过了 基本修复了大部分的问题, 也非常感谢你提供的这个资料哇 我平时弄centos比较多比如你说的hosts这些不太了解 另外你说那个新的hosts那个规则,我已经联系他们看看能不能更新的时候  详情 回复 发表于 2016-4-7 16:06
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-6 11:18 | 显示全部楼层
dnsmasq的搭建与配置资料
http://www.cnblogs.com/asnjudy/p/4687193.html

/etc/dnsmasq.conf

resolv-file=/etc/resolv.conf 只能设置一个路径

# 默认dnsmasq会把查询请求发送到它知道的任意一个上游DNS服务器
# resolv.conf 不能设置超过3个上游DNS

# 强制dnsmasq严格以/etc/resolv.conf文件中每个服务的出现顺序尝试查询
strict-order

#添加监听地址
listen-address=127.0.0.1  (单独127.0.0.1表示只监听本机地址)
注意:如果你想让本机所在的局域网的其它电脑也能够使用上Dnsmasq,应该把本机的局域网IP加上去:listen-address=192.168.1.1,127.0.0.1
listen-address=192.168.2.1,127.0.0.1

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-7 17:55 | 显示全部楼层
本帖最后由 lukme 于 2016-4-7 18:09 编辑
phrnet 发表于 2016-4-7 16:06
脚本的代码前几天我重新优化过了 基本修复了大部分的问题,
也非常感谢你提供的这个资料哇  我平时弄cent ...

额,QQ基本不上,万年潜水党~

昨天看了SED命令详解就自己动手把广告更新源的无关东西删了,之后看着路由LOG感觉神清气爽~~

纯过滤广告脚本

  1. #!/bin/sh

  2. # 创建广告规则存放的文件夹
  3. mkdir -p /etc/storage/dnsmasq/adblocks

  4. # 添加广告规则路径
  5. cat >>/etc/storage/dnsmasq/dnsmasq.conf<<EOF
  6. addn-hosts=/etc/storage/dnsmasq/adblock/malwaredomainlist.conf
  7. addn-hosts=/etc/storage/dnsmasq/adblock/simpleu.conf
  8. addn-hosts=/etc/storage/dnsmasq/adblock/yhosts.conf
  9. EOF

  10. # 更新malwaredomainlist(50K)+simpleu(245K)+sy619hosts(48)广告规则并重启dnsmasq (sed为保留127开头>删除规则www.hao123.com或localhost或#)
  11. wget --no-check-certificate -tries=5 -qO - https://raw.githubusercontent.com/vokins/simpleu/master/hosts | sed -n '/127/p' | sed '/www.hao123.com/d' | sed '/localhost/d' | sed '/#/d' > /etc/storage/dnsmasq/adblock/simpleu.conf
  12. wget --no-check-certificate -tries=5 -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt | sed -n '/127/p' | sed '/www.hao123.com/d' | sed '/localhost/d' > /etc/storage/dnsmasq/adblock/malwaredomainlist.conf
  13. wget --no-check-certificate -tries=5 -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts | sed -n '/127/p' | sed '/www.hao123.com/d' | sed '/localhost/d' > /etc/storage/dnsmasq/adblock/yhosts.conf
  14. killall dnsmasq && /usr/sbin/dnsmasq
  15. EOF
复制代码

覆盖内容方式添加广告源定时更新任务,注意备份自定义定时任务

  1. #!/bin/sh
  2. ############# 路由登陆账号不是admin的请修改为你的账号名
  3. ############# 路由登陆账号不是admin的请修改为你的账号名
  4. ##########################VVVVV#####
  5. ##########################VVVVV#####
  6. cat >/etc/storage/cron/crontabs/admin<<EOF
  7. # 删除开头的#启动命令
  8. 25 1 * * * /sbin/ss.sh update & #删除开头的#启动命令
  9. 6 */6 * * * nvram set adbyby_status=0000 && /tmp/sh_func_load_adbyby.sh & #删除开头的#启动命令

  10. # 每天早上6点03开始更新malwaredomainlist(50K)+simpleu(245K)+sy619hosts(50k)广告规则并重启dnsmasq (尝试下载5次)

  11. # sed命令: 保留127开头>删除www.hao123.com或含有localhost或#内容的规则

  12. 03 06 * * * wget --no-check-certificate -tries=5 -qO - https://raw.githubusercontent.com/vokins/simpleu/master/hosts | sed -n '/127/p' | sed '/www.hao123.com/d' | sed '/localhost/d' | sed '/#/d' > /etc/storage/dnsmasq/adblock/simpleu.conf
  13. 04 06 * * * wget --no-check-certificate -tries=5 -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt | sed -n '/127/p' | sed '/www.hao123.com/d' | sed '/localhost/d' > /etc/storage/dnsmasq/adblock/malwaredomainlist.conf
  14. 05 06 * * * wget --no-check-certificate -tries=5 -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts | sed -n '/127/p' | sed '/www.hao123.com/d' | sed '/localhost/d' > /etc/storage/dnsmasq/adblock/yhosts.conf
  15. 06 06 * * * killall dnsmasq && /usr/sbin/dnsmasq
  16. EOF
复制代码






点评

给你一个差不多完成的新版代码给你试试.  详情 回复 发表于 2016-4-8 03:14
感谢 借用你的代码更新到主贴!  详情 回复 发表于 2016-4-8 01:06
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-8 13:24 | 显示全部楼层
phrnet 发表于 2016-4-8 03:14
给你一个差不多完成的新版代码给你试试.

我已经弄好了,再加上家里上网的设备十几台不能随便搞......

上游DNS设置我也找到了,不过修改后搜了一遍居然没找到配置文件......

路由管理外部网络(wan)>互联网设置>互联网DNS设置>取消自动获取就能手动设置上游DNS

点评

这个已经设置DNS 并且截获所有53端口的dns解析,妥妥的 下面随便设置啥dns 都已这个为准  详情 回复 发表于 2016-4-8 14:39
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-8 18:06 | 显示全部楼层
phrnet 发表于 2016-4-8 14:39
这个已经设置DNS 并且截获所有53端口的dns解析,妥妥的 下面随便设置啥dns 都已这个为准

就是这样我才不会用啊,有时候想实验新的DNS结果被劫持到路由去了,这怎么搞?

还是路由广播DNS好,试验DNS只要在本地连接修改就好了。

点评

另外你的hosts 我问了作者要一个路由器用的 https://raw.githubusercontent.com/vokins/yhosts/master/hosts  详情 回复 发表于 2016-4-8 18:29
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-8 20:05 | 显示全部楼层

额,这么说吧,要是某天我出远门结果家里的路由器出现问题了。。。

然后问我怎么办,我说“这个啊,SSH登陆路由运行一些命令就能搞定了,简单吧。”

这么讲的结果是什么?当然是换一个路由器!

点评

主楼已经更新版本,有的使用到了你提供的方法,感谢~  详情 回复 发表于 2016-4-8 23:11
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-21 09:25 | 显示全部楼层
本帖最后由 lukme 于 2016-4-23 00:56 编辑

我又搞了个新脚本,整合并去除重复广告规则,用了几天没出问题~

注意:因为下载的广告规则文件稍大,这类脚本最好只用一个,不然可能会造成内存空间不足的问题。

注意:如果遇到重启路由清空脚本问题,请用 路由管理界面 > 系统管理 > 恢复/导出/上传设置 > 提交现在的NVRAM内容到闪存 和 提交现在的内部存储到闪存 功能。

  1. #!/bin/sh
  2. ###该脚本只需要运行一次###
  3. ###该脚本只需要运行一次###
  4. ###该脚本只需要运行一次###

  5. # 移动到用户命令文件夹
  6. cd /usr/bin/

  7. # 创建广告规则与更新脚本存放的文件夹
  8. mkdir -p /etc/storage/dnsmasq/adblocks

  9. # dnsmasq.conf 添加广告规则路径
  10. cat >> /etc/storage/dnsmasq/dnsmasq.conf <<EOF
  11. addn-hosts=/etc/storage/dnsmasq/adblock/malwaredomainlist.conf
  12. addn-hosts=/etc/storage/dnsmasq/adblock/noad.conf
  13. EOF

  14. # 下载广告缓存(sed命令: 保留127开头>删除含"iqiyi | .jd.com | .taobao.com | 5173.com | www.hao123.com | localhost | # |"内容的规则)
  15. wget --no-check-certificate -tries=5 -qO - https://raw.githubusercontent.com/vokins/simpleu/master/hosts | sed -n '/127/p' | sed '/www.hao123.com/d' | sed '/localhost/d' | sed '/#/d' | sed '/.5173.com/d' | sed '/.taobao.com/d' | sed '/.jd.com/d' | sed '/iqiyi/d' > /etc/storage/dnsmasq/adblock/simpleu
  16. wget --no-check-certificate -tries=5 -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt | sed -n '/127/p' | sed '/localhost/d' > /etc/storage/dnsmasq/adblock/malwaredomainlist.conf
  17. wget --no-check-certificate -tries=5 -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts | sed '/iqiyi/d' > /etc/storage/dnsmasq/adblock/yhosts
  18. # 合并广告规则缓存
  19. cat /etc/storage/dnsmasq/adblock/simpleu /etc/storage/dnsmasq/adblock/yhosts > /etc/storage/dnsmasq/adblock/noad
  20. # 删除下载缓存
  21. rm /etc/storage/dnsmasq/adblock/simpleu
  22. rm /etc/storage/dnsmasq/adblock/yhosts
  23. # 删除重复规则
  24. cd /usr/bin/ | sort /etc/storage/dnsmasq/adblock/noad | uniq > /etc/storage/dnsmasq/adblock/noad.conf
  25. # 删除缓存文件
  26. rm /etc/storage/dnsmasq/adblock/noad
  27. # 重启dnsmasq服务
  28. restart_dhcpd

  29. # 创建广告规则更新脚本
  30. cat > /etc/storage/dnsmasq/adblock/noad_update.sh <<EOF
  31. #!/bin/sh
  32. # 移动到用户命令文件夹
  33. cd /usr/bin/
  34. # 下载广告缓存(sed命令: 保留127开头>删除含"iqiyi | .jd.com | .taobao.com | 5173.com | www.hao123.com | localhost | # |"内容的规则)
  35. wget --no-check-certificate -tries=5 -qO - https://raw.githubusercontent.com/vokins/simpleu/master/hosts | sed -n '/127/p' | sed '/www.hao123.com/d' | sed '/localhost/d' | sed '/#/d' | sed '/.5173.com/d' | sed '/.taobao.com/d' | sed '/.jd.com/d' | sed '/iqiyi/d' > /etc/storage/dnsmasq/adblock/simpleu
  36. wget --no-check-certificate -tries=5 -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt | sed -n '/127/p' | sed '/localhost/d' > /etc/storage/dnsmasq/adblock/malwaredomainlist.conf
  37. wget --no-check-certificate -tries=5 -qO - https://raw.githubusercontent.com/vokins/yhosts/master/hosts | sed '/iqiyi/d' > /etc/storage/dnsmasq/adblock/yhosts
  38. # 合并simpleu与yhosts下载缓存
  39. cat /etc/storage/dnsmasq/adblock/simpleu /etc/storage/dnsmasq/adblock/yhosts > /etc/storage/dnsmasq/adblock/noad
  40. # 删除下载缓存
  41. rm /etc/storage/dnsmasq/adblock/simpleu
  42. rm /etc/storage/dnsmasq/adblock/yhosts
  43. # 删除重复规则
  44. sort /etc/storage/dnsmasq/adblock/noad | uniq > /etc/storage/dnsmasq/adblock/noad.conf
  45. # 删除合并缓存
  46. rm /etc/storage/dnsmasq/adblock/noad
  47. # 重启dnsmasq服务
  48. restart_dhcpd
  49. EOF

  50. # 注入8小时更新任务
  51. http_username=`nvram get http_username`
  52. cat >> /etc/storage/cron/crontabs/$http_username <<EOF
  53. 8 */8 * * * /bin/sh /etc/storage/dnsmasq/adblock/noad_update.sh
  54. EOF

复制代码


我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-4-21 10:00 | 显示全部楼层
本帖最后由 lukme 于 2016-5-11 18:24 编辑

                                                         openwrt与潘多拉类固件的dnsmasq去广告+自动更新脚本

如果有问题还需要你的反馈。

反馈:
路由型号
路由固件
脚本运行记录

广告反馈:
                 QQ群:AD hosts爱好群
                 yhosts项目提交: https://github.com/vokins/yhosts/issues


PS:如果以前运行过类似脚本或命令,最好恢复出厂设置。
PS:因为有的固件携带的wget命令不支持https下载,需要重装wget或者使用http脚本。

20160511   adblock批量替换成adblocks,手残党

20160430   http-50K脚本下载广告规则文件命名错误,已修正。

20160428   修改上游DNS查询方式为并发查询
                   帖子底部更新4合1去广告脚本,可选以下脚本使用:
                   HTTPS——192.168.2.1  (广告规则250K)
                   HTTPS——192.168.1.1  (广告规则250K)

                   HTTP——192.168.2.1    (广告规则60K)
                   HTTP——192.168.1.1    (广告规则60K)

                  

20160426   个人理解出错,需要将潘多拉lan网关IP设为默认DNS才能按规则去广告。
                    添加上游DNS设置
                   设置监听地址为:192.168.1.1和127.0.0.1(lan网关ip不是192.168.1.1请自行编辑脚本内容)

20160423  定时更新脚本搞错了,已修改。

20160422  修改版脚本,命令与路径已确认,帖子底部还有手动还原方法。

使用该脚本需要将dns设置为潘多拉lan网关(如192.168.1.1 ; 192.168.0.1)
http://moper.me/pandorabox-dreambox-openwrt-dhcp-set-dns.html

  1. #!/bin/sh
  2. ###仅限潘多拉与openwrt类固件使用###
  3. ###仅限潘多拉与openwrt类固件使用###

  4. ###请将DNS设置为lan网关###
  5. ###请将DNS设置为lan网关###

  6. ###该脚本只需要运行一次###
  7. ###该脚本只需要运行一次###

  8. # 移动到用户命令文件夹
  9. cd /usr/bin/

  10. # 创建广告规则与更新脚本存放的文件夹
  11. mkdir -p /etc/dnsmasq/adblocks

  12. # dnsmasq.conf 添加广告规则路径
  13. cat >> /etc/dnsmasq.conf <<EOF
  14. # 并发查询所有上游DNS
  15. all-servers
  16. # 按顺序查询上游DNS
  17. # strict-order
  18. # 添加监听地址(将192.168.1.1修改为你的lan网关ip)
  19. listen-address=192.168.1.1,127.0.0.1
  20. # 添加上游DNS服务器
  21. resolv-file=/etc/dnsmasq/resolv.conf
  22. # 添加广告规则路径
  23. addn-hosts=/etc/dnsmasq/adblocks/malwaredomainlist.conf
  24. addn-hosts=/etc/dnsmasq/adblocks/noad.conf
  25. EOF

  26. # 创建上游DNS配置文件
  27. cat > /etc/dnsmasq/resolv.con <<EOF
  28. nameserver 127.0.0.1
  29. nameserver 114.114.114.119
  30. nameserver 223.5.5.5
  31. nameserver 119.29.29.29
  32. EOF

  33. # 下载广告缓存(sed命令: 保留127开头>删除含"iqiyi | .jd.com | .taobao.com | 5173.com | www.hao123.com | localhost | # |"内容的规则)
  34. wget --no-check-certificate -qO - http://raw.githubusercontent.com/vokins/simpleu/master/hosts | sed -n '/127/p' | sed '/www.hao123.com/d' | sed '/localhost/d' | sed '/#/d' | sed '/.5173.com/d' | sed '/.taobao.com/d' | sed '/.jd.com/d' | sed '/iqiyi/d' > /etc/dnsmasq/adblocks/simpleu
  35. wget --no-check-certificate -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt | sed -n '/127/p' | sed '/localhost/d' > /etc/dnsmasq/adblocks/malwaredomainlist.conf
  36. wget --no-check-certificate -qO - http://code.taobao.org/svn/yhosts/hosts | sed '/iqiyi/d' > /etc/dnsmasq/adblocks/yhosts
  37. # 合并广告规则缓存
  38. cat /etc/dnsmasq/adblocks/simpleu /etc/dnsmasq/adblocks/yhosts > /etc/dnsmasq/adblocks/noad
  39. # 删除下载缓存
  40. rm /etc/dnsmasq/adblocks/simpleu
  41. rm /etc/dnsmasq/adblocks/yhosts
  42. # 删除重复规则
  43. sort /etc/dnsmasq/adblocks/noad | uniq > /etc/dnsmasq/adblocks/noad.conf
  44. # 删除缓存文件
  45. rm /etc/dnsmasq/adblocks/noad
  46. # 重启dnsmasq服务
  47. killall dnsmasq
  48. /usr/sbin/dnsmasq

  49. # 创建广告规则更新脚本
  50. cat > /etc/dnsmasq/adblocks/noad_update.sh <<EOF
  51. #!/bin/sh
  52. # 移动到用户命令文件夹
  53. cd /usr/bin/
  54. # 下载广告缓存(sed命令: 保留127开头>删除含"iqiyi | .jd.com | .taobao.com | 5173.com | www.hao123.com | localhost | # |"内容的规则)
  55. wget --no-check-certificate -qO - http://raw.githubusercontent.com/vokins/simpleu/master/hosts | sed -n '/127/p' | sed '/www.hao123.com/d' | sed '/localhost/d' | sed '/#/d' | sed '/.5173.com/d' | sed '/.taobao.com/d' | sed '/.jd.com/d' | sed '/iqiyi/d' > /etc/dnsmasq/adblocks/simpleu
  56. wget --no-check-certificate -qO - http://www.malwaredomainlist.com/hostslist/hosts.txt | sed -n '/127/p' | sed '/localhost/d' > /etc/dnsmasq/adblocks/malwaredomainlist.conf
  57. wget --no-check-certificate -qO - http://code.taobao.org/svn/yhosts/hosts | sed '/iqiyi/d' > /etc/dnsmasq/adblocks/yhosts
  58. # 合并simpleu与yhosts下载缓存
  59. cat /etc/dnsmasq/adblocks/simpleu /etc/dnsmasq/adblocks/yhosts > /etc/dnsmasq/adblocks/noad
  60. # 删除下载缓存
  61. rm /etc/dnsmasq/adblocks/simpleu
  62. rm /etc/dnsmasq/adblocks/yhosts
  63. # 删除重复规则
  64. sort /etc/dnsmasq/adblocks/noad | uniq > /etc/dnsmasq/adblocks/noad.conf
  65. # 删除合并缓存
  66. rm /etc/dnsmasq/adblocks/noad
  67. # 重启dnsmasq服务
  68. killall dnsmasq
  69. /usr/sbin/dnsmasq
  70. EOF

  71. # 注入每8小时更新一次的任务
  72. http_username=`nvram get http_username`
  73. cat >> /etc/crontabs/$http_username <<EOF
  74. 8 */8 * * * /bin/sh /etc/dnsmasq/adblocks/noad_update.sh
  75. #EOF
复制代码




手动复原方法
  1. 打开/etc/dnsmasq.conf
  2. 删除以下参数
  3. # 同时查询所有上游DNS
  4. # all-servers
  5. # 按顺序查询上游DNS
  6. strict-order
  7. # 添加监听地址(将192.168.1.1修改为你的lan网关ip)
  8. listen-address=192.168.1.1,127.0.0.1
  9. # 添加上游DNS服务器
  10. resolv-file=/etc/dnsmasq/resolv.conf
  11. # 添加广告规则路径
  12. addn-hosts=/etc/dnsmasq/adblocks/malwaredomainlist.conf
  13. addn-hosts=/etc/dnsmasq/adblocks/noad.conf

  14. 删除adblocks文件夹
  15. /etc/dnsmasq/adblocks/

  16. 删除定时任务
  17. 找到  /etc/crontabs/以你的用户名命名的文件
  18. 删除下面的命令
  19. 8 */8 * * * /bin/sh /etc/dnsmasq/adblocks/noad_update.sh
复制代码

















本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 23:03

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表