Linux banned IP

Source: Internet
Author: User

Can directly service configuration nginx.conf

Add Deny+ip for example:

Block a single IP

Deny 106.5.76.83;

#封整个段即从123.0.0.1 to 123.255.255.254 command
Deny 123.0.0.0/8
#封IP段即从123.45.0.1 to 123.45.255.254 command
Deny 124.45.0.0/16
#封IP段即从123.45.6.1 to 123.45.6.254 command is
Deny 123.45.6.0/24

Restart the Nginx service./nginx-s Reload

can also be banned in the TCPD server configuration

/etc/hosts.deny

Block a single IP

all:106.5.76.83;

#封整个段即从123.0.0.1 to 123.255.255.254 command

All:123.0.0.0/8

#封IP段即从123.45.0.1 to 123.45.255.254 command

All:124.45.0.0/16

#封IP段即从123.45.6.1 to 123.45.6.254 command is

All:123.45.6.0/24

Restart Service xinetd Restart

Linux banned IP

Related Article

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.