Solved Setting up NFS Sharing, KODI cannot see shares
#1
I've been banging my head against a wall for an hour or two with this and I cannot get Kodi to recognise NFS shares on my server.

Server: Ubuntu 18.04

/etc/exports
Quote:# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_sub$
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/mnt/nfs_share  192.168.1.0/25(rw,no_subtree_check,no_root_squash,insecure)

Every device in the house is between 192.168.1.1 and 192.168.1.14

I can connect from my laptop (Mint 20.0) using file manager via a mount no problem at all, and add, remove and edit files. 

A clean install of Kodi on the same laptop flatly refuses to see anything NFS related. If i try to add a source from network file system (browse for new share) it times out, if i try adding it manually as a network connection the same issue. 

Image

Logfiles

basic log trying to add via browse and add manually https://paste.kodi.tv/nuqaxegumu.kodi

full log https://paste.kodi.tv/ubobuzoneq.kodi

(I actually want to get it working on fire tv but using laptop as the test because thats a a clean install and i know laptop can connect to nfs by mounting)


EDIT: I may have found the root cause.. If I disable UFW i can see the shares in Kodi, so its some sort of UFW issue
Reply
#2
Some progress.. Its UFW related

If I disable UFW completely I can access shares
Reply
#3
ok, ignore this all

i solved it by just globally opening the firewall to the device in question. not the best solution but heck it works.
Reply
#4
Or you could add the NFS ports to your firewall.
Reply
#5
Thread marked solved.
Reply
#6
(2020-08-19, 21:32)Klojum Wrote: Or you could add the NFS ports to your firewall.

did that (111 and 2049), and it wasnt letting me through

i can see things now, only trouble is now its not letting me write to the damn folders from kodi lol...

might have inherited an ownership when i moved stuff intot he remote folder.
Reply
#7
Code:
# ufw allow nfs
Need help programming a Streamzap remote?
Reply
#8
(2020-08-19, 22:55)graysky Wrote:
Code:
# ufw allow nfs

did that and it only added 2409 to the rules which still blocked kodi accessing
Reply
#9
(2020-08-19, 21:54)dm21912 Wrote: did that (111 and 2049), and it wasnt letting me through

Apparently there are more ports involved in case you turn off UFW, and stuff suddenly works. Maybe try a port sniffer?
Reply
#10
(2020-08-20, 08:13)Klojum Wrote:
(2020-08-19, 21:54)dm21912 Wrote: did that (111 and 2049), and it wasnt letting me through

Maybe try a port sniffer?
Won't help because of how NFS works. Port 2049 is for NFSv4. Prior to NFSv4, the NFS client asks rpcbind (over port 111) for which port the server is running on. That port is dynamically determined. The libnfs in Ubuntu 18.04 doesn't support NFSv4. Newer libnfs does, but Kodi doesn't support it. See #17387.

Read this guide on how to secure NFS and set fixed ports for statd, mountd, lockd, and rquotad.
Reply
#11
Alternatively, the OP could allow traffic from the secure LAN or from the IP address of the NFS server and be done with it, https://wiki.archlinux.org/index.php/Unc...figuration
Need help programming a Streamzap remote?
Reply
#12
(2020-08-20, 16:48)graysky Wrote: Alternatively, the OP could allow traffic from the secure LAN or from the IP address of the NFS server and be done with it, https://wiki.archlinux.org/index.php/Unc...figuration

yeh, ive just given my firestick unrestricted access to the server Big Grin

if someone does break into my house to hack me the likelihood they use the firestick to do it is remote
Reply

Logout Mark Read Team Forum Stats Members Help
Setting up NFS Sharing, KODI cannot see shares0