From owner-freebsd-questions@FreeBSD.ORG Wed Jan 26 00:57:28 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8777616A4CF for ; Wed, 26 Jan 2005 00:57:28 +0000 (GMT) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0DD643D53 for ; Wed, 26 Jan 2005 00:57:27 +0000 (GMT) (envelope-from cpghost@cordula.ws) Received: from [192.168.254.11] (unknown [192.168.254.11]) by fw.farid-hajji.net (Postfix) with ESMTP id E6D474AF04; Wed, 26 Jan 2005 01:52:39 +0100 (CET) Message-ID: <41F75C88.209@cordula.ws> Date: Wed, 26 Jan 2005 10:02:00 +0100 From: cpghost User-Agent: Mozilla Thunderbird 1.0 (X11/20050122) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sandy Rutherford References: <41F640BA.2040707@cordula.ws> <16886.56708.519994.924956@szamoca.krvarr.bc.ca> In-Reply-To: <16886.56708.519994.924956@szamoca.krvarr.bc.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: Restricting NFS daemons X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2005 00:57:28 -0000 Sandy Rutherford wrote: > > Hello, > > how can one configure NFS daemons (esp. mountd and rpcbind) so that they > > listen > > only on one IP address (e.g. on 192.168.1.1)? > >This isn't quite what you are asking about, but it may do the job >none-the-less. With tcp-wrappers you can restrict the IP numbers that >portmapper will listen to. Have a look in /etc/hosts.allow for an >example. > > I already have this in /etc/hosts.allow: rpcbind : 192.168.1.0/255.255.255.0 : allow rpcbind : ALL : deny and removed the allow-all line: ALL : ALL : allow But the question is how to get rpcbind to use tcp-wrappers in the first place! Because even with this in hosts.allow, sockstat -46l still shows: root rpcbind 10188 7 udp4 127.0.0.1:111 *:* root rpcbind 10188 8 udp4 192.168.1.1:111 *:* root rpcbind 10188 9 udp4 *: *:* root rpcbind 10188 10 tcp4 *: *:* So it's still binding to INADDR_ANY :-( Am I missing something obvious, or is rpcbind not "tcp wrapped" by default? >...Sandy > > Thanks, -cpghost. -- Cordula's Web. http://www.cordula.ws/