Home >Backend Development >PHP Tutorial >Method reference for preventing DDoS malicious attacks in PHP

Method reference for preventing DDoS malicious attacks in PHP

WBOY
WBOYOriginal
2016-07-25 08:57:142092browse
This article introduces a simple method to prevent DDoS attacks in PHP programming. Friends in need can refer to it.

We know that denial of service attacks, that is, DDOS attacks, will cause bandwidth to be occupied, making it impossible for normal users to access the website.

Here is a simple reference method to modify the php.ini file

1) "disable_functions" is changed to gzinflate, the default is to empty 2) Set "allow_url_fopen" to Off 3) php_sockets.dll Open this module

Restart to make the configuration take effect, which can generally resist DDOS attacks. For more complete prevention methods, please refer to the article: DDOS attack and prevention code under php

If the above methods cannot resist it, you can also prevent malicious attacks through IP policies, firewalls and other means.

For related content, you can refer to the following articles: 1. IPSEC security policy configuration Batch script to enable IPSEC ports in batches Introduction to the method of setting IPsec security policy in batches Detailed explanation of how to block ports with IPSec under the command line Malicious ports that need to be blocked with ipsec in win2003 win2003 IPsec security policy closing port 2. Firewall configuration How to open, close and open specified ports in CentOS firewall iptables firewall prohibits certain IPs from accessing ssh service Sharing examples of iptables firewall configuration in Linux Configuration method of iptables firewall in centos iptables firewall configuration example



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn