Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-25-2011, 04:42 AM   #1
LQ Newbie
Registered: Jul 2008
Posts: 2

Rep: Reputation: 0
Monitoring Packets Over an Open Port

I want to create a shell script that shows the size of transmitted data (sent and received) over a specific port! How is that possible?
Old 10-25-2011, 07:19 AM   #2
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
You can use iptables for this, something like:
iptables -N tcp_s80
iptables -A OUTPUT -p tcp --sport 80 -j tcp_s80
#and to read data (how many bytes/packets went by your port 80)
iptables -L -v
but every port need own rule, so it can slow down your network if you want to trace many ports. Other method is using "ntop" daemon.

Last edited by eSelix; 10-25-2011 at 07:21 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
monitoring packets ssh utesh Linux - Enterprise 3 03-15-2010 06:06 PM
accepting packets on port 80 alsharifhoussam Linux - Server 4 05-04-2009 02:29 AM
TX/RX packets through a specific port? WorldBuilder Linux - Networking 3 01-02-2008 10:25 AM
Monitoring Packets And More eklitzke Linux - Networking 2 03-03-2005 10:47 AM
Tunnelling Packets thru port 80 or 21 StalkerGT Linux - Networking 2 11-29-2003 01:20 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:28 PM.

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