Parsing Situs Didalam log Squid Debian 9

0
Foto: Shutterstock By jivacore

Jadi ini cuma iseng aja gimana caranya untuk tahu IP A atau B akses kemana saja dan berapa kali mereka akses? kalo kamu pake squid dan debian 9 maka perintah ini mungkin cocok

tested:
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.6 (stretch)
Release:        9.6
Codename:       stretch

dan kayanya untuk squid dia engak lama simpan lognya terbaru ada di /var/log/squid/access.log dan untuk berkutnya ada di /var/log/squid/access.log.1


~$ grep 192.168.0.135 /var/log/squid/access.log.1 |awk ‘$7 ~ /\.(com|net|org)/{split($7,f,”/”);print f[3]}’ |sort|uniq -c | sort -k1,1n

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments