Jo�o,
  We do IP routing between two IP ranges on the same interface.
We had to add an alias for that interface to be the gateway for
the 172.24 address range (172.24.0.1).  Other than that we just
have the following rules to do the job.  I'm not sure if this is what
you are looking for but I hope it helps.

#
# Routing Between Private Address Space And Normal Address Space Rules
#

pass in quick from 172.24.0.0/16 to 172.24.0.1 group 100 # Private Address Space to its Gateway

block in quick on fxp0 to fxp0 from 172.24.0.0/16 to <normal address range> group 100 # Private Address Space to Normal Addresses

block in quick from 172.24.0.0/16 to 172.24.0.0/16 group 100 # Ignore Broadcasts and Internal Traffic

block in quick on fxp0 to fxp0 from <normal address range> to 172.24.0.0/16 group 100 # Normal Addresses to Private Address Space

If I remember correctly the "on <interface> to <interface>" rule is a form
of the fastrout rule.  Good luck!
--
James A. Robbins
Network Engineer
The Ohio State University
Chemistry Department


----- Original Message ----- From: "Jo�o Assad" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 22, 2004 1:55 PM
Subject: Re: ip based routing



Come on guys, does anybody have any idea on how to fix it ?
I spent the last few days searchng the archives for a solution, but nothing
there works for me.

Jo�o Assad wrote:

If I change ipfilter rules to

pass out quick on fxp1 to fxp2:200.185.117.1 from 10.1.0.0/16 to !10.0.0.0/16

pass in quick on fxp2 all
pass out quick on fxp2 all

pass in quick on fxp1 all
pass out quick on fxp1 all

pass in quick on fxp0 all
pass out quick on fxp0 all

pass in quick on lo0 all
pass out quick on lo0 all

It works perfectly but I cant afford to use a steteless firewall.

Jo�o Assad wrote:

Hello,

Im running ipfilter v3.4.31 on FreeBSD 4.10-RELEASE-p3 .

My firewall have 3 network interfaces fxp0 (my private network) fxp1 (ISP1)
and fxp2 (ISP2)
In my private network I have two subnets , 10.0.0.0/16 (lets call it A) and
10.1.0.0/16 (lets call it B).
Im trying to use ipfilter to do ip based routing to my two different ISPs. I
want packets coming from A to go through fxp1 and it's gateway and packets
coming from B to go through fxp2 and it's gateway.

The problem is that I cant get connections from subnet B to work.

Any ideas ?

IPs
fxp0 : 10.0.0.1/16 and 10.1.0.1/16
fxp1 : a.b.c.d/240
fxp2 : e.f.g.h/240

-------------------ipnat.rules
map fxp1 10.0.0.0/16 -> a.b.c.d/32 portmap tcp/udp 1025:65000
map fxp1 10.0.0.0/16 -> a.b.c.d/32

map fxp2 10.1.0.0/16 -> e.f.g.h/32 portmap tcp/udp 1025:65000
map fxp2 10.1.0.0/16 -> e.f.g.h/32

-------------------ipf.rules
pass out quick on fxp1 to fxp2:200.185.117.1 from 10.1.0.0/16 to
!10.0.0.0/16 keep state

block return-rst in log on fxp1 proto tcp all flags S head 100

block out log on fxp1 all head 150
  pass out proto tcp  all flags S/SA keep state group 150
  pass out proto udp  all keep state group 150
  pass out proto icmp all keep state group 150

block return-icmp-as-dest(port-unr) in log on fxp1 proto udp all head 155

block return-rst in log on fxp2 proto tcp all flags S head 200

block out log on fxp2 all head 250
  pass out proto tcp  all flags S/SA keep state group 250
  pass out proto udp  all keep state group 250
  pass out proto icmp all keep state group 250

block return-icmp-as-dest(port-unr) in log on fxp2 proto udp all head 255

pass in quick on fxp0 all
pass out quick on fxp0 all

pass in quick on lo0 all
pass out quick on lo0 all





--

--------------------------------
- Jo�o Assad
- ParPerfeito Comunica��o LTDA
- http://www.parperfeito.com.br/





Reply via email to