LinuxQuestions.org
Register a domain and help support LQ
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: 571

Rep: Reputation: 31
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
Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 7,541

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

Rep: Reputation: 99
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: 571

Original Poster
Rep: Reputation: 31
Sorry it was typing mistake ?
 
Old 05-11-2010, 05:49 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

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: 571

Original Poster
Rep: Reputation: 31
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: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,221
Blog Entries: 3

Rep: Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437Reputation: 1437
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
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,280

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 05:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration