From owner-freebsd-questions Wed Aug 9 0: 9:18 2000 Delivered-To: freebsd-questions@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 3726F37BD5E for ; Wed, 9 Aug 2000 00:09:01 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.9.3/1.13) id KAA49681; Wed, 9 Aug 2000 10:08:46 +0300 (EEST) Date: Wed, 9 Aug 2000 10:08:46 +0300 From: Ruslan Ermilov To: Jon Rust Cc: freebsd-questions@FreeBSD.ORG Subject: Re: restarting natd remotely Message-ID: <20000809100846.A49254@sunbay.com> Mail-Followup-To: Jon Rust , freebsd-questions@FreeBSD.ORG References: <20000808153226.A16088@mail.vcnet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000808153226.A16088@mail.vcnet.com>; from jpr@vcnet.com on Tue, Aug 08, 2000 at 03:32:26PM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Aug 08, 2000 at 03:32:26PM -0700, Jon Rust wrote: > I've got a client that uses a firewall I made for them with FreeBSD 3S. > Sometimes this customer calls and needs to change a port mapping. I ssh > in and change my natd config file. (I start natd with the -f flag.) How > would I restart it at that point? If I kill the current daemon, I get > locked out. I just tried this: > > # kill [pid of natd] && /sbin/natd -f /usr/local/etc/natd.conf -n mx1 > > And also got locked out, with no access to the box. Had to walk the guy > through restarting it from their side (the box usually has no kb or vid > connected). Is sending a "restart" command the only good way to restart > natd remotely? > The problem is that on receipt of a SIGHUP signal, natd(8) will wait ten seconds before going shutdown. You can either: 1) kill -9 [pid of natd] 2) add a sleep(1) delay before restart Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message