LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 10-25-2011, 05: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, 08:19 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,245

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
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 08: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


Similar Threads
Thread Thread Starter Forum Replies Last Post
monitoring packets ssh utesh Linux - Enterprise 3 03-15-2010 07:06 PM
accepting packets on port 80 alsharifhoussam Linux - Server 4 05-04-2009 03:29 AM
TX/RX packets through a specific port? WorldBuilder Linux - Networking 3 01-02-2008 11:25 AM
Monitoring Packets And More eklitzke Linux - Networking 2 03-03-2005 11:47 AM
Tunnelling Packets thru port 80 or 21 StalkerGT Linux - Networking 2 11-29-2003 02:20 PM


All times are GMT -5. The time now is 11:41 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration