Monitoring network connection states with Zabbix (+ iptables + iptstate)
This is a little howto about displaying some small n’ nice graphs regarding to network connections of your machine. In the way of “Nothing is silly if it involves getting graphs” , the goal of this article is to get a realtime graph showing numbers of current server connections according to protocols and current TCP states : Certainly worh at least for displaying SYN flood attacks. Here is the recipe: 1. iptables, iptstate , zabbix server/agent 2. iptables Zabbix template 3. monitoring scripts We need to get the template from point 2. and import it to Zabbix sever. Once we have a possibility to display TCP states and type of connections, this is how we can fill it with some data: /etc/zabbix_agentd.conf: UserParameter= iptstate.tcp , /etc/zabbix/scripts/net-tcp UserParameter= iptstate.tcp.syn , /etc/zabbix/scripts/net-syn UserParameter= iptstate.tcp.timewait , /etc/zabbix/scripts/net-time-wait UserParameter= iptstate.tcp.established , /etc/zabbix/scripts...