LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-24-2020, 04:11 AM   #1
Helia
LQ Newbie
 
Registered: Apr 2020
Posts: 3

Rep: Reputation: Disabled
Looking for simplistic network traffic logger


I am looking for a tool that will log network traffic, preferably in an easily understandable way like, say, nethogs.

What I want is to start network logging at boot time, then look at it some time later to get a comprehensive overview about which applications did what.

Unfortunately nethogs does not provide logging.
I also looked at ntopng, but it seems way too complicated for my needs, and seems to focus on real-time overview in a browser.
I also looked at various solutions on stackoverflow etc., with e.g. netstat, but again this does not seem to address logging.

In a word, the application's output would need to be simplistic enough for me to understand.

A network monitoring tool that was made with logging in mind, maybe?
 
Old 04-24-2020, 04:29 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
iptraf can log. It only shows traffic per address and port, not application (I think). You would have to derive the application from address:port.

Last edited by berndbausch; 04-24-2020 at 04:30 AM. Reason: format
 
Old 04-24-2020, 02:51 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,023

Rep: Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632
Wireshark might be something to look at. It won't be able to translate network to socket/application.

I guess there is some way to view by program that I don't know about. I'd be tempted to use some sort of vm or jail to capture an applications traffic.
Last link has many tools.

https://www.slashroot.in/find-networ...-process-linux
https://www.cyberciti.biz/faq/linux-...ing-bandwidth/
https://www.tecmint.com/linux-networ...itoring-tools/

Last edited by jefro; 04-24-2020 at 02:55 PM.
 
Old 04-24-2020, 02:59 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,116

Rep: Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368
I would suggest wireshark too. Just wanted to note: to analyze network traffic you need to be familiar with it. It cannot be really simple, because it is relatively complex (by its nature). WireShark organizes the captured data in a "user friendly" way and there are a lot of possibilities to filter out unnecessary traffic/info.
 
Old 05-07-2020, 05:25 AM   #5
Helia
LQ Newbie
 
Registered: Apr 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for all your help and sorry for the late reply.

I understand that network traffic is very complex - way too complex for me.
That's why I like the way e.g. nethogs works: it shows you which application accesses which address/IP.

I'm not so interested in bandwidth or how much data is transmitted, just who (i.e. which application) connects to who - especially unbidden!

I would like to have something as simple as that, but with logging - which nethogs does not mention at all in its documentation.
 
Old 05-08-2020, 09:33 AM   #6
EagleTG
LQ Newbie
 
Registered: May 2020
Posts: 4

Rep: Reputation: Disabled
Netstat? For example, netstat -pant will show TCP connections...

I also really like iftop for bandwidth and overall connections, but that doesn't seem to apply in your case.

Edit: I just realized you mentioned netstat in your post. Duh.

Maybe auditctl? You can try auditctl -A exit,always -S connect
This writes logs at /var/log/audit/audit.log

Last edited by EagleTG; 05-08-2020 at 09:38 AM. Reason: I'm dumb. Reading comprehension issue.
 
Old 05-11-2020, 12:16 AM   #7
//////
Member
 
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: Arch Linux && OpenBSD 7.4 && Pop!_OS && Kali && Qubes-Os
Posts: 824

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
i use darkstat.
here is example pic of it.

https://i.imgur.com/jgsHDGw.png

https://www.ctrl.blog/entry/fedora-darkstat.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Decibel Audio Player 1.0 - Simplistic Music Player for GNOME LXer Syndicated Linux News 0 07-19-2009 10:20 PM
System logger & Kernel logger service start twice? quanta Fedora 0 12-07-2007 06:09 AM
I need a simplistic file manager cupoftea Linux - Software 14 05-28-2006 06:45 AM
passwd: Bad password, too simplistic ??? qwijibow Linux - Security 2 02-05-2005 04:58 PM
Looking for a shell logger CroMagnon Linux - Software 1 09-13-2004 09:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration