Prevent PHPDDOS packets

Source: Internet
Author: User

I had a friend who rented a KT server in the miguo data center. As a result, the server was hacked, sent out a packet, and was dismounted.
The following describes how to prevent PHP from sending DDOS packets.
If (eregi ("ddos-udp", $ read )){
Fputs ($ verbinden, "privmsg $ Channel: ddos-udp-started udp flood-$ read2 [4]");
$ Fp = fsockopen ("udp: // $ read2 [4]", 500, $ errno, $ errstr, 30 );
If (! $ Fp)
{

$ Fp = fsockopen ("udp: // $ read2 [4]", 500, $ errno, $ errstr, 30 );
Since fsockopen is used for external requests, it is not allowed to request
Set in php. ini
Allow_url_fopen = Off
In this case, he can still send packets.
Extension = php_sockets.dll
Change
; Extension = php_sockets.dll
Restart APACHE, IIS, and NGINX
This prevents php ddos packets.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.