Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jan 2004 13:18:02 +0100
From:      Antoine Jacoutot <ajacoutot@lphp.org>
To:        freebsd-ipfw@freebsd.org
Subject:   routing and fwd
Message-ID:  <200401101318.02073.ajacoutot@lphp.org>

next in thread | raw e-mail | index | archive | help
Hi :)

I have a simple problem and I was told this was possible to use ipfw to 
resolve this.
I have a FreeBSD gateway which has 2 internet connexions:
- con1 with a fixed public @ip range
- con2 with a dynamic @ip connection with a DSL modem

I would like to route all paquets coming from the DMZ (fixed public @ip range) 
and going to the Internet using con1 and route all paquets coming from LAN 
and going to the Internet using con2+NAT. I would also like to route paquets 
normally between LAN and DMZ.
The default route on the gateway would be con2 (the dynamic @ip DSL 
connexion).
Is it possible to build such a setup with ipfw ?

I was thinking about something like:
add divert 8668 ip from $LAN to !$DMZ via $con2
add fwd ip from $DMZ to !$LAN via $con1

But I was concerned about the fact that since my default route (on the 
gateway) would be con2, how would the paquets coming from the DMS be routed 
using con1 ?

I hope this is understandable...

----------------
INTERNET
----------------
   |          |
   |          |
----------------
  con1       con2
FREEBSD_GATEWAY
  em1        em0
----------------
   |          |
   |          |
   DMZ        LAN

Thanks for any inputs....
Note that I do no need failover, load balance, bonding... I just want to 
convert 2 gateways (one for each NET connection) into 1.

Regards,

Antoine



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401101318.02073.ajacoutot>