Linux Netfilter discussions
 help / color / mirror / Atom feed
* Mangling problem
       [not found] <20030415222001.8410.94392.Mailman@kashyyyk>
@ 2003-05-21 11:49 ` Regina Reine
  2003-05-21 13:26   ` Chris Hoeschen
  2003-05-21 23:33   ` Arnt Karlsen
  2003-05-21 14:17 ` Regina Reine
  1 sibling, 2 replies; 5+ messages in thread
From: Regina Reine @ 2003-05-21 11:49 UTC (permalink / raw)
  To: netfilter


Hi,
I am doing an experiment with iptables. I use a hub to connect two
computers. Computer A captures the video packet (or any packets) and
computer B runs iptables and my code in Red Hat 8. Basically, with hub,
computer B will be able to see the packets coming to computer A. I would
like computer B to preroute this packet and put these packets in
userspace where I run my code. 

I uses :

** Iptables -t mangle -I PREROUTING -p udp -I eth0 -j QUEUE

However, seems like I only be able to capture broadcast packets. (But
TCPDUMP could see the udp packets). I have checked my code (just a
simple code that scan what kind of packets and it worked with udp
generator such as iperf or hping). 
I have tried a few other similar ways but still only could capture
broadcast packets. Does anybody spots my mistake or could give me advice
for better solution? Thank you

Best regards,
Regina Reine



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Mangling problem
  2003-05-21 11:49 ` Mangling problem Regina Reine
@ 2003-05-21 13:26   ` Chris Hoeschen
  2003-05-21 14:02     ` Scott MacKay
  2003-05-21 23:33   ` Arnt Karlsen
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Hoeschen @ 2003-05-21 13:26 UTC (permalink / raw)
  To: 'Regina Reine'; +Cc: netfilter

I maybe wrong but I don't believe netfilter will process any packets not
intended for that box.  TCPDump will see it as in a hubbed environment
all nodes receive all packets but only those that are destined for that
box will netfilter process.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Chris Hoeschen - Distributed System Analysts        |
| PrimeVest Financial Services                        |
| (320) 656-4035 E-Mail: chris.hoeschen@primevest.com |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

"Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former." 
  -- Albert Einstein
Hippopotomonstrosesquippedaliophobia is the fear of long words


-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Regina Reine
Sent: Wednesday, May 21, 2003 6:50 AM
To: netfilter@lists.netfilter.org
Subject: Mangling problem



Hi,
I am doing an experiment with iptables. I use a hub to connect two
computers. Computer A captures the video packet (or any packets) and
computer B runs iptables and my code in Red Hat 8. Basically, with hub,
computer B will be able to see the packets coming to computer A. I would
like computer B to preroute this packet and put these packets in
userspace where I run my code. 

I uses :

** Iptables -t mangle -I PREROUTING -p udp -I eth0 -j QUEUE

However, seems like I only be able to capture broadcast packets. (But
TCPDUMP could see the udp packets). I have checked my code (just a
simple code that scan what kind of packets and it worked with udp
generator such as iperf or hping). 
I have tried a few other similar ways but still only could capture
broadcast packets. Does anybody spots my mistake or could give me advice
for better solution? Thank you

Best regards,
Regina Reine






^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Mangling problem
  2003-05-21 13:26   ` Chris Hoeschen
@ 2003-05-21 14:02     ` Scott MacKay
  0 siblings, 0 replies; 5+ messages in thread
From: Scott MacKay @ 2003-05-21 14:02 UTC (permalink / raw)
  To: netfilter

My believe too.  iptables is not a promiscious app; it
handles packets which come in/go out of the device. 
You see the broadcast because it is 'intended' for
Computer B (and any other computer).  
The only way B would get it is if Computer A
transmitted the packets to computer B (either directly
or because B was a router).

One question:  How does computer A get the video? 
internal capture or is the data being sent to it? 

-Scott

--- Chris Hoeschen <chris.hoeschen@primevest.com>
wrote:
> I maybe wrong but I don't believe netfilter will
> process any packets not
> intended for that box.  TCPDump will see it as in a
> hubbed environment
> all nodes receive all packets but only those that
> are destined for that
> box will netfilter process.
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Mangling problem
       [not found] <20030415222001.8410.94392.Mailman@kashyyyk>
  2003-05-21 11:49 ` Mangling problem Regina Reine
@ 2003-05-21 14:17 ` Regina Reine
  1 sibling, 0 replies; 5+ messages in thread
From: Regina Reine @ 2003-05-21 14:17 UTC (permalink / raw)
  To: netfilter

Chris,
I think you are right. Thanks

Regina



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Mangling problem
  2003-05-21 11:49 ` Mangling problem Regina Reine
  2003-05-21 13:26   ` Chris Hoeschen
@ 2003-05-21 23:33   ` Arnt Karlsen
  1 sibling, 0 replies; 5+ messages in thread
From: Arnt Karlsen @ 2003-05-21 23:33 UTC (permalink / raw)
  To: netfilter

On Wed, 21 May 2003 12:49:54 +0100, 
"Regina Reine" <regina@erg.abdn.ac.uk> wrote in message 
<000001c31f8f$1866f1d0$88cc858b@TOSHIBAFIRE>:

> 
> Hi,
> I am doing an experiment with iptables. I use a hub to connect two

..hub?  And being visible wont hurt your experiment?

> computers. Computer A captures the video packet (or any packets) and
> computer B runs iptables and my code in Red Hat 8. Basically, with
> hub, computer B will be able to see the packets coming to computer A.
> I would like computer B to preroute this packet and put these packets
> in userspace where I run my code. 
> 
> I uses :
> 
> ** Iptables -t mangle -I PREROUTING -p udp -I eth0 -j QUEUE
> 
> However, seems like I only be able to capture broadcast packets. (But
> TCPDUMP could see the udp packets). I have checked my code (just a
> simple code that scan what kind of packets and it worked with udp
> generator such as iperf or hping). 
> I have tried a few other similar ways but still only could capture
> broadcast packets. Does anybody spots my mistake or could give me
> advice for better solution? Thank you
> 
> Best regards,
> Regina Reine
> 

..you want tcpdump running in promiscous mode, 'info tcpdump' 
for the gory details, it is also possible to pipe it.

..you could also set up an ip-less sniff bridge, it works nicely 
for bandwidth throttling too.  ;-)

-- 
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-05-21 23:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20030415222001.8410.94392.Mailman@kashyyyk>
2003-05-21 11:49 ` Mangling problem Regina Reine
2003-05-21 13:26   ` Chris Hoeschen
2003-05-21 14:02     ` Scott MacKay
2003-05-21 23:33   ` Arnt Karlsen
2003-05-21 14:17 ` Regina Reine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox