Date: Tue, 29 Jan 2008 18:26:34 +0000 From: "Alexandre Vieira" <nullpt@gmail.com> To: freebsd-pf@freebsd.org, freebsd-questions@freebsd.org Subject: Relayd l3 redirect send/expect check Message-ID: <755cb9fc0801291026oc273ae1o7122cfd580f9413e@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi all, There used to be a check send "string" expect "string" in the old config method in hoststated. I've checked the relayd.conf man page and apparently the only way to do this now is with an external script. I've tried to add the " forward to <table> check send "" expect "banner string" " and the relayd validates the config file but always sets my table hosts down :\ Also a simple " forward to <table> check tcp " won't work. While snooping the interface to the pool servers I can see that relayd tries to contact all pool servers in the defined interval and in the correct port but doesn't actually open a connection, just send a SYN, the servers answer and then it RST them. The hosts are shown as "down" in relayctl. 18:11:10.387565 IP 172.16.135.142.52679 > 172.16.135.148.rtsp: S 675781109:675781109(0) win 16384 <mss 1460,nop,wscale 6,sackOK,timestamp 430386759 0> 18:11:10.387591 IP 172.16.135.142.49363 > 172.16.135.133.rtsp: S 1229756465:1229756465(0) win 16384 <mss 1460,nop,wscale 6,sackOK,timestamp 430386759 0> 18:11:10.387850 IP 172.16.135.148.rtsp > 172.16.135.142.52679: S 216269779:216269779(0) ack 675781110 win 24616 <nop,nop,timestamp 737427944 430386759,nop,wscale 0,nop,nop,sackOK,mss 1460> 18:11:10.387870 IP 172.16.135.142.52679 > 172.16.135.148.rtsp: R 675781110:675781110(0) win 0 18:11:10.387873 IP 172.16.135.133.rtsp > 172.16.135.142.49363: S 2827025081:2827025081(0) ack 1229756466 win 49232 <nop,nop,timestamp 434360123 430386759,mss 1460,nop,wscale 0,nop,nop,sackOK> 18:11:10.387882 IP 172.16.135.142.49363 > 172.16.135.133.rtsp: R 1229756466:1229756466(0) win 0 The only way I have to get it working is a simple check icmp, which is sucky :\ When the pool hosts are up the rdrs work great. relayd.conf: public_ip="10.16.3.177" rtsp1="172.16.135.148" rtsp2="172.16.135.133" interval 5 # check hosts every 5 seconds table <rtsphosts> { $rtsp1 $rtsp2 } redirect rtsp { listen on $public_ip port 554 interface bge0 tag RELAYD sticky-address forward to <rtsphosts> check tcp } pf.conf: scrub all fragment reassemble rdr-anchor "relayd/*" pass all keep state FreeBSD 7.0-RC1 FreeBSD 7.0-RC1 #1: Fri Jan 18 13:36:30 WET 2008 root@:/usr/obj/usr/src/sys/me amd64 kernel diff: device pf device pflog device pfsync device carp options ALTQ options ALTQ_CBQ # Class Bases Queuing (CBQ) options ALTQ_RED # Random Early Detection (RED) options ALTQ_RIO # RED In/Out options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC) options ALTQ_PRIQ # Priority Queuing (PRIQ) options ALTQ_NOPCC # Required for SMP build The objective is to use relayd/pf as a simple l3 roundrobin load balancer with service health check. Any advice is most welcome. Regards,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?755cb9fc0801291026oc273ae1o7122cfd580f9413e>