Hi!

I'm trying to build an internet solution for the few people that live in my
building.
I'm convinced that I need to run two instances of natd. Tips on how thats
best obtained are welcome - I've just copied the /etc/rc.d/natd into natd2
and replaced natd to natd2 where approriate, but thats really an ugly
solution I think.. 
Then I wan't to do source based routing. I'll explain why futher on down if
you're interested.
My problem is that I'm confused about how to both do source based routing
AND nat. When i use either of the fwd or divert commands, the processing of
the packet ends, so I can only do one of the two, when I'm really trying to
do both to the same packet.
I've read a couple of times that packets are run through the filter twice,
but I'm unsure how to use this, which order etc.
I would guess that I should use fwd on packets inbound and then do nat
outbound, but I can't really see how that should be configured - pointers to
good thorough documentation would be greatly appreciated, as well as hints
on what to do.

/Steffen

Setup description: 

I have two dsl lines and two freebsd boxes for redundancy. The one dsl is
mine (dsl A) and should only be used by me when the other shared dsl (dsl B)
is working, if its down, then the other residents may use my dsl. I should
always use my own dsl unless its down.

The two dsl lines comes with a public /29 connect on each, and using vlans
(vlan6=dslAm vlan7=dslB), each freebsd box has a vlan interface in each of
the connect prefixes. This way, even if a freebsd box dies and any dsl line
dies things should still work. A cronjob would check if any dsls are down
and configure ipfw accordingly.

Currently box1 has a default via vlan6 and box2 via vlan7. My clients then
use box1 and other residents use box2 for default gateway. 
In the ultimate setup I'd be running vrrp on all the client lans that all
connect to box 1 & 2. Policybased routing would ensure that residents only
uses my dsl when the shared one is down, and that I always use my dsl, or
the shared if mine is down. Both boxes 1 & 2 are configured for nat out on
vlan6 & 7.
A cronjob checks if the dsl's are up, and reconfigures source based routing
if a change occurs.


-- 
View this message in context: 
http://www.nabble.com/ipfw%2C-two-natd-instances-and-policy-based-routing..-tf4410268.html#a12581500
Sent from the freebsd-ipfw mailing list archive at Nabble.com.

_______________________________________________
freebsd-ipfw@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to