LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-26-2006, 06:41 PM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Rep: Reputation: 60
NFS Mounting Issue


Here is my /etc/export file:

/home/dabeast 192.168.3.0/28 (rw,async,no_root_squash)

Here is the error message when I restart the nfsserver:

Vidious:/home/dabeast # /etc/init.d/nfsserver restart
Shutting down kernel based NFS server done
Starting kernel based NFS serverexportfs: No options for /home/dabeast 192.168.3.0/28: suggest 192.168.3.0/28(sync) to avoid warning
exportfs: No host name given with /home/dabeast (rw,async,no_root_squash), suggest *(rw,async,no_root_squash) to avoid warning done

What the is the problem? I am using SUSE 10.1
 
Old 07-26-2006, 06:43 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
You have a space between the network and the options.
 
Old 07-26-2006, 06:44 PM   #3
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I have all of these services enabled

nfs
nfsboot
nfsserver
nmb
portmap

I think I have everyting setup right?

This is the command I use from any client machine:

mount 192.168.3.1:/ /mnt/caca
 
Old 07-26-2006, 06:46 PM   #4
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
Matir,

I cannot stand you, you know why because you are right 99 percent of the time. Many thanks!
 
Old 07-26-2006, 06:50 PM   #5
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
one more question:

after I execute:

mount 192.168.3.1:/home/dabeast /mnt/caca

I get a permission denied error message from the server which is the /home/dabeast 192.168.3.1 in /etc/exports

I have adjusted the hosts.allow to

portmap:192.168.4.0/28
lockd:192.168.4.0/28
mountd:192.168.4.0/28
rquotad:192.168.4.0/28
statd:192.168.4.0/28

and hosts.deny to

http-rman : ALL EXCEPT LOCAL
portmap: ALL
lockd: ALL
mountd: ALL
rquotad: ALL
statd: ALL

why the error message? My clients are on a 192.168.4.0 network and the server is on a 192.168.3.0 network.

Last edited by metallica1973; 07-26-2006 at 06:51 PM.
 
Old 07-26-2006, 06:56 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I just reply when I know the answer.

Your /etc/exports is only allowing access to 192.168.3.0/28, which is 192.168.3.1-192.168.3.14. You might want to change either the network or the mask. 192.168.0.0/16 would work, but is very broad. 192.168.4.0/24 is more specific, but excludes the .3.0 network.
 
Old 07-26-2006, 07:23 PM   #7
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
Here is my hosts.allow

portmap:192.168.4.0/28
lockd:192.168.4.0/28
mountd:192.168.4.0/28
rquotad:192.168.4.0/28
statd:192.168.4.0/28

or would I have to add 192.168.3.0/28 as well since the server is on that network? Also after I make any adjustments, do I just need to restart the nfsserver or the rest of the suite.?

Last edited by metallica1973; 07-26-2006 at 07:24 PM.
 
Old 07-26-2006, 07:27 PM   #8
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Yeah, hosts.allow as well. Both hosts.allow and /etc/exports need to allow the IP of the CLIENT machine.

/etc/init.d/nfs restart should be enough on most systems. I think you need to restart nfs and portmapper.
 
Old 07-26-2006, 07:40 PM   #9
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I added this to my hosts.allow

portmap:192.168.4.0/28, 192.168.3.0/28
lockd:192.168.4.0/28, 192.168.3.0/28
mountd:192.168.4.0/28, 192.168.3.0/28
rquotad:192.168.4.0/28, 192.168.3.0/28
statd:192.168.4.0/28, 192.168.3.0/28

I still am getting the permission denied!
 
Old 07-26-2006, 08:14 PM   #10
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Is there a reason you are using /28 as your netmask? And what does your /etc/exports look like now? What is the IP of the client machine?
 
Old 07-26-2006, 08:23 PM   #11
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I chose a subnet mask of 255.255.255.240 as my subnet according to what my needs are and the ip of the client is 192.168.4.6 and the ip of the server is 192.168.3.1 which hosts the /home/dabeast and they are all of the same subnet of /28. I dont believe that is the issue or is it? Are you playing the jedi mind trick on me?

Last edited by metallica1973; 07-26-2006 at 08:24 PM.
 
Old 07-26-2006, 08:25 PM   #12
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
No, I was just checking. /28 is a somewhat uncommon subnet, but there's nothing wrong with it. You do allow access to the exported fs, right?
 
Old 07-26-2006, 08:29 PM   #13
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
Here is my export entry:

/home/dabeast 192.168.3.1/28(rw,async,no_root_squash)

I think it has to do with the host.deny:


http-rman : ALL EXCEPT LOCAL
portmap: ALL
lockd: ALL
mountd: ALL
rquotad: ALL
statd: ALL

Last edited by metallica1973; 07-26-2006 at 08:35 PM.
 
Old 07-26-2006, 09:29 PM   #14
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
Matir,

I just finished kicking the #$@#$@@ out of myself.

I misuderstood the mount how to that I had read from.
Under my etc/exports I had

/home/dabeast 192.168.3.1/28(rw,async,no_root_squash)

the 192.168.3.1 is the hosting server! I needed to put the ip addresses of the network that needed access like you had stated like this:

/home/dabeast 192.168.4.0/28(rw,async,no_root_squash)

It works. Here is a quick and simple how to for the idjiot out there myself:

1 - verify that you have these services running:

(SUSE 10)

nfsd
nfsboot
nfsserver
portmap

2 - edit the /etc/exports file and add an entry for the directory that you want shared, the ip address of the network or machine that you want to grant access for, and the permission of the share: an example

/home/dabeast 192.168.4.0/28(rw,async,no_root_squash)

which means: share the home directory of dabeast to the 192.168.4.0/28 network and grant them read and write access and also allow root access. This is very dangerous but this is a very basic example.

3 - edit the hosts.allow and the hosts.deny with the proper entries. The hosts.allow is examined first and if nothing is found then entries from the hosts.deny is assumed.

hosts.allow

portmap: 192.168.4.0/28
lockd: 192.168.4.0/28
mountd: 192.168.4.0/28 ## Allows access for 4.0/28
rquotad: 192.168.4.0/28
statd: 192.168.4.0/28

hosts.deny:

http-rman : ALL EXCEPT LOCAL
portmap: ALL
lockd: ALL
mountd: ALL ## Denies Access for everything
rquotad: ALL
statd: ALL

4 - Finally, After all modification have been done then you must restart the service for the changes to take effect like /etc/init.d/nfsserver restart and /etc/init.d/portmap restart. Now check the mount with the showmount -e

Export list for MetalHead:
/home/dabeast 192.168.4.0/28

5 - Now you can attempt to mount from any workstation
with mount 192.168.3.1:/home/dabeast /mnt/caca

I hope this helps - Rock On

Last edited by metallica1973; 07-26-2006 at 09:30 PM.
 
Old 07-26-2006, 09:32 PM   #15
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Glad you got it working.

I personally don't use hosts.allow and hosts.deny and instead just use iptables for controlling access to all services.
 
  


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
mounting / via nfs ? hepburnenthorpe Linux - General 2 07-12-2006 10:47 AM
NFS Mounting Riddick Linux - Networking 2 10-21-2005 01:19 AM
nfs client on knoppix 3.9 - problem mounting nfs drive Rod Butcher Linux - Networking 1 09-21-2005 04:18 AM
nfs mounting vic Linux - Networking 4 11-19-2004 01:27 PM
NFS mounting RH 7.3 suchi Linux - Networking 0 11-18-2003 04:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:29 PM.

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