我在EC2中运行DNS服务器,昨天检查计费仪表板并在本月发现1.86 TB的已用数据时,它的速度约为20mbps。这对我的小型项目实验室来说是一笔大账单。我从没注意到性能下降,也没有在之前设置流量阈值,但是我现在已经因为带宽成本花了我200多美元。
似乎有人将我的DNS服务器用作放大攻击的一部分,但是我对此一无所知。
配置如下。
// BBB.BBB.BBB.BBB = ns2.mydomain.com ip address
options {
listen-on port 53 { any; };
// listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-transfer { BBB.BBB.BBB.BBB; };
allow-query-cache { BBB.BBB.BBB.BBB; };
allow-query { any; };
allow-recursion { none; };
empty-zones-enable no;
forwarders { 8.8.8.8; 8.8.4.4; };
fetch-glue no;
recursion no;
dnssec-enable yes;
dnssec-validation yes;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "mydomain.com" IN {
type master;
file "zones/mydomain.com";
allow-transfer { BBB.BBB.BBB.BBB; localhost; };
};
给定此配置,我不应该回答对我不在本地托管的区域的任何查询,对吗?该服务器是少数域的SOA,但我的其他服务器不使用它查找任何内容(每个人都针对OpenDNS或Google进行解析)。我在这里错了什么指令,或者我忘记了?我的日志(63MB +)充满了:
client 58.215.173.155#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 58.215.173.155#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 58.215.173.155#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 58.215.173.155#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 58.215.173.155#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 58.215.173.155#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 218.93.206.228#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 218.93.206.228#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 218.93.206.228#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 218.93.206.228#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 218.93.206.228#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 218.93.206.228#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 50.19.220.154#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 50.19.220.154#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 50.19.220.154#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 50.19.220.154#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 50.19.220.154#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 50.19.220.154#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 123.207.161.124#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 123.207.161.124#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 123.207.161.124#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 123.207.161.124#4444: query (cache) 'cpsc.gov/ANY/IN' denied
client 123.207.161.124#4444: query (cache) 'cpsc.gov/ANY/IN' denied
9
这不回答你的问题,但你应该建立结算提醒docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/...
—
蒂姆·
对所有没有RFC 7873支持的客户端强制回退到TCP,这是否可以接受?
—
kasperd '16
BIND中的速率限制
—
Rui F Ribeiro
@RuiFRibeiro对权威DNS服务器进行速率限制可能会很有用。但是速率限制本身可以成为DoS攻击中可以利用的弱点。如果攻击者用限制速率的权威服务器上托管的域的查询充斥了递归者,则该递归者的合法用户可能不再能够解析受攻击域中的记录。积极使用未广泛部署的NSEC / NSEC3可以减轻这种攻击。
—
kasperd '16