{"id":8723,"date":"2020-06-01T19:06:58","date_gmt":"2020-06-01T16:06:58","guid":{"rendered":"https:\/\/unihost.com\/help\/?p=8723"},"modified":"2023-10-09T16:40:18","modified_gmt":"2023-10-09T13:40:18","slug":"web-server-protection-against-ddos-attacks","status":"publish","type":"post","link":"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/","title":{"rendered":"Web server protection against DDoS attacks"},"content":{"rendered":"<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\"><a href=\"https:\/\/unihost.com\/en\/ddos-protection\/\">DDoS attack<\/a> on your web server can have the most unpleasant consequences for your infrastructure. Each attack should be considered as a separate case, and in the case of DDoS on your server, we recommend involving a qualified system administrator to solve this problem. In this article we will try to consider the most basic methods of preventing common attacks on web servers Apache\/Nginx.<\/span><!--more--><\/p>\n<h2 style=\"text-align: center;\"><strong><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Apache<\/span><\/strong><\/h2>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">For this web server, the Ddos attack begins with the revelation of a large number of apache processes, your server may become unavailable due to exceeding the maximum number of processes, or due to shortage of RAM.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Let&#8217;s look at the sequence of actions and recommendations in case you encounter an attack.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0\u00a01.Diagnostics<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-weight: 400;\">If possible, you need to connect to the server via <\/span><b>ssh<\/b><span style=\"font-weight: 400;\">. Using the <\/span><b>ps<\/b><span style=\"font-weight: 400;\"> and <\/span><b>top<\/b><span style=\"font-weight: 400;\"> commands, you can detect an increase in the number of httpd processes. In this case, you can stop apache or kill all httpd processes.<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">These commands will help determine the direction and status of all connections that are established on port 80 or on all ports:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">netstat -na | grep ':80 '<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">netstat -na<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Using the following commands, you can view the number of httpd processes and the number of connections on port 80. If a connection is detected that exceeds the average, you can\u00a0 review that it is a DoS \/ DDoS attack.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">ps aux | grep -\u0441 httpd<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">netstat -na | grep -\u0441 \":80 \"<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">The Centos 7 operating system does not have the netstat command in the\u00a0 image, but you can install netstat with the command:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">yum instal net-tools<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-weight: 400;\">You can also use an alternative method, the <\/span><b>ss<\/b><span style=\"font-weight: 400;\"> command, which during output displays all connections to the web server:<\/span><\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">ss -o '( dport = :http or sport = :http )'<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">With the following command, you can display the number of connections from one IP address to the web server and sort the list in ascending order:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">ss -o '( dport = :http or sport = :http )' | awk '{print $6}' | cut -d : -f 1 | grep -v 'Address' | sort | uniq -c | sort -n\u00a0<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">With a high probability, http flood can be determined by side signs. With the following command, you can cause every 2 seconds to display a list of apache logs, and if there is a big increase with the size of the access file, you can determine that the attack goes to a particular site:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">watch 'ls -laS \/var\/www\/httpd-logs\/'<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-weight: 400;\">The following commands can help detect DoS \/ DDoS using <\/span><b>tcpdump<\/b><span style=\"font-weight: 400;\">.<\/span><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><b>tcpdump<\/b><span style=\"font-weight: 400;\"> will write the first 200 packets that are waiting for connections on port 80 to the check.log file:<\/span><\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">tcpdump -n port 80 -c 200 -w check.log<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">With this command you can parse the log file and sort it by ip and number of connections:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">tcpdump -nr check.log | awk '{print $3}' |grep -oE '[0-9]{1,}\\.[0-9]{1,}\\.[0-9]{1,}\\.[0-9]{1,}' |sort |uniq -c |sort -rn<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0\u00a02.Actions to stop the attack<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">First of all, you need to determine which site the attack is on.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Apache has a mod_status module, mod_status allows real-time monitoring of server load.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Connecting mod_status in Apache 2.4<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">In apache2.4, you need to edit the file <em>\/etc\/apache2\/mods-enabled\/status.conf<\/em>. Change section:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">&lt;Location \/server-status&gt;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0SetHandler server-status<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Require local<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0#Require ip ----<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">&lt;\/Location&gt;<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">on<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">&lt;Location \/server-status&gt;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0SetHandler server-status<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">&lt;\/Location&gt;<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Check that the string is uncommented:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">ExtendedStatus On<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Restart apache:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">service httpd restart<\/span><\/i><\/span><\/pre>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Mod_status connection in Apache 2.2<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">In apache2.2, edit <em>\/etc\/httpd\/conf\/httpd.conf<\/em><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Uncomment the lines, and if not, add them to the file:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">#LoadModule status_module libexec\/apache22\/mod_status.so<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">#Include etc\/apache22\/extra\/httpd-info.conf<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Change section:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">&lt;Location \/server-status&gt;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0SetHandler server-status<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Order deny,allow<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Deny from all<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Allow from .examplesite.com<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">&lt;\/Location&gt;<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">on<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">&lt;Location \/server-status&gt;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0SetHandler server-status<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">&lt;\/Location&gt;<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Check that the string is uncommented:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">ExtendedStatus On<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Restart apache:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">service httpd restart<\/span><\/i><\/span><\/pre>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Using server-status<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">And now at<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\"><em>http: \/\/server-ip-address\/server-status<\/em> statistics of requests to it are available.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">For example, the attack occurs with empty GET \/ requests to the examplesite.com website and you need to disable it. You can do this by creating a .htaccess file in the root directory of the domain and writing it to the contents of the file:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">Deny from All<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Now, when accessing the site, 403 Forbidden error will be generated and the load on other sites will be significantly reduced.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0\u00a03.Additional settings<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">iptables\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Using the following command, you can filter the 80th port for a specific IP:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">iptables -A INPUT -p tcp --src xxx.xxx.xxx.xxx --dport 80 -j DROP<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Using the following combination, you can create a chain where all connections will be redirected to the 80th port of the server. All illegitimate IPs will be added to this chain:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">iptables -N chainname<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">iptables -A INPUT -p tcp --dport 80 -j chainname<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">while true; do tail -10000 \/var\/www\/httpd-logs\/site.com.access.log | sort | cut -f 1 -d \" \" | uniq -c | awk '($1&gt;50){print $2}' | xargs -tn 1 iptables -A dos -p tcp -j DROP --dport 80 -s; sleep 30; done<\/span><\/i><\/span><\/pre>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">iptables -F INPUT<\/span><\/i><span style=\"font-weight: 400;\"> \u2014 clear the table INPUT<\/span><\/span><\/pre>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">iptables -F chainname<\/span><\/i><span style=\"font-weight: 400;\">\u2014 clear the table chainname<\/span><\/span><\/pre>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">iptables -X chainname<\/span><\/i><span style=\"font-weight: 400;\">\u2014 delete the table chainname<\/span><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Setting up using iptables can lead to duplicate rules in the chain. This can be avoided by using the ipset module.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">ipset\u00a0<\/span><\/li>\n<\/ul>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">ipset -N chainname iphash<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">iptables -A INPUT -p tcp -m tcp --dport 80 -m set --set chainname src -j DROP<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">while true; do tail -10000 \/var\/www\/httpd-logs\/site.com.access.log | sort | cut -f 1 -d \" \" | uniq -c | awk '($1&gt;50){print $2}' | xargs -tl -I _ ipset -A chainname _;sleep 30; done<\/span><\/i><\/span><\/pre>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">ICMP-flood\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">In this case, close icmp:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">iptables -A INPUT -p icmp -j DROP --icmp-type 8<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">You can also limit the maximum number of half-open connections from one IP to a specific port, you must first install the desired module:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">iptables -I INPUT -p tcp --syn --dport 80 -m iplimit --iplimit-above 10 -j DROP<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">The following combination can limit the maximum number of connections from one IP to a specific port:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\/sbin\/iptables\u00a0 -A INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 3 -j REJECT<\/span><\/i><\/span><\/pre>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">Apache server optimization<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">First of all, it is necessary to adjust additional parameters in the server settings:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\/etc\/httpd\/conf\/httpd.conf<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">&lt;IfModule mpm_itk_module&gt;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0StartServers\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0MinSpareServers\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0MaxSpareServers \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0MaxClients\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 150<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0MaxRequestsPerChild\u00a0 100<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">&lt;\/IfModule&gt;<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">You should to change the MaxClients value, which means the maximum number of processes, given the number of processes that will not lead to a server crash due to a shortage of RAM.Keep in mind that each Apache process takes 4-8 MB of memory, so the following command can find out how much one apache \/ httpd process takes up memory on your server and determine MaxClients from this value:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">top -d 1 | grep -E 'http|apache' | awk '{a+=$7}END{print a\/(1024*NR) \" Mb\"}'<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">You should also adjust and set the following parameters so that outdated apache processes can stop their work faster:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">Timeout\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 60<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">MaxKeepAliveRequests 50<\/span><\/i><\/span><\/pre>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-weight: 400;\">Configuring nginx as front-end for apache<\/span><\/span><\/span><\/li>\n<\/ul>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">server {<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0listen \u00a0 \u00a0 \u00a0 80;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0server_name\u00a0 examplesite.com<\/span><\/i><a href=\"http:\/\/www.examplesite.com\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"> <i><span style=\"font-weight: 400;\">www.examplesite.com<\/span><\/i><\/a><i><span style=\"font-weight: 400;\">;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0deny all;<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">WWW domain must be disabled by configuring nginx in the required virtual host. This will force nginx to issue 403 Forbidden rather than redirecting requests to the apache web server.<\/span><\/p>\n<h2 style=\"text-align: center;\"><strong><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Nginx<\/span><\/strong><\/h2>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0\u00a01.First of all, it is necessary to limit the speed of requests so that Nginx accepts incoming requests at the speed necessary for real users:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">limit_req_zone $binary_remote_addr zone=one:10m rate=30r\/m;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">server {<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\"># ...\u00a0<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0location \/index.html {<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0limit_req zone=one;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0}<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">}<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">limit_req_zone $binary_remote_addr zone=one:10m rate=30r\/m;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">server {<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\"># ...\u00a0<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0location \/example.html {<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0limit_req zone=one;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0}<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">}<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">This configuration example uses the following settings:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-weight: 400;\">limit_req_zone &#8211; the directive configures the called shared memory zone to store the status of requests for the specified key, in this case the client IP address ($ binary_remote_addr).<\/span><\/span><\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-weight: 400;\">limit_req &#8211; The directive in the location block for \/index.html refers to the shared memory zone.<\/span><\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0\u00a02.Limit the number of connections that can be opened by one client IP<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">limit_conn_zone $binary_remote_addr zone=addr:10m;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">server {\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\"># ...\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0location \/products\/ {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0limit_conn addr 10;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0}\u00a0<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">}<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">This configuration example uses the following settings:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-weight: 400;\">limit_conn_zone\u2014 The directive sets up a shared memory zone named addr to \/products requests for the specified key, in this case (as in the previous example) the client IP address, $ binary_remote_addr.<\/span><\/span><\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><span style=\"font-weight: 400;\">limit_conn\u2014 The directive in the location block for \/ products refers to the shared memory zone and establishes a maximum of 10 connections from each client IP address.<\/span><\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0\u00a03.Close slow connections<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">You can close connections that write data too infrequently, which may be an attempt to keep connections open and thus reduce the server\u2019s ability to accept new connections.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">client_header_timeout \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 30s;<\/span><\/i><\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><i><span style=\"font-weight: 400;\">client_body_timeout \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 30s;<\/span><\/i><\/span><\/pre>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">By default, this parameter is 60 seconds.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: Ubuntu, sans-serif; font-size: 12pt;\">These are currently all common measures to prevent attacks on web servers. If you encounter an attack on your web server, please save the logs for further investigation of the causes of vulnerabilities in your service.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>DDoS attack on your web server can have the most unpleasant consequences for your infrastructure. Each attack should be considered as a separate case, and in the case of DDoS on your server, we recommend involving a qualified system administrator to solve this problem. In this article we will try to consider the most basic [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[158],"tags":[],"class_list":["post-8723","post","type-post","status-publish","format-standard","hentry","category-dedicated-servers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Web server protection against DDoS attacks - Unihost.FAQ<\/title>\n<meta name=\"description\" content=\"DDoS attack on your web server can have the most unpleasant consequences for your infrastructure. Each attack should be considered as a\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Web server protection against DDoS attacks - Unihost.FAQ\" \/>\n<meta property=\"og:description\" content=\"DDoS attack on your web server can have the most unpleasant consequences for your infrastructure. Each attack should be considered as a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/\" \/>\n<meta property=\"og:site_name\" content=\"Unihost.FAQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/unihost\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-01T16:06:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-09T13:40:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unihost.com\/help\/minio.php?.\/unihost-logo-alt.png\" \/>\n\t<meta property=\"og:image:width\" content=\"250\" \/>\n\t<meta property=\"og:image:height\" content=\"141\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Unihost Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@unihost\" \/>\n<meta name=\"twitter:site\" content=\"@unihost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Unihost Support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/\"},\"author\":{\"name\":\"Unihost Support\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\"},\"headline\":\"Web server protection against DDoS attacks\",\"datePublished\":\"2020-06-01T16:06:58+00:00\",\"dateModified\":\"2023-10-09T13:40:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/\"},\"wordCount\":1064,\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"articleSection\":[\"02. Dedicated servers\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/\",\"url\":\"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/\",\"name\":\"Web server protection against DDoS attacks - Unihost.FAQ\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/#website\"},\"datePublished\":\"2020-06-01T16:06:58+00:00\",\"dateModified\":\"2023-10-09T13:40:18+00:00\",\"description\":\"DDoS attack on your web server can have the most unpleasant consequences for your infrastructure. Each attack should be considered as a\",\"breadcrumb\":{\"@id\":\"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Unihost\",\"item\":\"https:\/\/unihost.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help\",\"item\":\"https:\/\/unihost.com\/help\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Web server protection against DDoS attacks\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unihost.com\/help\/#website\",\"url\":\"https:\/\/unihost.com\/help\/\",\"name\":\"Unihost.FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unihost.com\/help\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/unihost.com\/help\/#organization\",\"name\":\"Unihost\",\"alternateName\":\"Unihost\",\"url\":\"https:\/\/unihost.com\/help\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"width\":300,\"height\":300,\"caption\":\"Unihost\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/unihost\/\",\"https:\/\/x.com\/unihost\",\"https:\/\/www.instagram.com\/unihost\/?hl=en\",\"https:\/\/www.linkedin.com\/company\/unihost-com\",\"https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\",\"name\":\"Unihost Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"caption\":\"Unihost Support\"},\"sameAs\":[\"https:\/\/unihost.com\/\"],\"url\":\"https:\/\/unihost.com\/help\/author\/support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Web server protection against DDoS attacks - Unihost.FAQ","description":"DDoS attack on your web server can have the most unpleasant consequences for your infrastructure. Each attack should be considered as a","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/","og_locale":"en_US","og_type":"article","og_title":"Web server protection against DDoS attacks - Unihost.FAQ","og_description":"DDoS attack on your web server can have the most unpleasant consequences for your infrastructure. Each attack should be considered as a","og_url":"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/","og_site_name":"Unihost.FAQ","article_publisher":"https:\/\/www.facebook.com\/unihost\/","article_published_time":"2020-06-01T16:06:58+00:00","article_modified_time":"2023-10-09T13:40:18+00:00","og_image":[{"width":250,"height":141,"url":"https:\/\/unihost.com\/help\/minio.php?.\/unihost-logo-alt.png","type":"image\/png"}],"author":"Unihost Support","twitter_card":"summary_large_image","twitter_creator":"@unihost","twitter_site":"@unihost","twitter_misc":{"Written by":"Unihost Support","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/#article","isPartOf":{"@id":"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/"},"author":{"name":"Unihost Support","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a"},"headline":"Web server protection against DDoS attacks","datePublished":"2020-06-01T16:06:58+00:00","dateModified":"2023-10-09T13:40:18+00:00","mainEntityOfPage":{"@id":"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/"},"wordCount":1064,"publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"articleSection":["02. Dedicated servers"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/","url":"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/","name":"Web server protection against DDoS attacks - Unihost.FAQ","isPartOf":{"@id":"https:\/\/unihost.com\/help\/#website"},"datePublished":"2020-06-01T16:06:58+00:00","dateModified":"2023-10-09T13:40:18+00:00","description":"DDoS attack on your web server can have the most unpleasant consequences for your infrastructure. Each attack should be considered as a","breadcrumb":{"@id":"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/unihost.com\/help\/web-server-protection-against-ddos-attacks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Unihost","item":"https:\/\/unihost.com\/"},{"@type":"ListItem","position":2,"name":"Help","item":"https:\/\/unihost.com\/help\/"},{"@type":"ListItem","position":3,"name":"Web server protection against DDoS attacks"}]},{"@type":"WebSite","@id":"https:\/\/unihost.com\/help\/#website","url":"https:\/\/unihost.com\/help\/","name":"Unihost.FAQ","description":"","publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unihost.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/unihost.com\/help\/#organization","name":"Unihost","alternateName":"Unihost","url":"https:\/\/unihost.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","width":300,"height":300,"caption":"Unihost"},"image":{"@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/unihost\/","https:\/\/x.com\/unihost","https:\/\/www.instagram.com\/unihost\/?hl=en","https:\/\/www.linkedin.com\/company\/unihost-com","https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw"]},{"@type":"Person","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a","name":"Unihost Support","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","caption":"Unihost Support"},"sameAs":["https:\/\/unihost.com\/"],"url":"https:\/\/unihost.com\/help\/author\/support\/"}]}},"_links":{"self":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/8723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/comments?post=8723"}],"version-history":[{"count":4,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/8723\/revisions"}],"predecessor-version":[{"id":16352,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/8723\/revisions\/16352"}],"wp:attachment":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/media?parent=8723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/categories?post=8723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/tags?post=8723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}