Похож это не выполнимо. Я попробовал в лабораторию его, и вторичный DHCP перестал работать с ошибками в системном журнале о том, чтобы не быть позволенным обновить зону.
As you have already realised, iptables can perform certain actions (drop/reject/accept) on certain conditions (IP/port/protocol/etc). You can have your iptables file organised in a similar way as to what you just described in your shell script example.
I think you can either operate on iptables/netfilter extensions/modules as to define actions for given scenarios (Rejects on certain IPs, accepts on others etc.), writing them in specific order (like in your shell script). I am not sure what exact actions you want to perform and at what conditions, but you may try checking for extensions here: Netfilter Extensions HOWTO , а также XTables-Addons
Также было обсуждение severfault, как ввести дополнительные задержки с помощью tc
, если они вам нужны. .