独学而无友,则孤陋而寡闻!
分类: BSD
2011-01-05 15:13:39
结构:
ipfw做nat和pipe,em0接外网,em1接内网。
规则:
在内网网卡em1上做的pipe
在外网网卡em0上做nat
现象:
在em0上做deny udp log规则,发现大量内网对外网的数据包。
但用tcpdump,则抓不到这些udp包
在外网网卡前接了一台交换机做端口镜像,也未发现这些udp包。
总结:
ipfw有bug,本人英文不好,只等有人提交。
实例:
00500 1427266 1507125876 pipe 10 ip from any to 172.16.0.0/16 out via em1
00600 991873 307167807 pipe 20 ip from 172.16.0.0/16 to any in via em1
00931 0 0 deny log logamount 200 udp from any not 53,161 to any not dst-port 53,161 in via em1
00932 0 0 deny log logamount 200 udp from any not 53,161 to any not dst-port 53,161 out via em1
00940 6466 490695 deny log logamount 2000 udp from any not 53,161 to any not dst-port 53,161 in via em0
00941 20803 2562337 deny log logamount 2000 udp from any not 53,161 to any not dst-port 53,161 out via em0
00945 0 0 deny udp from any not 53,161 to any not dst-port 53,161 via em0
00950 0 0 deny udp from any not 53,161 to any not dst-port 53,161
00961 0 0 deny log logamount 200 udp from any not 53,161 to any not dst-port 53,161 in via em1
00962 0 0 deny log logamount 200 udp from any not 53,161 to any not dst-port 53,161 out via em1
01000 969141 302656510 nat 10 ip from 172.16.0.0/16 to any out via em0
02000 1597013 1629202239 nat 10 ip from any to 1.2.3.4 in via em0