From owner-freebsd-questions Wed Nov 22 6:33:49 2000 Delivered-To: freebsd-questions@freebsd.org Received: from madness.mdgnet.org (unknown [24.92.156.65]) by hub.freebsd.org (Postfix) with SMTP id C2D9537B479 for ; Wed, 22 Nov 2000 06:33:44 -0800 (PST) Received: (qmail 9664 invoked by uid 1000); 22 Nov 2000 14:33:43 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 22 Nov 2000 14:33:43 -0000 Date: Wed, 22 Nov 2000 09:33:43 -0500 (EST) From: Matthew George To: noor@comrax.com Cc: freebsd-questions@freebsd.org Subject: Re: ipfw/natd In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The issues present in such a scenario are by no means easy to deal with. First, divert sockets do not do what you think they do. You will find it easiest to use natd in order to redirect packets to another address. Just add '-f /etc/natd.conf' to your flags when you call natd. In natd.conf, use the redirect lines redirect_[port|proto|address] as defined in natd(8). Note that this will need to be done on a separate firewall box in front of your servers. Second, whether or not you will be able to make your databases fault tolerant in the event of a server failure will ultimately depend on what database platform you are running. Your db must internally support replication. The servers would keep themselves in sync with each other, attempting to maintain consistent copies of the database on each. This feature is most often found in enterprise class databases. Your best bet would be to install a server with your SQL server and an empty schema. In the event of a failure, you can copy the data into your standby server from your most recent backup (or the production server's disk if you can still get to it) and enable the redirection as above. It is often helpful to have enough knowledge of the data to determine what data is essential to the successful operation of the system. Usually you can minimize downtime by copying in this data first, restoring services, and then migrating nonessential data in while the system is running. On Wed, 22 Nov 2000 noor@comrax.com wrote: > Date: Wed, 22 Nov 2000 00:42:03 +0200 (IST) > From: noor@comrax.com > To: freebsd-questions@freebsd.org > Subject: ipfw/natd > > Hello all, > > Sorry for the surge of questions from me today :) > > We have now a server being used as a Web server and a SQL server. Since > we are about to get a new server for SQL, I'll need to split the SQL > server and put it on the new machine. This is not a problem. > > What I want to know is: if the new SQL server fails for some reason, I > want to use the old SQL server (still being hosted on the same old > machine). I want to do this using a divert rule in ipfw. I still don't > know how... > > If box A has IP: 192.168.40.50 > & box B has IP: 192.168.40.10 > > I want to do something like: > > divert tcp from 192.168.40.50 192.168.40.10 for SQL queries... > > > > Thanks for your help again... > > Noor > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message