Skip to content

Latest commit

 

History

History
779 lines (671 loc) · 71.8 KB

05.md

File metadata and controls

779 lines (671 loc) · 71.8 KB

DNS相关工具配置,包括 DNSCrypt-proxy 和 DNSmasq

在 Ubuntu 12.04 LTS 测试,为了尝鲜最新版本,这里采用编译安装方式,同时禁用 Ubuntu 自带的 DNSmasq

IPtables 开机应用

没必要更新 GFW 污染IP了,目前使用了全新的动态污染,基本上一天换一批污染ip,这个方法已经没有什么作用了。

PS:对于白名单的使用可以参考我这个私人配置,这个方法的性能主要依赖于VPN,所以暂时不准备写在这个repo里面了,如果有想看的注意区分一下配置文件。

IPtables u32模块 防污染 (需要定期更新GFW IP)

iptables -I INPUT -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0x01010101,0xffffffff,0x4a7d7f66,0x4a7d9b66,0x4a7d2766,0x4a7d2771,0xd155e58a,0x042442b2,0x0807c62d,0x253d369e" -j DROP
iptables -I INPUT -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0x2e52ae44,0x3b1803ad,0x402158a1,0x4021632f,0x4042a3fb,0x4168cafc,0x41a0db71,0x422dfced,0x480ecd68,0x480ecd63" -j DROP
iptables -I INPUT -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0x4e10310f,0x5d2e0859,0x80797e8b,0x9f6a794b,0xa9840d67,0xc043c606,0xca6a0102,0xcab50755,0xcba1e6ab,0xcb620741" -j DROP
iptables -I INPUT -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0xcf0c5862,0xd0381f2b,0xd1913632,0xd1dc1eae,0xd1244921,0xd35e4293,0xd5a9fb23,0xd8ddbcb6,0xd8eab30d,0xf3b9bb03" -j DROP
iptables -I INPUT -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0xf3b9bb27,0x1759053c,0x31027b38,0x364c8701,0x4d04075c,0x76053106,0xbc050460,0xbda31105,0xc504040c,0xfd9d0ea5" -j DROP
iptables -I INPUT -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0xf9812e30" -j DROP
iptables -I FORWARD -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0x01010101,0xffffffff,0x4a7d7f66,0x4a7d9b66,0x4a7d2766,0x4a7d2771,0xd155e58a,0x042442b2,0x0807c62d,0x253d369e" -j DROP
iptables -I FORWARD -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0x2e52ae44,0x3b1803ad,0x402158a1,0x4021632f,0x4042a3fb,0x4168cafc,0x41a0db71,0x422dfced,0x480ecd68,0x480ecd63" -j DROP
iptables -I FORWARD -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0x4e10310f,0x5d2e0859,0x80797e8b,0x9f6a794b,0xa9840d67,0xc043c606,0xca6a0102,0xcab50755,0xcba1e6ab,0xcb620741" -j DROP
iptables -I FORWARD -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0xcf0c5862,0xd0381f2b,0xd1913632,0xd1dc1eae,0xd1244921,0xd35e4293,0xd5a9fb23,0xd8ddbcb6,0xd8eab30d,0xf3b9bb03" -j DROP
iptables -I FORWARD -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0xf3b9bb27,0x1759053c,0x31027b38,0x364c8701,0x4d04075c,0x76053106,0xbc050460,0xbda31105,0xc504040c,0xfd9d0ea5" -j DROP
iptables -I FORWARD -p udp -m udp --sport 53 -m u32 --u32 "0&0x0F000000=0x05000000 && 22&0xFFFF@16=0xf9812e30" -j DROP

IPtables string模块 防污染 (需要定期更新GFW IP)

这个模块的缺点是相对来说CPU消耗比 u32 要高,以前的linux系统中默认都不会包含这个 mod.相对 u32 模块只能精确匹配 4 个字节的弱势(这也是 u32 节约资源的重要原因,因为指定位置后不存在搜索的运算),string模块提供了字符串搜索能力,只要返回的数据里有特定的字符就可以识别出来,这样就不用担心不同类型的DNS服务器返回的数据格式不同了。

iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01010101|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01014333|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01017F2D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01020304|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0121AA44|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0121BC3E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0121BE46|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0121BEE4|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0121BF3A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01D1D0C8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01E25393|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01EA045B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01EA1553|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01EA1D28|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01EA270E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01EA4650|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01EA5368|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|01F473AC|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|02010102|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|02BBFD79|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|02E47B07|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|02E49A08|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|04118F83|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|04154609|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|041E0DA8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|041EBB09|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|041EEBE5|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|041F8B92|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0422B4B2|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|04236414|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0423EAC8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|042442B2|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|043511D7|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|043B4FCE|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|044EA7C4|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|044F817A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|04C15000|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0509051A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|05094169|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0509766F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0509788C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|050988D2|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0509F2E8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|050A44BB|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|050A44BC|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|050A451D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|050A4D48|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|050A6929|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0523FB6C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|05649818|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0564E1CC|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0564E4CE|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0564E71B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0564F8D0|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|05908114|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0807C62D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0822A196|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|08695400|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0A0A0A0A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0C578500|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|0E66F912|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|103F9B00|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|14141414|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|148B3800|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|17170EC0|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|1759053C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|1833B800|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|1C0DD800|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|1C797E8B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|1F16043C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|1F19BF86|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|1FA95A04|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|1FAA0808|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|1FD29CD4|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|1FDEB9CA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|22FEF797|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2501CD15|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2501CF81|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|253A4E4F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|253B195F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|253D369E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2563C294|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|258CEE23|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|25BB8696|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|25BB9581|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|25BBFB23|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|25FC7AB8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|267562E7|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|294F1409|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2BFDC70C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2E140D64|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2E147EFC|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2E1ED4C6|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2E2618D1|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2E52AE44|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2E89DB07|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2EA5E790|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2EE5AF5F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|2EF306AA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|31027B38|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|31D49980|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3212B7E9|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|32390B0C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|323FCA0D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3257948C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3257A94D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|325DCF65|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3261865B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|327406A2|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3644A682|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|364C8701|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|365333BF|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36561540|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3656DFCA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3658FC5B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36AE28B6|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36BB2726|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36BB881E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36BFC18A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36C80320|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36CE627F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36D157BA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36D1EE1C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36DA26C6|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36E593B7|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36EBC79A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36F4164D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36F6A920|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|36F6CAFA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3B1803AD|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3B7C4A1C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3D361C06|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3E4BDD1F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3E5C11D5|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|3E8A7323|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|400E4829|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|40166E22|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|402158A1|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4021632F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4022A18E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4032B385|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4042A3FB|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|404F45FA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|404F548D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|405BFE61|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4096B862|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4168CAFC|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|41A0DB71|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|41B7278B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|42273DA1|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|422DFCED|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|42379794|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|425586BA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|426093A0|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|429202F1|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|42BBCC32|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|42CE0BC2|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4389E30B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|43E1DCF8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|44473A12|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4510C471|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|451E170A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4532C0DA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|453D3C7A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|45A7ACA2|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|45AB0D31|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|45AEF4DD|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|45AF4BCA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|45C37C5A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|462AF321|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4805016D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|480ECD63|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|480ECD68|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|48146E32|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|481D5EF0|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|482004F3|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|482FE44F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4834F438|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|48A7200A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4A52A6A6|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4A75398A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4A75757A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4A7CC349|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4A7D1F71|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4A7D2766|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4A7D2771|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4A7D7F66|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4A7D822F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4A7D9B66|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4A7DCC79|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4ACFECAE|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4AD07DB8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4ADCD743|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4B62AFA6|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4CA4D974|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4D04075C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4E10310F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4E188763|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4E6CB21A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4E8CAC21|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4F62223C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4F7F7F44|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|4F887D31|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5046B876|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|50482992|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|505275D1|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5052C99A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|505C7584|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|50BE601A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|50F15CB4|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|50F1D113|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|50F5AB46|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|52912F75|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|537D767A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|53DE05AB|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|53DE7CBB|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|547C3BA5|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5519AB67|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|555C86E5|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|556F128A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|55BE006E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|576A39D1|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|57E62E32|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|58C64565|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|58D6C343|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|591E7DCC|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|591F376A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|596C7681|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|596FB54A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|59BA5F0B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5A9CC92A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5B79F59A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5BBA1C29|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5BC6812F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5BD94916|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5BDD2523|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5BDFAF19|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5BEE1E36|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5BEFC910|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5C356009|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5C356AAF|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5C3F6EAE|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5D2E0859|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5D5DBB31|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5D73F094|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5D9E7948|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5DBBCD02|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5E17938E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5E179C0B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5E17C1E0|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5E17C790|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5E88BC1E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5E8D1F8C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5F5516A3|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5FA35F2F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5FD33A61|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5FD39646|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|5FD3E59C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|601E3394|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|607E610F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|607FACDD|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|614A5016|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6281E5CA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|629E989F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|629EB28D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|681C0116|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|681C0E70|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|681C140E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|681C1E3B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|68C81FE2|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6ABA789D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6ABB2750|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6B062265|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6C3DFADA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6CA8D7E6|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6CA8FA03|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6CB3C44D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6CB3FA6A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6D475182|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6D7B73CD|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6DCEADD4|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6DEA9F26|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6E4AA328|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|6EAD9A8E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|70AF3C1F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|710BC2BE|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|71A0665A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|76053106|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|769111B8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|76DBFDF5|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|77095E53|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|77123E82|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|77EB3952|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|77F5D99B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|78595DF8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|7AD602AB|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|7ADA65BE|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|7B1EAF1D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|7B3231AB|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|7B7EF9EE|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|7DE69430|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|7F000002|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|80797E8B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|80C7B4A2|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|852A3003|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|85C0B542|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|85F2A518|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|898781AF|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|8D08C32F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|8D08C34E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|8D08E150|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|8D657666|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|8E04056D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|904C150D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|904C6AE8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|904C7F72|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|91FDB717|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|9357F420|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|9B5CB676|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|9D078FD1|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|9DCD2040|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|9F32584D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|9F6A794B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|9FFD14B3|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|A29FF365|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|A2F389A3|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|A2FD2186|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|A46D60E8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|A48ADD44|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|A89CA815|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|A9840D67|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|AB118235|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|AB19CC8D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|ADC0DB3B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|ADC27F90|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|ADC9D806|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|ADE0D10E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|ADECE46C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|ADF4B80A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|ADFFC2AE|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|ADFFE6C4|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|AE8E1619|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|AE8E718E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B00A2551|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B039D891|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B21252D8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B2206F88|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B2209C3B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B220F752|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B221D4A2|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B2318487|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B23E4B63|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B23EF29C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B24FB6F8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B2ECB14D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B457B6E3|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B499E1A8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B4B3AB79|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B5E09B29|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B76F8D5F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B848FDE8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B89A0A92|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B8A984F4|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B919962D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|B9353D32|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|BC050460|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|BC286C0D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|BC84FABA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|BCA51F18|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|BCE2CFFB|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|BDA31105|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C043C606|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C05F62CA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C0682C06|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C079976A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C13060DA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C139F475|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C15B1A84|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C169919E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C1A94258|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C1CB3012|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C1EAE995|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C1EE9762|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C1EF842C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C2439046|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C295FA14|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C2B97301|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C2BB5E06|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C3025844|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C3087D40|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C32B52AA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C331C91E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C332C30F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C34A263E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C34A4E15|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C34DF1F2|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C392EB21|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C395D2D3|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C39AF397|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C3BF9567|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C3D348C8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C504040C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C639CD85|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C639DE58|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C63A7C44|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C68F8F24|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C71544DE|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C74F3F53|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C7A71F8E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C862EA0E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C8E5CE73|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|C94DD38F|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CA066019|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CA6A0102|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CAB50755|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CADADB0A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CB620741|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CB71AD16|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CB85EEAC|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CBA1E6AB|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CBC73951|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CE6C335B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CE719646|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CF0C5862|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CF3AB1A6|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CF7E3B1B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|CF8C95F7|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D02B21C2|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D02B866B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D0381F2B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D049D3A4|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D0569A70|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D05D0096|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D06D8A37|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D06DCDE8|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D070667A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D1244921|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D12B0182|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D1389E2A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D13E9A5E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D155E58A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D174476D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D17E6AB6|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D18D3023|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D1913632|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D1BC07BA|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D1CC9416|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D1DC1EAE|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D1EBE019|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D2AFFF9A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D2D16EC7|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D2E6C0B7|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D2F27D14|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D3058512|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D308451B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D32BCB21|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D35E4293|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D42D34DB|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D4442A43|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D44D681D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D4E36282|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D513A18D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D56C4215|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D5856F66|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D5A9FB23|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D5AE9E6C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D5BA2105|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D5CF5594|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D5EEA6E3|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D80CCD02|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D826005C|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D846581D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D85C3A25|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D88BD590|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D8B2F165|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D8C6F667|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D8DDBCB6|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D8EAB30D|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D8FA7390|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D91EB8A1|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D9A02A55|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|D9ACB709|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|DA2CFBD4|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|DC6E965A|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|DCF7E008|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|DD08451B|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|DDD53195|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|DE7A38DB|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|F3B9BB03|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|F3B9BB1E|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|F3B9BB27|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|F9812E30|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|FD9D0EA5|" --from 60 --to 180  -j DROP
iptables -t mangle -I PREROUTING -p udp --sport 53 -m string --algo bm --hex-string "|FFFFFFFF|" --from 60 --to 180  -j DROP

-m string表示启用string模块进行匹配,–algo bm表示启用贝叶(Boyer-Moore)字符串搜索算法,另一种算法是kmp(Knuth-Pratt-Morris)

–hex-string就是要匹配的IP地址的HEX格式了,注意这里前面不要有0x表示16进制了,直接写16进制数据就行,后面跟着的就是IP地址的16进制格式.

–from 60 –to 180都是表示搜索的偏置范围(offset),从第60 byte开始到180 byte结束,一般来说DNS返回包的长度很少有超过180字节,而IP值的位置因为协议格式的关系,基本上不可能出现在60字节之前,所以指定这个范围是足够的,同时也可以大大减轻搜索算法的运算压力.如果你担心有什么奇葩DNS返回的结果在这范围之外,删除这两个偏置选项就行了,这样会默认搜索整个字符串,但相应的搜索消耗的CPU资源就更多了.

开机自动加载iptables配置

iptables配置完成后,如果不做设置,机器重启后,规则会丢失

iptables配置完成后执行:

$ passwd root  
$ su root  
sudo iptables-save > /etc/init.d/iptables.up.rules  

将当前配置保存在 iptables.up.rules 文件中,文件名可以随意。

修改网卡配置文件,在网卡IP配置文件 /etc/network/interfaces 末行加入

