Date: Tue, 24 Jan 2017 16:55:39 +0700 From: Eugene Grosbein <eugen@grosbein.net> To: Don Lewis <truckman@FreeBSD.org> Cc: freebsd-net@FreeBSD.org Subject: Re: inheriting fib from an interface Message-ID: <20170124095539.GA18648@rdtc.ru> In-Reply-To: <201701240131.v0O1VMcu005208@gw.catspoiler.org> References: <201701240131.v0O1VMcu005208@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 23, 2017 at 05:31:22PM -0800, Don Lewis wrote: > Let's say that I have an application running on a server that is > connected to the Internet via two different ISPs and is using IP > addresses (ISP A:10.0.0.10 and ISP B:192.168.1.10) delegated by those > two ISPs on it's two interfaces. Responses to requests sent to > 10.0.0.10 should be sent via ISP A, and responses to requests sent to > 192.168.1.10 should be ISB B. > > There are a couple of different ways that I can think of to do this: > > 1) Put the server behind another FreeBSD box that uses policy-based > routing to forward the outbound packets to the desired ISP. My > understanding is that this only works for packet forwarding and not > for locally generated packets. Single command "ipfw add 2000 fwd $ispgw2 ip from $ip2 to any out xmit $isp1_iface" works for locally generated packets too. It "fixes" outgoing routing path for packets from IP belonging to "non-default" ISP2 when default route points to ISP1.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170124095539.GA18648>