LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 10-25-2011, 04:42 AM   #1
militiaware
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
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Kubuntu
Posts: 1,189

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
You can use iptables for this, something like:
Code:
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.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 03:09 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration