current position:Home>Attack Science: DDoS (Part 2)
Attack Science: DDoS (Part 2)
2022-06-24 12:45:42【Chen Bucheng I】
3、 ... and . How to deal with DDoS attack ?
Behavior : Choose
choose IDC Or virtual machine , To see if there is a temporary increase in bandwidth , Advanced defense services , Redundancy, etc . The knowledge of this information can help solve some problems in case of an attack .
Behavior : testing
Conduct performance test before purchasing the machine , Regularly test business services , Know how much pressure the current structure can withstand . For e-commerce websites , Double 11 is a time DDOS, Know how much compression resistance can be used to increase the redundancy of the machine according to these data , Know what you know .
At ordinary times, the comprehensive flow can be reserved according to the data 30% Resources for , In case of service crash caused by sudden small peak access .
Behavior : appropriate
Configuration of system and software , You can't just 65535, This can easily lead to failure . If the machine can only support 3000, Then configure it 3000, You can't get in any more , At present, it will only be slower .
Optimize : Kernel optimization
The kernel can control tcp Some mechanisms of the protocol , For example, when the link times out, you give up the link , Setting shorter will slightly disable those half syn attack , Another example is enabling TIME-WAIT state sockets Rapid recycling of , This can cope with large concurrent traffic , One tcp The link will be released quickly after termination .
You can see Kernel details
Optimize :web Server optimization
in the light of WEB Modification of service configuration , At present, it only indicates nginx Of , You can set the client connection hold session timeout , Beyond that time , The server disconnects the link and so on , According to the performance test ,web Server optimization will bring more significant results .
You can see nginx Detailed instructions You can view the differences before and after optimization Before and after optimization
Software : The blacklist
Facing the hooligans in the hot pot shop , I got angry and put them on file , And forbid them to enter the shop , But sometimes people who look like him will be forbidden to enter the shop . This is to set up a blacklist , What this method adheres to is “ Kill a thousand by mistake , Not a hundred ” Principles , Will block normal traffic , Affecting normal business .
image nginx Set the largest one in ip Concurrent access 20 It's forbidden , Not very good either , Because some companies use a forward proxy server to access , Or the company just exports ip, That one ip Maybe a company uses , More than 20 Concurrent .
And if you set a blacklist on the server , It will consume server resources , Come in a link to compare once , It is better to replace it with a hardware firewall .
To configure :CDN Speed up
We can understand that : To reduce rogue harassment , I just opened the hot pot shop online , Take out service , So hooligans can't find where the shop is , No more hooligans . In reality ,CDN The service allocates website traffic to each node , On the one hand, it hides the reality of the website IP, On the other hand, even if you encounter DDoS attack , Traffic can also be distributed to each node , Prevent the origin from crashing .
At the same time, each node has cached static pages , In this way, if the attacker does not randomly visit multiple pages of the website , Will be able to better undertake attacks .
To configure : Try to use static pages
DDOS Is exhausting resources ( bandwidth , Memory of the server ,cpu,tcp Link number ), If the home page or some pages are static as much as possible html page , If you click on something and switch to a dynamic page , Will be able to better undertake DDOS attack , If the home page is a dynamic page , Every time the form is parsed and queried, it will cost a lot of performance .
Hardware : Advanced defense server
Take the Chongqing hotpot restaurant I opened as an example , High defense server is that I added two security guards to Chongqing hot pot store , These two security guards can protect the shop from being harassed by hooligans , And will patrol around the shop regularly to prevent rogue harassment . Advanced defense server mainly refers to independent hard defense 50Gbps The servers above , Can help website denial of service attack , Scan the main node of the network regularly , It's a good thing , It's expensive ~
Hardware :DDoS cleaning
DDos cleaning , It's just a few minutes after I found out that the guests came in , But I never order , I'll kick him out of the store .
DDoS Cleaning will monitor the data requested by users in real time , Discover in time DOS Attack and other abnormal traffic , Clean out these abnormal flows without affecting normal business development .
Hardware : Increase bandwidth
Now most of them use cloud , That means dynamic capacity expansion , image nginx High concurrency , Most of the time it's not memory or cpu Full of , But the bandwidth is not enough . Then you can buy bandwidth to improve when it comes
If it's a real machine , There's nothing we can do about it , image idc Being attacked is not easy to handle , It's better to go to advanced defense
Hardware :LSB Load balancing
If it's alicloud , Can be in the domain name DNS Fill in more than LSB The address of , Every LSB Provide 5G The flow of cleaning , In this way, you can resist a big attack . Pass normal access to back-end services . Attack popular science :DDos
copyright notice
author[Chen Bucheng I],Please bring the original link to reprint, thank you.
https://en.chowdera.com/2022/175/20210526152008292d.html
The sidebar is recommended
- [Tencent cloud 618 countdown!] Promotion strategy of the promotion activities
- Simple and flexible permission design?
- Making daily menu applet with micro build low code
- 99% of the students can't write good code because of this problem!
- Istio practical skills: using prism to construct multi version test services
- Kubernetes practical technique: setting kernel parameters for pod
- A scheme for crawlers to collect public opinion data
- Essential key steps in the construction of e-commerce live broadcast source code
- How do websites and we media tap user needs? Deeply expose the secrets behind the keywords!
- From theory to practice, decipher Alibaba's internal MySQL optimization scheme in simple terms
guess what you like
Continuous testing | key to efficient testing in Devops Era
It's settled! Bank retail credit risk control just does it!
Encapsulate the method of converting a picture file object to Base64
The pod is evicted due to insufficient disk space of tke node
Post processing - deep camera deformation effects
Tencent released credit risk control results safely: it has helped banks lend more than 100 billion yuan
Interesting erasure code
Five minutes to develop your own code generator
How to make secruecrt more productive
About me, a 19 line programmer
Random recommended
- Kubernetes practical skill: entering container netns
- [programming navigation] the practical code summarized by foreign great God, learned in 30 seconds!
- Design and implementation of high performance go log library zap
- Ghost, a synonym for blog system
- Engage in audio and video development? Several things I have to say about SRT live broadcast protocol
- IOMMU (VII) -vfio and mdev
- [highlights] summary of award-winning activities of Tencent cloud documents
- The programmer's graduation project is still bald after a year
- How to solve the problem that MBR does not support partitions over 2T, and lossless transfer to GPT
- Another prize! Tencent Youtu won the leading scientific and technological achievement award of the 2021 digital Expo
- Use txvideoeditor to add watermark and export video card at 99%? No successful failed callback?
- Reset the password, and the automatic login of the website saved by chrome Google browser is lost. What is the underlying reason?
- [log service CLS] Tencent cloud log service CLS accesses CDN
- [live broadcast of celebrities] elastic observability workshop
- Smart Policing: how to use video intelligent analysis technology to help urban policing visual comprehensive supervision and command system
- SMS SMS
- WPF from zero to 1 tutorial details, suitable for novices on the road
- Dingding, Feishu, and enterprise wechat: different business approaches
- [2022 national tournament simulation] BigBen -- determinant, Du Jiao sieve
- How to do research on plant endophytes? Special topic on Microbiology
- Mlife forum | microbiome and data mining
- 105. simple chat room 8: use socket to transfer pictures
- Parse NC format file and GRB format file dependent package edu ucar. API learning of netcdfall
- Reading notes of returning to hometown
- Generate the NC file of 4-D air pressure and temperature, and then read the code (provide the code)
- Codereview tool chain for micro medicine
- Babbitt | metauniverse daily must read: 618 scores have been announced. How much contribution has the digital collection made behind this satisfactory answer
- On the value foam of digital copyright works from the controversial nature of "Meng Hua Lu"
- Use the open source tool k8tz to gracefully set the kubernetes pod time zone
- How does Argo family bucket make Devops easier?
- A hero's note stirred up a thousand waves across 10 countries, and the first-line big factories sent people here- Gwei 2022 Singapore
- MySQL foreign key impact
- Common special characters in JS and TS
- The text to voice function is available online. You can experience the services of professional broadcasters. We sincerely invite you to try it out
- Who said that "programmers are useless without computers? The big brother around me disagrees! It's true
- what the fuck! I'm flattered. He actually wrote down the answers to the redis interview questions that big companies often ask!
- Concept + formula (excluding parameter estimation)
- [database] final review (planning Edition)
- Troubleshooting and optimization of files that cannot be globally searched by ordinary users in easydss video platform customization project
- How can ffmpeg streaming to the server save video as a file through easydss video platform?