iptables command

NAME 
       iptables - Administration Tool for IPv4 Packet Filtering and NAT 

SYNOPSIS 
       iptables -ADC specified chain rule [-A -D add delete modify -C]  
iptables - RI 
iptables -D catena alberghiera rule NUM [the Option] 
iptables -LFZ chain name [options] 
iptables - [NX] Specifies chain 
iptables -P catena alberghiera target [Options] 
iptables -E-catena alberghiera Old-new new name-name-catena alberghiera

parameter

 -A -append
    add one or more rules selected at the end of the chain. When the source (address) or / and destination (address) into more than (s) of an address, this rule will be applied to all possible addresses (in combination) below.
 -D -delete
    delete one or more rules from the selected chain. This command allows two methods: delete rules can be specified as the number of the chain (the first number is 1), or specify the rule to match.
 -R -replace
    substituents selected from a chain rule. If the source (address) or / and destination (address) is converted into a multi-address, the command fails. Rule No. 1 from the start.
 -I -insert
    insert one or more rules according to the selected chain rule number given. Therefore, if the rule number is 1, the rule will be inserted into the head of the chain. It also does not specify when the default rule number.
 -L -list
    displays all the rules of the selected chains. If no chain is selected, all chains will be displayed. Can also be used with z option, then the chain will automatically be listed and zero. The exact output is affected by the other parameters given.
 -F -flush
    emptying the selected chains. This is equivalent to deleting all the rules one by one.
 -Z -zero
    the packet and byte counters of all the empty chain. It can be used in conjunction with -L, unprecedented look at the counter in the clear, please see above.
 -N -new-chain
    to create a new user-defined chain according to given names. It must ensure that there is no chain of the same name.
 -X -delete-chain
    Delete the specified user-defined chain. The chain must not be quoted, if referenced, before deleting you must delete or replace the rules relating thereto. If no argument is given, this command will attempt to delete every non-built-in chains.
 -P -policy
    setting goals rule chain.
 -E -rename-chain
    of the specified chain under the name given by the user to rename, this is merely modification has no effect on the structure of the entire table. TARGETS parameter gives a legitimate target. Only non-user-defined chain can use the rule, and built-in and user-defined chain chain can not be objective rules.



 

Guess you like

Origin www.cnblogs.com/imcati/p/11455974.html