Date: Sat, 6 Apr 2002 21:28:22 -0800 From: "Crist J. Clark" <cjc@FreeBSD.ORG> To: Nick Rogness <nick@rogness.net> Cc: "Matthew D. Fuller" <fullermd@over-yonder.net>, Alex Rousskov <rousskov@measurement-factory.com>, freebsd-net@FreeBSD.ORG Subject: Re: Forcing packets to the wire Message-ID: <20020406212822.G70207@blossom.cjclark.org> In-Reply-To: <Pine.BSF.4.21.0204061322160.12246-100000@cody.jharris.com>; from nick@rogness.net on Sat, Apr 06, 2002 at 01:57:44PM -0600 References: <20020405222555.C65380@over-yonder.net> <Pine.BSF.4.21.0204061322160.12246-100000@cody.jharris.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 06, 2002 at 01:57:44PM -0600, Nick Rogness wrote:
> On Fri, 5 Apr 2002, Matthew D. Fuller wrote:
>
> > On Fri, Apr 05, 2002 at 06:48:09PM -0600 I heard the voice of
> > Nick Rogness, and lo! it spake thus:
> > > On Fri, 5 Apr 2002, Alex Rousskov wrote:
> > > >
> > > > - Is it possible without kernel modifications? How?
> > >
> > > AFAIK, No. Your only 2 possiblities that I could think of would
> > > be to use policy routing or natd. Both will fail in this case.
> >
> > You MIGHT be able to use ipfw divert/pipe rules to somehow shove the
> > packets into a program on their way out, and write a program that
> > would use raw sockets to hand-assemble the IP datagram on the way out;
> > I'm not sure if the kernel would try to outsmart you on that.
>
> Yeh, I thought of that. The problem is packets never leave
> anywhere since the route for the other NIC is not "OUT" any
> interface...it is the machine itself.
Then never go over a _physical_ inteface, but they _do_ cross an
interface, lo0, the internal loopback.
ipfw fwd <external gateway> ip from <ip_if0> to <ip_if1> in via lo0
--
Crist J. Clark | cjclark@alum.mit.edu
| cjclark@jhu.edu
http://people.freebsd.org/~cjc/ | cjc@freebsd.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020406212822.G70207>