sudo gedit /etc/network/interfaces  
/*   add the line below  */  
pre-up iptables-restore < /etc/init.d/iptables.up.rules  

最后重启验证

DNSCrypt-proxy

编译安装过程

编译安装依赖 libsodium

1. 下载源代码

点击链接找最新的tarball of libsodium,比如 libsodium-<version>.tar.gz

2. 验证完整性

计算 SHA256:

$ openssl dgst -sha256 libsodium-<version>.tar.gz

使用 dig 验证SHA256:

$ dig +dnssec +short txt libsodium-<version>.tar.gz.download.libsodium.org

如果匹配则继续下面的操作,否则去官方 GitHub 报告,不要继续进行

3. 编译安装
$ tar zxvf libsodium-<version>.tar.gz
$ cd libsodium-<version>/
$ ./configure
$ make -j CORE_NUMBER && make check
# make install
# ldconfig       /*   root 下重新载入模块  */

编译安装 dnscrypt-proxy

1. 下载源代码

从这里下载: dnscrypt download

2. 验证完整性

计算 SHA256:

$ openssl dgst -sha256 dnscrypt-proxy-<version>.tar.bz2

使用 dig 验证SHA256:

$ dig +dnssec TXT dnscrypt-proxy-<version>.tar.bz2.download.dnscrypt.org

如果匹配则继续下面的操作,否则去官方 GitHub 报告,不要继续进行

3. 编译安装
/* 在 Fedora, RHEL and CentOS 上安装 必须在 `ldconfig` 之前 */
$ su root
# echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf
# ldconfig
# exit
/*            Ubuntu 标准安装                              */
$ bunzip2 -cd dnscrypt-proxy-*.tar.bz2 | tar xvf -
$ cd dnscrypt-proxy-*/
$ ./configure && make -j CORE_NUMBER
# make install
# ldconfig

默认安装在 /usr/local/sbin/dnscrypt-proxy

man 8 dnscrypt-proxy  # 查看详细帮助信息

启动脚本配置以及使用

1. 创建专用系统账户

/* 理论上都可以使用  未完全测试,建议创建 带有空家目录的专用无权限系统账户  */
# adduser --system --home /home/dnscrypt --disabled-password --disabled-login dnscrypt
# useradd --home-dir /home/dnscrypt --create-home --system --user-group dnscrypt

2. 配置启动脚本

创建脚本文件 # touch /etc/init/dnscrypt.conf

