LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NFS Mounting Issue (https://www.linuxquestions.org/questions/linux-networking-3/nfs-mounting-issue-468013/)

metallica1973 07-26-2006 06:41 PM

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

Matir 07-26-2006 06:43 PM

You have a space between the network and the options.

metallica1973 07-26-2006 06:44 PM

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

metallica1973 07-26-2006 06:46 PM

Matir,

I cannot stand you, you know why because you are right 99 percent of the time. Many thanks!

metallica1973 07-26-2006 06:50 PM

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.

Matir 07-26-2006 06:56 PM

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.

metallica1973 07-26-2006 07:23 PM

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.?

Matir 07-26-2006 07:27 PM

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.

metallica1973 07-26-2006 07:40 PM

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!

Matir 07-26-2006 08:14 PM

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?

metallica1973 07-26-2006 08:23 PM

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?

Matir 07-26-2006 08:25 PM

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?

metallica1973 07-26-2006 08:29 PM

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

metallica1973 07-26-2006 09:29 PM

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

Matir 07-26-2006 09:32 PM

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.


All times are GMT -5. The time now is 06:19 AM.