我在'云'上的日子 - Zeek(部署)
Optional Dependencies
PF_RING
参考:
1 | $ sudo git clone https://github.com/ntop/PF_RING.git |
Load pf_ring at boot
1 | $ echo 'pf_ring' >> /etc/modules |
GeoLocation
参考:
1 | $ sudo apt-get install libmaxminddb-dev |
Testing
如果未找到任何内容或未设置mmdb_dir
,则Zeek
按以下顺序查找位置数据库文件:
1 | $ zeek -e "print lookup_location(8.8.8.8);" |
- /usr/share/GeoIP/GeoLite2-City.mmdb
- /var/lib/GeoIP/GeoLite2-City.mmdb
- /usr/local/share/GeoIP/GeoLite2-City.mmdb
- /usr/local/var/GeoIP/GeoLite2-City.mmdb
- /usr/share/GeoIP/GeoLite2-Country.mmdb
- /var/lib/GeoIP/GeoLite2-Country.mmdb
- /usr/local/share/GeoIP/GeoLite2-Country.mmdb
- /usr/local/var/GeoIP/GeoLite2-Country.mmdb
如果出现 “Zeek was not configured for GeoIP support”, 源码安装时需要指定./configure --with-geoip=/usr/share/GeoIP
Gperftools
参考:
1 | $ sudo git clone https://github.com/gperftools/gperftools.git |
IPsumdump
参考:
1 | $ curl -O http://www.read.seas.harvard.edu/~kohler/ipsumdump/ipsumdump-1.86.tar.gz |
Krb5
参考:
1 | $ sudo apt-get install krb5-user |
Jemalloc
参考:
1 | $ sudo git clone https://github.com/jemalloc/jemalloc.git |
Zeek
Required Dependencies
1 | # Ubuntu |
If your system uses Python 2.7, then you will also need to install the python-ipaddres
package.
1 | $ sudo apt-get install python-ipaddress |
参考:
1 | $ git clone --recursive https://github.com/zeek/zeek |
确保Zeek
正确链接到所需的libpcap
库:
1 | $ ldd /usr/local/zeek/bin/zeek | grep pcap |
Add PATH
1 | $ export PATH=/usr/local/zeek/bin:$PATH |
Using PF_RING
1 | $ vim /usr/local/zeek/etc/node.cfg |
Enable Json
1 | $ vim /usr/local/zeek/share/zeek/site/local.zeek |
压测
1 | $ zeekctl netstats; date |
1 | $ zeekctl top; date |
1 | $ zeekctl capstats; date |