iptables command a list of commonly used commands

Command -A, --append
example iptables -A INPUT ...
Description new rule to a chain rule, the rule will be the last rule in the rule chain.

Command -D, --delete
example iptables -D 80 --dport the INPUT -j DROP
iptables -D the INPUT 1
instructions to delete a rule from the chain rule, you can enter the full rules, or directly specify a rule number to be deleted.

Command -R, --replace
example iptables -R INPUT 1 -s 192.168.0.1 -j DROP
described substituted existing rules, the rules will not be substituted and change the order.

Command -I, --insert
Example iptables 1 --dport 80 -j ACCEPT -I INPUT
described insert a rule, the rule on the original location will be moved backward a pick.

Command -L, --list
Example 1 iptables -L INPUT
description lists all the rules in a rule in the chain.
Example 2 iptables -t nat -L
instructions listed nat form All the rules in all chains.

Command -F, --flush
example iptables -F INPUT
instructions to remove the filter table all the rules in the INPUT chain.

Command -Z, --zero
example iptables -Z INPUT
illustrate the packet counter to zero. Packet counters are used to calculate the number of occurrences of the same packet, it is an indispensable tool for blocking the attack filter.

Command -N, --new-chain
example iptables -N allowed
explain the new rules defined chain.

Command -X, --delete-chain
example iptables -X allowed
the instructions to remove a rule chain.

Command -P, --policy
example iptables -P INPUT DROP
instructions defined filtering policy. That is not in line with the conditions of packet filtering, the default approach.

Command -E, --rename-chain
example iptables -E allowed disallowed
instructions to modify the name of a custom rule chains.

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11130204.html