From owner-freebsd-questions Tue Jul 25 13:17:57 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 08F8537B67F for ; Tue, 25 Jul 2000 13:17:50 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id PAA20325; Tue, 25 Jul 2000 15:17:47 -0500 (CDT) (envelope-from dan) Date: Tue, 25 Jul 2000 15:17:46 -0500 From: Dan Nelson To: Shawn Ramsey Cc: questions@FreeBSD.ORG Subject: Re: packet filter Message-ID: <20000725151746.A17756@dan.emsphone.com> References: <4.3.0.20000725124243.0220e008@mail.cpl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.3.5i In-Reply-To: <4.3.0.20000725124243.0220e008@mail.cpl.net>; from "Shawn Ramsey" on Tue Jul 25 12:44:22 GMT 2000 X-OS: FreeBSD 5.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jul 25), Shawn Ramsey said: > Is IPFW or IPFilter capable of random port redirection? Such as a request > comes in for port 25, can it randomly redirect this request to another > server? (such as multiple mail servers, sort of a load balance) You can do it two ways: 1. With the "ipfw fwd" command (possibly the ipf "dup-to" comamnd also): forward packets with a source mask of 0.0.0.0/4 to IP#1, 64.0.0.0/4 to IP#2, 64.0.0.0/4 to IP#3, 64.0.0.0/4 to IP#4. Limited to filtering on source addresses, so your load probably won't balance eavenly, but very fast. 2. Run "natd -redirect_port tcp ip1:smtp,ip2:smtp,ip3:smtp mail:smtp". This round-robins incoming connections to "mail" to ip1, ip2, and ip3, but takes a bit more CPU. It's got it's own RFC: 2391 -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message