From e95f2867f8e8c94d36d646dc79d49cf1c6d8950a Mon Sep 17 00:00:00 2001 From: aisha Date: Sat, 21 Sep 2024 05:37:26 +0000 Subject: [PATCH] add route-to example ok benno@ --- usr.sbin/relayd/relayd.conf.5 | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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 -- 2.20.1