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