iptables

下面来源于 man iptables 的翻译

iptables默认有四个表:

nat filter(default) raw mangle

每个表下面有相应的链,如:

filter(input output  forward )

nat   (prerouting  postrouting output)

raw   (output prerouting postrouting)

mangle (forward input output prerouting  postrouting)


 --append  -A chain            Append to chain

增加一条规则到链中

  --check   -C chain            Check for the existence of a rule

检查链中规则是否存在

  --delete  -D chain            Delete matching rule from chain

删除链中规则

  --delete  -D chain rulenum

                                Delete rule rulenum (1 = first) from chain

删除链中的某条规则

  --insert  -I chain [rulenum]
                                Insert in chain as rulenum (default 1=first)

插入链中

  --replace -R chain rulenum

                                Replace rule rulenum (1 = first) in chain

替换

  --list    -L [chain [rulenum]]

                                List the rules in a chain or all chains

查看iptables所有列表  

--list-rules -S [chain [rulenum]]

                                Print the rules in a chain or all chains

  不懂

--flush   -F [chain]          Delete all rules in  chain or all chains

删除所有的链

  --zero    -Z [chain [rulenum]]

                                Zero counters in chain or all chains

不懂 

  --new     -N chain            Create a new user-defined chain

创建新的链

  --delete-chain
            -X [chain]          Delete a user-defined chain

删除一条用户定义的链 

 --policy  -P chain target

                                Change policy on chain to target

改变policy

  --rename-chain

            -E old-chain new-chain
                                Change chain name, (moving any references)

对链重命名

Options:

[!] --proto     -p proto        protocol: by number or name, eg. `tcp'

制定协议

[!] --source    -s address[/mask][...]
                                source specification
[!] --destination -d address[/mask][...]
                                destination specification
[!] --in-interface -i input name[+]
                                network interface name ([+] for wildcard)
 --jump -j target
                                target for rule (may load target extension)
  --goto      -g chain
                              jump to chain with no return
  --match       -m match
                                extended match (may load extension)

  --numeric     -n              numeric output of addresses and ports

制定编号

[!] --out-interface -o output name[+]
                                network interface name ([+] for wildcard)
  --table       -t table        table to manipulate (default: `filter')
  --verbose     -v              verbose mode
  --line-numbers                print line numbers when listing
  --exact       -x              expand numbers (display exact values)
[!] --fragment  -f              match second or further fragments only
  --modprobe=<command>          try to insert modules using this command
  --set-counters PKTS BYTES     set the counter during insert/append
[!] --version   -V              print package version.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值