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 11-26-2004, 10:36 PM   #1
kaito
LQ Newbie
 
Registered: Nov 2004
Location: japan
Distribution: plamo, fedora
Posts: 27

Rep: Reputation: 15
Unhappy tcpdump and snort cannot filter PPPoE packets


Hi, everyone. This is my first thread

There is a trouble when i capture PPPoE packets with tcpdump or snort.

i want to capture PPPoE packets in my network.
my network is following:

<ISP>
|
Repeater HUB ------ Router ------- <Local Network>
|
-------------------- Sniffer(Linux)

i can capture PPPoE packets with tcpdump and snort.
i did the following commands:
# tcpdump -i eth1 -nt
# snort -dev

But, i cannot filter PPPoE packets. i did the following commands:
# tcpdump -i eth1 -nt host not port 22
# snort -dev not port 22
i assume tcpdump and snort analyze PPPoE packets, so maybe
patches apply tcpdump and snort to analyze PPPoE packets.

Is my idea correct? Does someone know those patches if my idea
is correct?

---------------
Appendix: version information
tcpdump version 3.8.3
libpcap version 0.8.3
snort-2.2.0
---------------

Last edited by kaito; 11-26-2004 at 10:39 PM.
 
Old 11-27-2004, 08:05 AM   #2
nukkel
Member
 
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
Hi, welcome to linuxquestions!

Maybe try 'tcpdump proto not tcp'.

The problem is when you type 'port not 22' it automatically assumes 'proto (tcp or udp) and port not 22'. And IIRC, pppoe does not run over TCP or UDP in the transport-layer, so pppoe packets won't survive this filter.

I'm not sure on this, you'll have to give it a try.

regards
nukkel
 
Old 11-28-2004, 05:18 PM   #3
kaito
LQ Newbie
 
Registered: Nov 2004
Location: japan
Distribution: plamo, fedora
Posts: 27

Original Poster
Rep: Reputation: 15
nukkel, thank you for your reply

>Maybe try 'tcpdump proto not tcp'.
>
>The problem is when you type 'port not 22' it automatically assumes 'proto (tcp or udp) and >port not 22'. And IIRC, pppoe does not run over TCP or UDP in the transport-layer, so pppoe >packets won't survive this filter.

'tcpdump proto not tcp' did, but syntax error is happpened.

i re-read man manual for tcpdump, and the following command did.
# tcpdump -i eth0 ppp
tcpdump: link layer applied in wrong context

Maybe, tcpdump doesnt support layer 2 protocol.
i found the information related to my problem.
Based to the information, tcpdump needs patch to analyze layer 2 protocol.
http://www.tcpdump.org/lists/workers.../msg00058.html
 
Old 11-29-2004, 02:01 PM   #4
nukkel
Member
 
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
Oh sorry, that was supposed to be 'tcpdump not tcp'
 
Old 12-02-2004, 03:56 AM   #5
kaito
LQ Newbie
 
Registered: Nov 2004
Location: japan
Distribution: plamo, fedora
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks tcpdump information, nukkel

How about PPPoE packets with snort?
Do u have any information that snort analyzes PPPoE packets?
 
Old 12-03-2004, 03:28 PM   #6
nukkel
Member
 
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
I have never used snort, sorry. I cannot tell you.

The "Ethereal" program claims to be able to capture pppoe:

http://www.ethereal.com/introduction.html#features

However, it also uses the libpcap library, I think, so it may be you run into the same problem here.

Best of luck,
nukkel
 
Old 12-05-2004, 09:34 PM   #7
kaito
LQ Newbie
 
Registered: Nov 2004
Location: japan
Distribution: plamo, fedora
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks, nukkel

It is difficult that snort analyzes PPPoE packets
i wonder that network diagram will be changed to capure Ethernet packets for snort and tcpdump.

i was very glad nukkel to advise me anything information
Thanks!!
 
Old 12-06-2004, 01:27 AM   #8
nukkel
Member
 
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
No problem kaito!
 
Old 08-16-2009, 03:25 AM   #9
gjarboni
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Rep: Reputation: 3
Quote:
Originally Posted by kaito View Post
Hi, everyone. This is my first thread

There is a trouble when i capture PPPoE packets with tcpdump or snort.

i want to capture PPPoE packets in my network.
my network is following:

<ISP>
|
Repeater HUB ------ Router ------- <Local Network>
|
-------------------- Sniffer(Linux)

i can capture PPPoE packets with tcpdump and snort.
i did the following commands:
# tcpdump -i eth1 -nt
# snort -dev

But, i cannot filter PPPoE packets. i did the following commands:
# tcpdump -i eth1 -nt host not port 22
# snort -dev not port 22
i assume tcpdump and snort analyze PPPoE packets, so maybe
patches apply tcpdump and snort to analyze PPPoE packets.

Is my idea correct? Does someone know those patches if my idea
is correct?

---------------
Appendix: version information
tcpdump version 3.8.3
libpcap version 0.8.3
snort-2.2.0
---------------
I know this question is half a decade old, but it's first in google if you search on tcpdump pppoe, so I figured I'd post some info here. I was having the same problem with the same version of tcpdump. It turns out there's an easy solution.

tcpdump -i eth1 ether[0x0c:2] == 0x8863 or ether[0x0c:2] == 0x8864

Will show you PPPoE packets. 8863 is the ether type for Active Discovery and 8864 is the ether type for PPPoE sessions.

Jason M.

Last edited by gjarboni; 08-16-2009 at 04:10 AM.
 
1 members found this post helpful.
  


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
tcpdump filter Etruscan9 Linux - Software 1 01-20-2012 05:27 AM
Can TCPDump filter on source IP? stefaandk Linux - General 1 08-22-2005 10:51 PM
how to add & register filter for intercepting the packets outgoing on port 80? jayashri Programming 2 11-08-2004 01:30 PM
Sniffing: tcpdump gets some initial packets merlin-themage Linux - Networking 0 05-28-2004 07:07 AM
tcpdump and dropped packets Blindsight Linux - Networking 5 07-14-2003 10:41 PM

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

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