# bad export list line NFS



## jemate18 (Feb 19, 2009)

This is my /etc/exports


```
/cdrom -ro *.my.domain
/mnt/files -ro 192.168.10.0/24
```

On the client, i type 

```
sudo mount -t nfs someserver:/cdrom /mnt
```
output was 

```
mount.nfs: access denied by server while mounting someserver:/cdrom
```

I checked /var/log/messages on someserver and here is what I found

```
Feb 19 14:14:29 imp mountd[593]: bad host 192.168.10.0/24, skipping
Feb 19 14:14:29 imp mountd[593]: bad exports list line /mnt/files -ro 192.168.10.0/24

Feb 19 14:14:29 imp mountd[593]: bad host *.my.domain, skipping
Feb 19 14:14:29 imp mountd[593]: bad exports list line /cdrom -ro *.my.domain
```

I have read a tutorial about specifying the whole domain or ip range... what could be the problem? I'm using FreebSD 7 as the nfs server and an ubuntu PC as the nfs client.

Thanks


----------



## SirDice (Feb 19, 2009)

Your netmask is wrong. IIRC you can't use CIDR notation.


----------



## jemate18 (Feb 19, 2009)

SirDice said:
			
		

> Your netmask is wrong. IIRC you can't use CIDR notation.




tried to change my /etc/exports to

```
/cdrom -ro 192.168.10.0/255.255.255.0
```


output is:

```
Feb 19 16:41:02 imp mountd[593]: bad host 192.168.10.0/255.255.255.0, skipping
Feb 19 16:41:02 imp mountd[593]: bad exports list line /cdrom -ro 192.168.10.0/255.255.255.0
```


----------



## SirDice (Feb 19, 2009)

Here's one of mine that works:


```
/usr/ports -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0
```

man exports for more info.

Edit: You can use CIDR notation but it should be something like this:


```
/usr/ports -ro -maproot=0 -network 192.168.1.0/24
```


----------



## jemate18 (Feb 19, 2009)

Thanks it worked...


However i was wondering about why this


```
/cdrom -ro *.my.domain
```

doesn't work... if i specify ip address then ok[it works]. 

But with *.my.domain it fails.... Do i have to do the maproot here?

Thanks again


----------



## SirDice (Feb 19, 2009)

The maproot is just to make sure the root uids are the same on the client and server.

As for *.my.domain, you would need to create a netgroup.

man exports:


> The third component of a line specifies the host set to which the line
> applies.  The set may be specified in three ways.  The first way is to
> list the host name(s) separated by white space.  (Standard Internet
> ``dot'' addresses may be used in place of names.)  The second way is to
> ...


----------



## SirDice (Feb 19, 2009)

(double post, can't delete my own posts  )


----------

