Use multiple DNS providers to mitigate DDoS attacks and multiple dns providers to ddos attacks
With the proliferation of insecure IoT devices, the number and scale of Distributed Denial of Service (DDoS) attacks against Domain Name System (DNS) providers are increasing. These attacks subsequently affect websites that rely on these providers for domain name resolution. Although DNS providers adopt various methods to protect themselves from such attacks, one of the methods for website protection itself is to use multiple DNS providers.
In 2016, a DDoS attack was one of the largest in history, targeting the DNS provider Dyn. There were three waves before and after the attack, which were attacked through a botnet consisting of Iot devices infected with Mirai malware. Many companies are affected by this attack, such as Amazon, Paypal, Reddit, and Github. This attack causes Dyn to fail to respond to the valid DNS query of the domain name resolved by its Domain Name Server, so that end users cannot access the relevant domain name.
According to Phil Stanhope, vice president of Dyn technology, the Dyn attack also included a tcp syn cookie-based attack that exploits a Linux kernel error. SYN cookie is a method used to mitigate SYN flood attacks. SYN flood attacks consume resources of the target system by continuously sending tcp syn requests. However, SYN cookies also have their own problems. In Linux 3. x, a system-level lock is used to generate SYN cookies. Because of this level of locking, the system runs like a single-core system regardless of the actual number of kernels, thus reducing its actual processing capability. Linux 4.x solves this problem by using local locks for each CPU kernel.
DNS providers use various methods to prevent attacks, such as scrubbing ). Cleaning filters all traffic through a third party. A third party uses protection as a service to clear malicious traffic, so that legal traffic passes through and reaches the final destination. Many vendors provide such services, such as Akamai, AT&T, Verizon, and Arbor Networks.
DNS queries are required for any HTTP (or other protocol) requests of a website or domain name to resolve the domain name to one or more IP addresses. This request passes through Multiple Resolvers of the authorization server at various levels in the domain name. For example, for a request to www.infoq.com, first the root server, then the top-level domain name (TLD) server of. com, and finally the authorization server of infoq.com. The parser may cache the results throughout the process for faster subsequent response. The cache can be controlled by the TTL value in the DNS response. DDoS attacks against the infoq.com authorization server may make these authorization servers unable to respond to valid queries, and consequently the entire website cannot be accessed.
In general, DNS server redundancy can prevent such interruptions. That is to say, any commercial DNS provider will provide multiple DNS servers for a given domain name. The dig or drill command can be used to view Domain Name Server records (infoq.com is used as an example below ).
However, if a supplier is under DDoS attack, all its domain name servers may be affected. Therefore, using multiple DNS providers helps solve this problem.
To use multiple DNS providers, you must be allowed to edit the Domain Name Server records of each DNS provider so that all records can be sent as part of the response. In addition, each supplier will have multiple domain name servers, and the order of all domain name servers of each supplier is disordered. In this way, a failed request to one vendor will cause a request to another vendor, instead of trying all the other domain name servers of the first vendor, because these servers may also be invalid.
Anycast is another method to Ensure DNS reliability. In this method, multiple domain name servers have the same IP address. During DNS query, data packets are sent to the nearest Domain Name Server. In case of failure, data packets are automatically transmitted from the underlying routing protocol to the nearest valid Domain Name Server.
Setting the correct TTL is very important, so that even if the record is cached by the intermediate server serving the response, you can switch to the secondary server in case of a fault. As Stanhope said in his speech at Velocity, more collaboration will be needed between NetOps, DevOps, SecOps and SRE teams in the future to mitigate such attacks.