2 internet connections

Antoine Jacoutot ajacoutot at lphp.org
Tue Sep 16 04:10:04 PDT 2003


Hi !

I wanted to know if the following setup could work under FreeBSD, and if 
so, where should I start to look for information.
Basically, I would like my FreeBSD box to be a router for 2 networks and 
2 internet connections... nothing fancy yet (no failover nor load 
balancing) something like that:

net 1 --> internet = NAT with internet connection 1
net 2 --> internet = NAT with internet connection 2
net 1 <--> net 2 = simple routing

Is it doable ?
I'm also concerned about the default gateway here... what should it be ?

Someone told me to try a setup like this:

ipfw add divert 8668 ip from <net1> to any not <net2> via tun0 out
ipfw add divert 8669 ip from <net2> to any net <net1> via tun1 out
ipfw add divert 8668 ip from any not <net2> to any me tun0 in
ipfw add divert 8669 ip from any not <net1> to any me tun0 in
natd -p 8868 -n tun0
natd -p 8869 -n tun1

Thanks a lot for any info you can provide regarding this question.

Regards,

Antoine



More information about the freebsd-questions mailing list