205 points · by Garbage · 10y ago · 57 comments
Also the DDoS attacks that we've been hit with actually target our uplinks by saturating them with traffic, not our services. We have a 1 Gbps port and the last DDoS we were hit with was over 20 Gbps, which is a relatively small one. The mitigation we used was to have our hosting facility get their upstream provider to route the traffic through a layer 7 DDoS mitigation filter provided by an external company. It worked wonderfully.
These are cool features, but when your link is saturated it doesn't matter what a daemon listening on a port does.
That'll be a while, of course, but already we see attackers with access to a tremendous number of unique IP addresses in the IPV4 space.. they'll have many orders of magnitude more soon.
... in the same /64 range for the most part, so as easy to block/filter/limit as one IPv4 address.
You risk inconveniencing people who are assigned just a few addresses because you potentially end up blocking many of them due to the actions of a few on the same subnet, but you can't be held responsible for hosts/ISPs doing IPv6 wrong.
Not to mention that some ISPs do carrier-grade NAT specifically due to the limitations of IPv4, so blocking a single IP(v4) might affect multiple people as well.
Possibly even easier, because of IPv4 deaggregation.
(Because of IPv4 address scarcity, many providers have discontinous IPv4 address space. This is mostly a problem for the core, because it leads to much larger BGP routing tables.)
When you think about IPv6, start with /64 networks. That's the basic unit. What a DSL customer gets from the ISP is a /64 network, not some number of individual addresses. The customer may two, ten or 2047 of then, it doesn't matter. The point is "one owned DSL subscriber = one /64 network".
Just like with IPv4, some people have larger allocations. But the basic allocation unit is a /64 network.
location = / {
if ($http_user_agent ~* foo|bar) {
# return non-standard (NGINX only) 444 code
# closes the connection without sending a response header
return 444;
}
}This will get you nothing in a typical DDoS scenario, but thanks for sharing as it may come handy for other situations.
To mitigate a DDOS, you need to go upstream to your network providers and filter out the traffic before it reaches you.
I haven't read this all the way through, but on a cursory glance it looks reasonable:
I'm starting to think that we need some agreement where instead of logs, we just get apps to emit a stream of protocol buffers and a format string for the messages and data.
Which does make me wonder if you couldn't LD_PRELOAD something which replaced fprintf and the like...
This blog post is a good starting point for the kinds of strategies you need to fill that gap in protection.
Just hoping you can give a concrete example, as I'm not super familiar with this stuff.
About DDoS I don't think there's any cheap solution for that...
That's a dealbreaker for me at their prices.