Common iptables commands (1)

Source: Internet
Author: User

Below is my summaryIptablesCommonCommand:

Command-A, -- append

Example iptables-a input...

It indicates that a new rule is added to a Rule refining, And the rule will become the last rule in the Rule refining.

Command-D, -- delete

Example iptables-d input -- dport 80-j DROP

Iptables-d input 1

This indicates that a rule can be deleted from a rule refining process. You can enter a complete rule or directly specify a rule number to delete it.

Command-R, -- replace

Example iptables-r input 1-s 192.168.0.1-j DROP

It indicates that the current rule is replaced, and the order of the rule is not changed after it is replaced.

Command-I, -- insert

Example iptables-I INPUT 1 -- dport 80-j ACCEPT

It indicates that a rule is inserted. The rule at the specified position will move a forward position.

Command-L, -- list

Example iptables-L INPUT

Lists All rules in a rule.

Command-F, -- flush

Example iptables-F INPUT

Delete all rules in a rule refining.

Command-Z, -- zero

Example iptables-Z INPUT

This indicates that the packet counter is set to zero. The packet counter is used to calculate the number of occurrences of the same packet and is an indispensable tool for filtering block attacks.

Command-N, -- new-chain

Example iptables-N allowed

Define new rules.

Command-X, -- delete-chain

Example iptables-X allowed

Delete a rule.

Command-P, -- policy

Example iptables-P INPUT DROP

Define a filter policy. That is, the default Processing Method for packets that do not meet the filtering conditions.

Command-E, -- rename-chain

Example iptables-E allowed disallowed

Modifies the name of a custom rule.


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.