Skip to contentSkip to conversation

tcpdump and netfilter

DISCUSSION Jacob Hansen 2 participants 2 messages Jun 14, 2002

lore
Share & tools
lore
#0 lore raw

Hi everyone,

I know this question has been asked before, but the answers seem to point in several different directions.

When does tcpdump sniff it's packets? Is it before any nf hook for inbound packets and post all nf hooks for outbound packets?

I am writing a packet mangling kernel module and tcpdump reports very odd-looking IP packets, that i cannot seem to pinpoint at any nf_hook.

Any suggestions as to a debugging approach?

Thanks.

Signature · 2 lines
Jacob Hansen. U of Copenhagen, Dept. of Computer Science
e-mail : [email protected]
#1 lore raw
Quoted 2 lines · Jacob Hansen

I am writing a packet mangling kernel module and tcpdump reports very odd-looking IP packets, that i cannot seem to pinpoint at any nf_hook.

Yes - I've come across this before as well. I'm not sure there's a singel
reliable solution to combine these two applications.

Quoted 1 line

Any suggestions as to a debugging approach?

1. Use netfilter LOGging to output packets you want to monitor.

2. Run tcpdump / ethereal etc on another machine to show you what comes out of the network interface onto the wire.

Can anyone else suggest a way to do it reliably on one machine ?

Antony.