воскресенье, 18 мая 2014 г.

Быстрое удаление правила iptables по его номеру

Вывод правил цепочки INPUT с указанием номеров:
$ iptables -L INPUT --line-numbers
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    DROP       tcp  --  anywhere             anywhere             tcp dpt:http STRING match  "/forbot" ALGO name kmp TO 65535
2    DROP       tcp  --  anywhere             anywhere             tcp dpt:http STRING match  "/tobot" ALGO name kmp TO 65535
3    DROP       tcp  --  anywhere             anywhere             tcp dpt:http STRING match  "save" ALGO name kmp TO 65535

Удаление правила с указанным номером:
$ iptables -D INPUT номер_правила

Комментариев нет: