LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   configuring host.allow & host.deny files (http://www.linuxquestions.org/questions/linux-newbie-8/configuring-host-allow-and-host-deny-files-807131/)

gardenair 05-11-2010 05:59 AM

configuring host.allow & host.deny files
 
Hi,
I want to configure NSF in my Linux machine.My server IP address is 192.168.1.10 and clients machines start from 192.168.1.20 to 192.168.1.30.there are some computers which i does't want that they get access my NFS server.

well I just want an opinion if I set hosts.deny for just this:

Code:

ALL: ALL
and in host.allow i use the following code

Code:

ALL:192.168.1.10/255.255.255.0 EXCEPT 192.168.1.11 192.168.1.12 192.168.1.13
is it a valid command. The description of host.allow is it should allow all clients expect the clients which have the ip address from range

192.168.11 to 192.168.13

should not access NFS server.

Is my script correct or u think there is a need to add some more thing

thanks
garden

grail 05-11-2010 06:14 AM

EXPECT or EXCEPT?

vikas027 05-11-2010 06:24 AM

Yes, this should work fine because access rules in hosts.allow are applied first, they take precedence over rules specified in hosts.deny.

The only thing you need to change your EXPECT to EXCEPT. :)

Otherwise, why dont you check it and post results here.

gardenair 05-11-2010 06:27 AM

Sorry it was typing mistake ?

linuxlover.chaitanya 05-11-2010 06:49 AM

You could always use CIDR notation as well. So you need to use EXCEPT clause. You already have denied everything in hosts.deny. And whatever you want to allow goes into hosts.allow. No need for EXCEPT clause here. But yes, I do understand that CIDR does not for whatever reasons work for NFS. But you could give it a try.

gardenair 05-11-2010 06:52 AM

thanks for the reply. well i am studing about NFS from the side
http://www.linuxquestions.org/linux/...rking/Easy_NFS
http://nfs.sourceforge.net/nfs-howto/ar01s03.html
here it is mentioning host.deny

lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

these are new thing...keeping in mind as per I was using ALL: ALL
What are that extries and why these are used ...? in the same manner in host.allow there sre same entries ....

I shall be so much thankful if someone kindly enlight on it i.e what are portmap,lock,monted,rquotad and statd as well.

thanks

onebuck 05-11-2010 07:19 AM

Hi,

I like the 'Linux NFS Overview, FAQ and HOWTO Documents' overview. You will find more informational links within this page.

The above link and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

I also suggest that you read 'How to Ask Questions the Smart Way'.
:hattip:

chrism01 05-11-2010 07:27 PM

You're going to need to allow portmap chap 18 http://www.linuxtopia.org/online_boo...ion/index.html


All times are GMT -5. The time now is 03:58 AM.