脚本中不需要出现 daemon 的内容,比如这里的 --daemonize
其中的 --resolver-name 可以在public DNS resolvers supporting DNSCrypt中的 Name 列找,目前使用的是 opendns
其中 --tcp-only 因为性能问题不建议使用,除非必须要用来突破DNS污染

description "dnscrypt startup script"

start on (local-filesystems and started dbus and stopped udevtrigger)
stop on runlevel [016]

script
        exec /usr/local/sbin/dnscrypt-proxy --resolver-name=cloudns-can --local-address=127.0.0.9:35535 --user=dnscrypt --logfile=/var/log/dnscrypt.log --pidfile=/var/run/dnscrypt.pid
end script

之后软连接到 /etc/init.d 目录下

# ln -s /lib/init/upstart-job /etc/init.d/dnscrypt

注: --resolver-name=cloudns-can 有 DNSSEC, No-log 和 Namecoin , 方便突破封鎖

3. 启动和停止

# killall -KILL dnscrypt-proxy  // 或者使用 pid 
# start dnscrypt                // 在 /etc/init.d 中的名称

DNSmasq

禁用 Ubuntu 自带 DNSmasq

# vim /etc/NetworkManager/NetworkManager.conf,把 dns=dnsmasq 注释掉,之后重启服务

# service network-manager restart

编译安装过程

1. 下载源代码

从这里下载: DNSmasq,比如 dnsmasq-<version>.tar.gz

2. 编译安装
/*            Ubuntu 标准安装          */
$ tar zxvf dnsmasq-<version>.tar.gz
$ cd dnsmasq-<version>/
$ make -j CORE_NUMBER
# make install

默认安装在 /usr/local/sbin/dnsmasq

man 8 dnsmasq  # 查看详细帮助信息

启动脚本配置以及使用

1. 创建专用系统账户

/* 理论上都可以使用  未完全测试,建议创建 带有空家目录的专用无权限系统账户  */
# adduser --system --home /home/dnsmasq --disabled-password --disabled-login dnsmasq
# useradd --home-dir /home/dnsmasq --create-home --system --user-group dnsmasq

2. 配置启动脚本

创建脚本文件 # touch /etc/init/dnsmasq.conf

脚本中不需要出现 daemon 的内容

description "dnsmasq startup script"

start on (local-filesystems and started dbus and stopped udevtrigger)
stop on runlevel [016]

script
        exec /usr/local/sbin/dnsmasq --conf-file=/etc/dnsmasq.conf
end script

之后软连接到 /etc/init.d 目录下

# ln -s /lib/init/upstart-job /etc/init.d/dnsmasq

3. 启动和停止

# killall -KILL dnsmasq        // 或者使用 pid 
# start dnsmasq                // 在 /etc/init.d 中的名称

4. 卸载

# make uninstall              // dnsmasq 一般没有 uninstall 字段
# make clean
$ chmod +x clean_compile_soft.py
# ./clean_compile_soft.py

卸载脚本 clean_compile_soft.pyScripts repository

4. 配置 dnsmasq

NetworkManager 设置当前连接DNS为 127.0.0.1 即可使用本地 DNSmasq 进行解析和缓存

创建默认位置配置文件 # touch /etc/dnsmasq.conf,我们可以把大量文本配置放在/etc/dnsmasq.d文件夹中,然后使用conf-dir选项指定配置文件目录,目录中不要放置其他文件,这样看起来也比较整洁。另外dnsmasq配置文件可参考我的OpenWRT配置

no-resolv
no-poll
all-servers

conf-dir=/etc/dnsmasq.d
user=dnsmasq
group=dnsmasq

listen-address=127.0.0.1
    
# log for debug purpose
# log-queries
# log-facility=/var/log/dnsmasq.log
    
# Find more rules there, including accelerate and ISP block rules
#   (https://github.com/felixonmars/dnsmasq-china-list)

# special forward rules
server=/launchpad.net/8.8.8.8

启动模板以及使用

模板内容

description "<what you put, that is to say,to startup something you need>"

start on (local-filesystems and started dbus and stopped udevtrigger)
stop on runlevel [016]

script
        exec <path-to-the-executable-file> <the-parameters-needed_without_daemon_param>
end script

添加到系统

# cp <template-file>.conf /etc/init/
# ln -s /lib/init/upstart-job   /etc/init.d/<the-name-of-template-file>

使用

# start <the-name-of-template-file>
# stop <the-name-of-template-file>