Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Marcelo Moreira" <marcelom@qualitau.com>
To: Patrick Ahler <patrick@vikus.com>,
	netfilter EMAIL <netfilter@lists.netfilter.org>
Subject: Re: Packet Sniffing
Date: Mon, 14 Apr 2003 14:52:38 -0700	[thread overview]
Message-ID: <01a401c302d0$2abbcdf0$a828a8c0@qualitau.com> (raw)
In-Reply-To: ABEKJILKOKKGGDJKHKDFGEKFCAAA.patrick@vikus.com

From: "Patrick Ahler" <patrick@vikus.com>
> Want to setup a machine inside the network to packet sniff. I was hoping
> iptables could do this. What I'd like is if iptables would route each
> incoming packet to the correct machine, but also direct it to the packet
> sniffer (in other words duplicate the packet and send to 2 destinations).
>
> Just wondering if this is possible and if it is how can I set this up?
I've
> also tried doing all my packet sniffing off the firewall, but I've been
> unsuccessful, can't seem to get ethereal to look at the forwarded packets.
> If someone knows a way to successfully do setup either solutions please
let
> me know.

I think things are a bit misconcepted over here...

First, the sniffer machine needs not to receive any packet. It just grabs
them from the network when in promiscous mode.
Also, if you have a switch on your internal network, not all packets will be
broadcasted to the sniffer. So your best choice is to run the sniffer on the
firewall itself, where all the traffic passes through (or just set up a
small hub -- not a switch -- on it's input interface along with the sniffer
computer, this should also work).
The way I do when I need to troubleshoot something is to run tcpdump with
the -w option to capture to a packet file, along with the -s 0 (to capture
full packet), and then open the saved file with ethereal to check the
packets. It works perfectly. But if you need real time sniffing then go for
the prior option (the one with the little hub).

Have fun,
Marcelo.




  reply	other threads:[~2003-04-14 21:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-14 19:30 Packet Sniffing Patrick Ahler
2003-04-14 21:52 ` Marcelo Moreira [this message]
2003-04-16 12:06   ` iptables 1.2.8, mangle-recomputes, userspace? Scott MacKay
  -- strict thread matches above, loose matches on Subject: below --
2003-04-15  8:14 Packet Sniffing dhiraj.2.bhuyan
2003-04-15 17:04 Patrick Ahler
2003-04-15 17:22 ` Aldo Lagana
2003-04-15 17:20 Doug Johnson
2003-04-15 18:24 ` Patrick Ahler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01a401c302d0$2abbcdf0$a828a8c0@qualitau.com' \
    --to=marcelom@qualitau.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=patrick@vikus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox