1
coderwang Jul 17, 2014
iptables-save > xxx
vim xxx iptables-restore < xxx |
2
zent00 Jul 17, 2014
直接用 -I 吧。
|
3
bigporker Jul 17, 2014
我都是直接编辑 /etc/sysconfig/iptables 的
|
4
Roboo Jul 17, 2014 via Android
好像是 -n 2
默认是插入第一行 看下帮助信息 |
5
DiveIntoEyes Jul 17, 2014
First check the line number:
iptables -nL --line-numbers Delete based on line: iptables -D INPUT {line} Insert where you would like it to be: |
6
DiveIntoEyes Jul 17, 2014
|
9
Navee OP @DiveIntoEyes 这种也是先删掉,然后插入,不过谢谢你的答案,让我知道了可以指定插入行.
|
10
leavic Jul 17, 2014
iptables -I [链名] [规则号] [规则]
规则号就是你要的 |
11
onemoo Jul 17, 2014
我是把iptables配置写成脚本,直接在脚本里编辑规则。没用过行号功能。
|