From: aisha Date: Sat, 21 Sep 2024 05:37:26 +0000 (+0000) Subject: add route-to example X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e95f2867f8e8c94d36d646dc79d49cf1c6d8950a;p=openbsd add route-to example ok benno@ --- diff --git a/usr.sbin/relayd/relayd.conf.5 b/usr.sbin/relayd/relayd.conf.5 index c5a380fc114..50c73cbec15 100644 --- a/usr.sbin/relayd/relayd.conf.5 +++ b/usr.sbin/relayd/relayd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: relayd.conf.5,v 1.209 2024/07/14 03:58:49 jsg Exp $ +.\" $OpenBSD: relayd.conf.5,v 1.210 2024/09/21 05:37:26 aisha Exp $ .\" .\" Copyright (c) 2006 - 2016 Reyk Floeter .\" Copyright (c) 2006, 2007 Pierre-Yves Ritschard @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 14 2024 $ +.Dd $Mdocdate: September 21 2024 $ .Dt RELAYD.CONF 5 .Os .Sh NAME @@ -1537,6 +1537,20 @@ redirect "dns" { } .Ed .Pp +To load balance an IP address over multiple backend servers using a +.Xr pf 4 +.Cm route-to +directive: +.Bd -literal -offset indent +table { 10.100.42.71 10.100.42.72 10.100.42.73 } + +redirect "xmpp" { + listen on 10.100.42.2 tcp port 5222 + + route to port 5222 check tcp interface em0 +} +.Ed +.Pp The following configuration would add a relay to forward secure HTTPS connections to a pool of HTTP webservers using the