Date: Tue, 19 Feb 2008 00:41:54 +0300 From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> To: Nick Barnes <Nick.Barnes@pobox.com> Cc: freebsd-net@freebsd.org Subject: Re: Multiple default routes on multihome host Message-ID: <y8pdPEdjV/%2Bs4R7lkSq2unFxWwc@cOypuUi/eNTmPdmBTlTVb7jzJQk> In-Reply-To: <38308.1203368454@thrush.ravenbrook.com> References: <38308.1203368454@thrush.ravenbrook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Nick, good day. Mon, Feb 18, 2008 at 09:00:54PM +0000, Nick Barnes wrote: > I have a multi-home host: more than one IP address. The addresses are > in separate subnets but run over the same ethernet segment (this is a > temporary situation while I switch an office network over from one > network provider to another). > > I want packets from address A1 to be sent via gateway G1, but packets > from address A2 to be sent via gateway G2. > > How do I do this? Can I just have more than one default route? I'm > remote from the machine in question, so I don't want to tinker with > the default route until I'm sure of the answer. pf's "route-to"/"reply-to" statements can do the trick for you. Use "route-to" if the packet is originating from your host and use "reply-to" for packets destined for some service at your host. You should use stateful rules with these modifiers. But if you have no pf on your remote machine, maybe you will decide not to install and enable it remotely, unless you are very sure about what you're doing. -- Eygene
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?y8pdPEdjV/%2Bs4R7lkSq2unFxWwc>