iptables TEE target
Linuxでポートミラーリングできないのかと調べていたら、
iptablesのTEEターゲットが見つかったので使えるか試してみた。
Linuxカーネル 2.6.35 から加えられた機能。
・http://kernelnewbies.org/Linux_2_6_35
・http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e281b19897dc21c1071802808d461627d747a877
iptablesでは1.4.8からサポートされてる。
・http://netfilter.org/projects/iptables/files/changes-iptables-1.4.8.txt
以前はiptablesのROUTEターゲットパッチに、似たような機能があったらしい。
・http://lists.netfilter.org/pipermail/netfilter-devel/2004-November/017515.html
以下、iptablesのmanからの引用(iptables 1.4.12)
TEE The TEE target will clone a packet and redirect this clone to another machine on the local network segment. In other words, the nexthop must be the target, or you will have to configure the nexthop to forward it further if so desired. --gateway ipaddr Send the cloned packet to the host reachable at the given IP address. Use of 0.0.0.0 (for IPv4 packets) or :: (IPv6) is invalid. To forward all incoming traffic on eth0 to an Network Layer logging box: -t mangle -A PREROUTING -i eth0 -j TEE --gateway 2001:db8::1
※ iptables-1.4.12/extensions/libxt_TEE.cの中を見てみると、
oifオプションというのが確認できるが使い方がよくわからない。
User Mode Linux の設定
Linuxカーネルモジュールの作成や、カーネルデバッグするときによく使うので使い方をメモメモ。
環境: Ubuntu 12.04 32bit on VMware (Windows7 64bit)
本家サイト
・The User-mode Linux Kernel Home Page
参考になるサイト(古い)
・User Mode Linux HOWTO
■
近々書く予定