LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-17-2005, 06:30 AM   #1
jwijesundra
Member
 
Registered: Jun 2004
Posts: 52

Rep: Reputation: 15
monitor network packets


how can i monitor all packets coming in and going out of my pc?
also how can i enable a port using iptables.
 
Old 01-18-2005, 12:27 PM   #2
intranet_man
LQ Newbie
 
Registered: Dec 2004
Distribution: RHEL 3/4, Fedora 3, dynebolic, Knoppix
Posts: 23

Rep: Reputation: 15
Logging

It would depend upon what packages you have installed on your system. A good place to start for packet monitoring is www.ethereal.com. If you are using Red Hat the package may already be installed, so type ethereal at the prompt. If you prefer command line options try running ethereal -h or man ethereal .

You may also want to try Cricket if you are looking at traffic trends: http://cricket.sourceforge.net/

******************
** IP TABLES **
******************
Say you want to enable outgoing FTP from iptables:

iptables -A INPUT -i $IFACE -p tcp --sport 21 -m state --state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o $IFACE -p tcp --dport 21 -m state --state NEW,ESTABLISHED -j ACCEPT

where IFACE="eth0,eth1,...etc" as you see appropriate.
 
Old 01-18-2005, 12:41 PM   #3
intranet_man
LQ Newbie
 
Registered: Dec 2004
Distribution: RHEL 3/4, Fedora 3, dynebolic, Knoppix
Posts: 23

Rep: Reputation: 15
also try

You can also try:

iptables -vnL

as iptables keeps track of traffic.
 
Old 01-19-2005, 02:34 AM   #4
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
There's also tcpdump, which most distros include
 
Old 01-19-2005, 04:34 AM   #5
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
I very much like ethereal and reccomend it.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
my network is flooded with ARP packets !? qwijibow Linux - Security 16 11-03-2004 10:32 AM
send packets at network Jamesminh Linux - Networking 0 10-01-2004 02:38 AM
Why am I flooding my network with ARP packets? DocKarl Linux - Networking 0 05-07-2004 06:47 AM
Dropping Network Packets Micah Linux - Networking 4 03-14-2004 09:39 PM
Packets dropping with LAN network valo Linux - Hardware 3 02-18-2004 06:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:37 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