ROS(routeros)通过L7解决dns泥水?

  • h
    hyes
    之前说了routeros自动下载规则,进行ip分流以及ip屏蔽。
    但是如果dns被泥水了怎么办。除了dnsmap什么的其他的办法,这里来说下自己 通过爬文的出来的通过ros自己来进行dns分流的办法。
    ##注意
    • 分流只是解决了分流问题,分流后怎么粗去还是要大家显神通啊。
    • "1024\\.com|chh\\.com" 这个需要大家自己把需要的域名替换即可
    • 为什么要有两个,是因为我这边域名太多,一条会提示规则太长
    • 我是通过winbox设置的,下面代码是自己手敲的,如有误,请帮忙指正。谢谢大佬~


    -----------------------------------------------------------------------------------------------------------------------------
    /ip firewall layer7-protocol
    add name=1111dns regexp="1024\\.com|chh\\.com"

    add name=1111dns01 regexp="2048\\.com|tang\\.com"
    /

    /ip firewall mangle
    add chain=prerouting action=mark-routing new-routing-mark=to1111dns passthrough=no layer7-protocol=1111dns protocol=udp in-interface=LAN dst-port=53 comment="rerouting to prerouting"
    add chain=prerouting action=mark-routing new-routing-mark=to1111dns01 passthrough=no layer7-protocol=1111dns01 protocol=udp in-interface=LAN dst-port=53 comment="rerouting to prerouting01"
    /

    /ip firewall nat
    add chain=dstnat protocol=udp routing-mark=to1111dns action=dst-nat to-addresses=1.1.1.1 to-ports=53
    add chain=dstnat protocol=udp routing-mark=to1111dns01 action=dst-nat to-addresses=1.1.1.1 to-ports=53
    /


    ----------------------------------------------------------------------------------------------------------------------
  • 未名
    虽然用ros,但是这种东西还是不会整
  • c
    chen10247
    也在用ROS ,确实稳,但真整不明白这玩意,太复杂了
  • h
    hyes
    应该不太全吧,要不也不需要更新了
  • q
    qhdxy
    目前使用dnsmap+chinadnsng+smartdns……无语中
  • h
    hyes
    有点狠了~~其实我在自己旁路上有自定义分流,弄这个只是多一个路子
  • k
    kerafyrm
    不是,现在的测试版不是有dns forwarding了么?
  • h
    hyes
    这个什么功能。。。还真不知道,相关设置帮忙参考吗
  • l
    ltycomputer
    感觉这个折腾有点累,dnsmasq+ipset或许简单点
  • s
    sst
    之前用的ros的DNS池,响应速度比以前的硬路由快了很多

    现在用的B站一个UP主编译的openwrt插件,自动测速然后劫持DNS,真的是丝般顺滑
  • z
    ze零ro
    我把出现在扫描日志里的SSH.API.FTP.TELNET都关了 应该没影响吧
  • h
    hyes
    这个厉害,思路不错
  • s
    szt136
    感觉太高端,有点看不懂!
  • s
    sst
    好像会自己测速,自己制定连接规则,我也不是很懂,反正按他教程设置的,丝般顺滑,一般网页基本都是秒开

  • h
    hyes
    不确定有没有测速,不过看起来肯定有根据域名ip分流了