Monday 11 June 2012

Monitoring tcp connections using Tcptrack

Install Tcptrack to monitor TCP connections. Tcptrack is an excellent tool to monitor your server network connections and bandwidth quickly, installation is pretty easy and can be done either via rpm or source.

# cd /usr/src/

# wget http://packages.sw.be/tcptrack/tcptrack-1.1.5-1.2.el5.rf.i386.rpm

# rpm -ivh tcptrack-1.1.5-1.2.el5.rf.i386.rpm

 OR

 # tar zxvf tcptrack-1.3.0.tar.gz

 # cd tcptrack-1.3.0

 # ./configure ; make & make install

 tcptrack -h
 
 TCPtrack can monitor only one nic at once with only one parameter to run (if you have two nic ie.. eth0 & eth1 )

    # tcptrack -i eth0
   # tcptrack -i eth1

 
The following example will only show connections from host 68.36.45.78:

    # tcptrack -i eth0 src or dst 68.36.45.78

To monitor the specific ports (ie..port 80 and 22):

    # tcptrack -i eth0 port 80
   # tcptrack -i eth0 port 22



No comments:

Post a Comment