lkml.org 
[lkml]   [1999]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectrouting around ethertap

Hi,

I am writing a program which examines all IP packets, fiddles with
some of them, and then sends them to their original destinations. A
similar project would be to write IP masquerading in user space
(that's not what I'm doing, but it's an equivalent problem).

I use the ethertap device with a default route to catch incoming
traffic. My question is: How can I force the packets my program
send to _avoid_ the ethertap device. Incoming packets should be
routesd to tap0, but packets with the same destinations sent by my
daemon need to route around it. Is there any way to do this without
using SO_BINDTOADDR?

Here's my default configuration:

ifconfig eth0 <my external IP address>
ifconfig eth1 10.1.0.0 <my internal IP address>
route add default eth0

And I want to route all traffic to my daemon, which should then route
outgoing traffic through the original routes.

ifconfig tap0 10.99.0.1
route add default tap0

Thanks in advance,

--Noel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.025 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site