Date: Wed, 23 Apr 2003 17:35:02 +0800 (MYT) From: Dinesh Nair <dinesh@alphaque.com> To: Jonathan <jonathan@sirtis.org.uk> Cc: freebsd-questions@freebsd.org Subject: Re: Routing through two networks Message-ID: <20030423173033.O37825-100000@prophet.alphaque.com> In-Reply-To: <004301c30941$81be6a50$3aaa9bd9@workstation>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 23 Apr 2003, Jonathan wrote: > All I'm trying to do is ensure that any traffic that comes in for > 193.0.0.250 routes back out through 193.0.0.1 and anything that comes in > for 217.0.0.250 routes back out through 217.0.0.1 keeping bandwidth > charges to a minimum. it's interesting that you're asking the very same question i asked on this list yesterday. i had the same problem, where i wanted traffic incoming on one interface to go out the same on a dual homed box. playing around with ipfw's fwd directive, i came to the following solution. set the default route to the router on one interface, say a default route to 193.0.0.1. then add the following ipfw rule ipfw fwd 217.0.0.1 ip from 217.0.0.250 to any this way, traffic which is outgoing from 217.0.0.250 will hit the forward rule and be sent on a next hop of 217.0.0.1, while all other traffic will obey the default rule and go out with a next hop 193.0.0.1. this works for me, but my question was if this is the optimum way of solving this problem. Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030423173033.O37825-100000>