LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-11-2010, 04:59 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Rep: Reputation: 45
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

Last edited by gardenair; 05-11-2010 at 05:25 AM.
 
Old 05-11-2010, 05:14 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192
EXPECT or EXCEPT?
 
Old 05-11-2010, 05:24 AM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
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.

Last edited by vikas027; 05-11-2010 at 05:26 AM.
 
1 members found this post helpful.
Old 05-11-2010, 05:27 AM   #4
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
Sorry it was typing mistake ?
 
Old 05-11-2010, 05:49 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
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.
 
Old 05-11-2010, 05:52 AM   #6
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
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

Last edited by gardenair; 05-11-2010 at 06:00 AM.
 
Old 05-11-2010, 06:19 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
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'.
 
Old 05-11-2010, 06:27 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
host.allow and host.deny McPriMa Linux - Newbie 3 08-05-2009 11:32 PM
host.deny and host.allow not found satimis Linux - Security 5 08-24-2007 06:38 AM
How to setup a host.deny and host.allow for SSH? explorer1979 Linux - Security 2 01-31-2005 05:28 PM
How do I deny host? Inexactitude Linux - Security 3 02-22-2004 02:00 PM
host.deny is very wierd ForumKid Linux - Security 1 12-26-2001 06:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration