- 论坛徽章:
- 0
|
我想用tcpdump抓取Zabbix的数据库MySQL的数据包。
但原来的Zabbix Server里配置文件用的socket方式连接到MySQL,- # egrep 'DBHost=' zabbix_server.conf
- DBHost=localhost
复制代码 无论是监听eth0或者lo都无法抓到数据包。1.这个问题要怎么解决啊?
后面更改DBHost为本机IP后,- egrep 'DBHost=' zabbix_server.conf
- DBHost=10.31.74.105
复制代码 监听eth0无法抓到数据包,监控lo可以抓到数据包。2.这是为什么呢?我的10.31.74.105是配置在eth0上的啊
网卡信息:- # ifconfig
- eth0 Link encap:Ethernet HWaddr 00:0C:29:06:B3:E5
- inet addr:10.31.74.105 Bcast:10.31.74.255 Mask:255.255.255.0
- inet6 addr: fe80::20c:29ff:fe06:b3e5/64 Scope:Link
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:316066 errors:0 dropped:0 overruns:0 frame:0
- TX packets:308105 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:66589493 (63.5 MiB) TX bytes:42328318 (40.3 MiB)
- lo Link encap:Local Loopback
- inet addr:127.0.0.1 Mask:255.0.0.0
- inet6 addr: ::1/128 Scope:Host
- UP LOOPBACK RUNNING MTU:65536 Metric:1
- RX packets:4194045 errors:0 dropped:0 overruns:0 frame:0
- TX packets:4194045 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:215066750 (205.1 MiB) TX bytes:215066750 (205.1 MiB)
复制代码 监听lo的抓包信息- # tcpdump -i lo -s 0 -l -w - dst port 3306 | strings
- tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
- 2WLX
- O{AK
- select escalationid,actionid,triggerid,eventid,r_eventid,nextcheck,esc_step,status,itemid from escalations order by actionid,triggerid,itemid,escalationidr
- 2WYZ
- 2W?^
复制代码 监听eth0无法抓到数据包- # tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings
- tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
复制代码 |
|