From owner-freebsd-questions@freebsd.org Sun Feb 5 12:05:17 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12C6DCD0D3B for ; Sun, 5 Feb 2017 12:05:17 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.117.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C04A969D for ; Sun, 5 Feb 2017 12:05:16 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (unknown [IPv6:2001:8b0:151:1:1c1d:86a1:a200:b700]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 0CF5AEA85 for ; Sun, 5 Feb 2017 12:05:05 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/0CF5AEA85; dkim=none; dkim-atps=neutral Subject: Re: A simple routing question To: freebsd-questions@freebsd.org References: <33a14dcd9e8e9897c49e045e1606bdb1@Robert-Eckardt.de> From: Matthew Seaman Message-ID: <898f594f-8762-6935-8a19-046fc87bb6e6@FreeBSD.org> Date: Sun, 5 Feb 2017 12:04:59 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <33a14dcd9e8e9897c49e045e1606bdb1@Robert-Eckardt.de> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RDbODQ0BQvTIwU65gRw53FVaUAxRuPLkq" X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2017 12:05:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --RDbODQ0BQvTIwU65gRw53FVaUAxRuPLkq Content-Type: multipart/mixed; boundary="907diBaCvI6bbbfVJSCoaum6659CdGss6"; protected-headers="v1" From: Matthew Seaman To: freebsd-questions@freebsd.org Message-ID: <898f594f-8762-6935-8a19-046fc87bb6e6@FreeBSD.org> Subject: Re: A simple routing question References: <33a14dcd9e8e9897c49e045e1606bdb1@Robert-Eckardt.de> In-Reply-To: <33a14dcd9e8e9897c49e045e1606bdb1@Robert-Eckardt.de> --907diBaCvI6bbbfVJSCoaum6659CdGss6 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 05/02/2017 10:30, Robert Eckardt wrote: > The QUESTION: > Is there a solution to this scenario in FreeBSD? Your keywords here are: policy based routing On FreeBSD, you can use the pf(4) firewall to implement this. Look in particular at the 'route-to' and 'reply-to' terms. Googling for "policy based routing freebsd pf" will return very many references which you can look through for yourself, but this blog article contains the gist of what you want: https://prosauce.org/blog/2010/12/22/route-based-on-source-ip-address-lin= ux-bsd.html Cheers, Matthew --907diBaCvI6bbbfVJSCoaum6659CdGss6-- --RDbODQ0BQvTIwU65gRw53FVaUAxRuPLkq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJ8BAEBCgBmBQJYlxTwXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkAT5BoP/0kgFCVaWZXhlICazpWV/c4e CGwIbqx9odYRdf1e85Jpe7t64xbiGAk6G2lOKM3LlDtioIsTRmoErH5vtRRHV4zd LvznPihq4noOyFnqJoKLGCkVZecosdHNsjrik717CGjbEadXzHA7Gv3AyO6poOAU ECMr60/4HNJZfRwZnSap1ki1EnlVAEJvj08r2t2eju6Tf/n/kINAblvgQtirp2Ff QVfhOcZ7O2sZdu4ZrZEkCbFEIQbHIUZDc3n5D/yD01UknBpDHLm4O77c99gDGavl rvtFRvdh0HKr6qKA+FSfMrgCa3ESA6r1ad2ezKLTboeTG68kVrbwXKzUFbwDh1DE xyF39iGGcmmnFLt2XmS7iBu+h3/fN90AUbE+lYgBGTx0HoDwHijVv811LPos52S1 TwphQi86B2qlJ8CFjUR9nj1hWGqWsYUzIomSyevcyNGW07GTXgRBQiyRUq7/t09g 2zg106Cgd2/s/+rMQDtDK1Nl20OYxeaQJ7aIXQ3fs7lA+QLxSao5IY6H96jiEkWw J3QSaAqPAwOyNDxqfPuxbF9pheFObaM0X7DJNgdpqQ+YJHd8KG6PbIypNh9mqe8e 9Dq8UysyoYXYyTjFw1bGdZ/CFkhVQExHue/weHuSSBQe2j5KCWvMSrg0I0qhSKwx Wz9mzrtHtd9KbhhRb24o =mExp -----END PGP SIGNATURE----- --RDbODQ0BQvTIwU65gRw53FVaUAxRuPLkq--