Commands for the IPTABLES command structure

Source: Internet
Author: User
Tags builtin

The Iptables command is listed below:

--append:-A adds rule-specifications specified rules to the end of the rule chain chain. If the grouping matches all of the rules in the rule-specifications, then target targets will handle it.

IPTABLES-A chain Rule-specifications--jump Target

--delete:-D removes one or more rules from the rule chain chain, rule-numbers or rule-specifications specifies the rule to be deleted.

iptables-d Chain Rule-numbers | Rule-specifications

--insert: -I adds the rules specified by Rule-specifications and target to the rule chain, rule-number specifies the insertion position. If Rule-number is not specified, it defaults to 1, which is the head of the rule chain.

Iptables-i chain Rule-number rule-specifications--jump Target

--replace:-R replaces the rules in the rule chain chain with the numbers Rule-number in Rule-specification and target. If rule-number or rule-specification resolves to multiple addresses, this command will fail.

Iptables-r chain Rule-number rule-specification--jump Target

--list:-L displays rules in the rule chain chain. If you miss chain, you will see the rules for all rule chains. Use--line-numbers to display the rule number.

Iptables-l [Chain] Display-criteria

--flush:-F removes all rules from the rule chain chain. If chain is omitted, all rules in all chains will be deleted.

Iptables-f [Chain]

--zero:-z resets all packet counts and byte counts in the rule chain chain to zero, and if no chain is specified, the count of all rule chains is zeroed. You can use-l to display these counters before you clear 0.

IPTABLES-Z[-L] [chain]

--delete-chain:-x removes the user-defined rule chain named chain. If chain is not specified, all user-defined rule chains are removed. If you have a target that points to a chain of rules, you cannot delete it.

Iptables-x Chain

--policy:-P sets the default target or policy builtin-target for the built-in rule chain builtin-chain. The policy is applied to groupings that cannot match any rules in the chain of rules. If the rule chain does not have a policy, then the matching grouping is accepted (accept).

Iptables-p Builtin-chain Builtin-target

--rename-chain:-e to change the name of the rule chain from old to new.

IPTABLES-E Old New

--help:-H Displays summary information for the iptables command syntax.

Iptables-h


Commands for the IPTABLES command structure

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.