IPv4のDNS udpパケットの再帰、非再帰問い合わせのRDフラグは、
31byte目にあるので下記で実現できた。
最初の 20byte は ipヘッダ、
その次の 8byte は udpヘッダ
特定のネットワークからの再起問い合わせをタイムアウトさせたい時に使う。
1.非再帰問い合わせの DROP
-A INPUT -m string --hex-string "|00000001|" --algo bm --from 30 --to 34 -p udp --dport 53 -j DROP
2.再帰問い合わせの DROP
-A INPUT -m string --hex-string "|01000001|" --algo bm --from 30 --to 34 -p udp --dport 53 -j DROP