On Fri, Dec 06, 2002 at 05:52:31PM -0800, Sergei Khlupnov wrote:
> I'm not quite fluent with ipfilter syntax and functionality but I believe it
> could be done "in theory" or with other firewalls. Just not sure if ipfilter
> can do this - need some testing...
> 
> Request packet coming to "b" from "client":
> Firewall on host "b" does :
>  - change dst ip to be "a"
>  - change src ip to be "b"

That's not how 'rdr' NAT works. It does NOT change the source
address. I don't see how you could do this with IPFilter on a machine
with one interface.

>  - forward packet according to the routing table
> Packet will arrive to host "a"
> Host "a" sends reply back to "b"
> Reply packet arrives to host "b"
> Firewall on host "b" does :
>  - change src ip to "b"
>  - change dst ip to "client"
>  - forward it
> Reply goes to "client"
> 
> Just need figure out what are those 2 lines for ipfilter...  :-)

You may just be better off setting up this machine as an HTTP proxy
server that only proxies for your two sites.

> ----- Original Message -----
> From: "Crist J. Clark" <[EMAIL PROTECTED]>
> To: "Moti Levy" <[EMAIL PROTECTED]>
> Cc: "ipfilter" <[EMAIL PROTECTED]>
> Sent: Friday, December 06, 2002 17:00
> Subject: Re: rdr question
> 
> 
> > On Fri, Dec 06, 2002 at 12:00:25PM -0500, Moti Levy wrote:
> > > Hi ,
> > > can rdr work on ip's not directly connected to my firewall ?
> > >
> > > i have three boxes in diffrent colocations
> > > host a
> > > host b
> > > host c
> > > all have diffrent ip's and are on diffrent providers.
> > >
> > > host a is running a web server
> > > i want connection to host b:80 and host c:80 to go to host a:80
> > > is that possible ?
> >
> > It's possible as long as all of these machines are "behind" the same
> > firewall. Think about it:
> >
> >   - For the packets to get rdr'ed in the first place, they need to go
> >     through the firewall.
> >   - For the responses to get the source address rewritten back to what
> >     the client had as an original address, the packets must go back
> >     out to the Internet through the firewall.
> >
> > My guess is, no, it won't work. I doubt that you have packets leaving
> > your hosts at multiple providers to random Internet addresses go back
> > through a single firewall of yours. You might be able to do it by
> > source routing your packets, but lots of ISPs drop IP options
> > unconditionally at their borders.
-- 
Crist J. Clark                     |     [EMAIL PROTECTED]
                                   |     [EMAIL PROTECTED]
http://people.freebsd.org/~cjc/    |     [EMAIL PROTECTED]

Reply via email to