CentOS completely disables access from an IP address

Source: Internet
Author: User
Completely prohibit access to an IP address: # The command to shield a single IP address is the iptables-IINPUT-s123.45.6.7-jDROP # block the entire segment from 123.0.0.1 to 123.255.2

Completely prohibit access from an IP address:

  1. # The command to shield a single IP address is

    Iptables-I INPUT-s 123.45.6.7-j DROP

     

  2. # The Command for sealing the entire segment from 123.0.0.1 to 123.20.255.254

    Iptables-I INPUT-s 123.0.0.0/8-j DROP

     

  3. # An IP address segment is a command from 123.45.0.1 to 123.45.255.254.

    Iptables-I INPUT-s 124.45.0.0/16-j DROP

     

  4. # The Command from 123.45.6.1 to 123.45.6.254 is

    Iptables-I INPUT-s 123.45.6.0/24-j DROP

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.