# Network traffic logging



## boot0user (Mar 21, 2012)

Hello!

How to get additional info about client traffic that going t*h*rough my router under the FreeBSD 9.0, i.e not only source/destination IP, but URLs? I didn't wan't to use squid, because there is no need. Want to log extended info to the file. Is it possible?

Thanks.


----------



## Ajira (Mar 21, 2012)

You can do that with TCPDUMP(1). If i'm not mistaken you'd want something like

[CMD=""]tcpdump -A 'gateway x.x.x.x and (dst port http)'[/CMD]

Where x.x.x.x is your server's IP. Look at PCAP-FILTER(7) for the syntax of the expression / filter.


----------



## boot0user (Mar 21, 2012)

Probably, *I* need to run tcpdump as job?

Is there are any other solutions?


----------



## SirDice (Mar 21, 2012)

security/dsniff contains a tool called urlsnarf(8).


----------

