惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
Recent Announcements
Recent Announcements
A
About on SuperTechFans
U
Unit 42
MyScale Blog
MyScale Blog
J
Java Code Geeks
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
D
Docker
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 司徒正美
量子位
月光博客
月光博客
G
Google Developers Blog
V
V2EX
博客园 - 聂微东
宝玉的分享
宝玉的分享
IT之家
IT之家
Vercel News
Vercel News

博客园 - Charie

牛郎与织女的故事 给22岁自己的回信 所谓运气 一转眼最早的文章都20年前了,真吓人 wireshark解密本地https流量笔记 debian+apache+acme_tiny+lets-encrypt配置笔记 团队组建的一些想法 哈哈一下 好久不来了,过来锄草 mssql表名列名对应语句 北漂中~ 从来没有谁与谁是一路人,我们爱的往往是自己的幻想 不要跟亲戚谈生意 做一个严格要求自己的人 人类未来进化方向恶考 mysql 列所有表行数 恩,有那么一个人 00后厉害哇 。。。。 放弃微博,继续回来写月经
DNS反射攻击阻止
Charie · 2014-05-16 · via 博客园 - Charie

刚搭的dns server就有贱人跑dns反射放大攻击,据说bind高版本没洞,但是日志刷刷的跑,感觉也不放心,而且毕竟dns是返回了请求的,所以找了点资料备忘

先设定不受限制的网段

iptables -v -A INPUT -t filter -s 11.11.11.0/24 -j ACCEPT
加载个模块
iptables -v -A INPUT -p udp --dport 53 -m recent --set --name dnsanyquery
1秒内10次就kill掉(手工试了下,除了恶意攻击,还是很难达到这个手速的...)
iptables -v -A INPUT -p udp --dport 53 -m recent --name dnsanyquery --rcheck --seconds 1 --hitcount 10 -j DROP

也可以用tcpdump抓包设定query规则