いつも忘れるので、memo。。。
iptables -I Chain rulenum(位置)
まずは、位置を確認
$ iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
例)インサートコマンド(-I)で Chain INPUTの4番目に挿入する場合
$ iptables -I INPUT 4 -p tcp --dport 80 -j ACCEPT