Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 02-08-2010, 02:42 AM   #1
LQ Newbie
Registered: Feb 2010
Distribution: Ubuntu, Red Hat
Posts: 3

Rep: Reputation: 0
Question Filtering traffic on network interfaces

Hi All,

I'm faced with a networking problem and would appreciate some advice. I am manually capturing and injecting Ethernet traffic (using lib_net/lib_pcap libraries) for an application. At the moment , both capturing and injecting are done on the same physical interface (e.g. eth0). The problem is that all the traffic that I inject, are captured again by my application causing an unwanted feedback of injected traffic. This caused that I had to implement traffic filtering when capturing traffic, which is consuming resources and eventually will become too complicated to support.

I have tried using virtual interfaces to separate the capturing and injecting streams, but that also presented the same problem as all the traffic from eth0 is forwarded to both eth0:1 and eth0:2.

Can someone please give some advice on possible solutions on separating the streams so that no feedback occurs? If possible I would like both streams to go through 1 physical device, using more PDs will be the last resort.

I am also looking at using TUN/TAP devices to try and separate the two streams, maybe writing a user-space program that lies between the physical device and the TUN/TAP devices to do the routing of traffic, but hopefully the Kernel has some way of solving the problem.

Any help appreciated

Ubuntu Server 9.04
Old 02-09-2010, 11:13 AM   #2
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Originally Posted by arendman View Post
The problem is that all the traffic that I inject, are captured again by my application causing an unwanted feedback of injected traffic.
Can you explain this. If send packets, how can they appear on the receiver?


filtering, logical

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Multiple interfaces - All traffic flows through just one... crazyivan Linux - Networking 16 03-05-2012 05:02 AM
Filtering outbound traffic from a Virtual Machine, how? /dev/me Linux - Security 3 07-03-2009 05:08 PM
How to route traffic on a network - cannot get machine to transfer across interfaces captainpotato Linux - Networking 15 10-04-2006 08:04 AM
natting traffic between 2 interfaces nukenstien Linux - Networking 2 02-13-2005 11:12 PM
Traffic on both interfaces geomonap Linux - Networking 1 01-13-2005 02:56 PM

All times are GMT -5. The time now is 04:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration