Accueil > Réseau > Monitor TCP Traffic on specific port

Monitor TCP Traffic on specific port

30/11/2015 Categories: Réseau Tags:

Source: superuser.com

I’ve searched quite extensively for this, but cannot seem to come up with a working example.

My objective is to monitor TCP traffic on a specific port to see incoming connections and write them to a text file. The catch is I also need a timestamp on each row to show exactly when the client connected down to the second.

I’ve already exhausted netstat, nmap, and tcptrack, but none support timestamp.

I was thinking a linux shell script might work if I monitored a specific local port and wrote text to a file when a connection is made then just concatenate the date on each line.

I was playing with this:

netstat -ano|grep 443|grep ESTABLISHED

as well as this:

tcptrack -i eth0 port 443

but neither suit my needs as I need the time the connection comes in at.

Print Friendly, PDF & Email

Related Post

Categories: Réseau Tags:
  1. Mandrake
    30/11/2015 à 18:11 | #1

    tcpdump port 443 and ‘(tcp-syn|tcp-ack)!=0’

    or only tcp-syn, or only tcp-ack (my guess would be that one), depending on what you need.

Les commentaires sont fermés.