Only one Debian client to access my NFS

  • Good evening,


    I'm french (sorry for the translate).


    I explain, for a school project I have to make a configuration under Openmediavault (4.1.22) respecting a specification.


    In the specifications I have "an NFS storage space accessible to a single Debian host read and write", so under OMV via the graphical interface we can put a "client authorised to mount the file system" I put the one of my debian client.


    I mounted NFS client on my debian, I did an mounting point… everything is working fine except that by trying from another vm, I could see that I can also do a mount point on the NFS so it is not accessible only since my main debian vm.


    I would like to know how to make only one debian client machine have access to my NFS share.


    Thank you in advance.



    The configuration :


    GNU nano 2.7.4 File: /etc/exports


    # This configuration file is auto-generated.

    # WARNING: Do not edit this file, your changes will be lost.

    #

    # /etc/exports: the access control list for filesystems which may be exported

    # to NFS clients. See exports(5).

    /export/NFSdata 192.168.1.72/24(fsid=1,rw,subtree_check)

    # NFSv4 - pseudo filesystem root

    /export 192.168.1.72/24(ro,fsid=0,root_squash,no_subtree_check,hide)

  • Try changing the client from 192.168.1.72/24 to 192.168.1.72/32

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    24 means only allow clients matching the first 24 bits of the ip. That is 192.168.1. The last 8 bits can be anything. 72 or 14, 1-255


    32 means all bits must match. So only 192.168.1.72 is allowed.


    It is easy to spoof IP numbers. So using just IPs like this to secure a network is not enough.


    Either used a centralized login system.


    Or...


    Use switches/routers/IPs to setup a network that only allows nfs traffic between specific clients and servers, for instance between servers inside a server room. Or in a trusted home network.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • Thank you so much.



    I would like the editing to be done automatically, so I add it to / etc / fstab, but I have to mount -a on each reboot.


    A solution?

  • You have to change it on the OMV NFS page Shares | Client box for each share.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • DylanB

    Hat das Label OMV 4.x hinzugefügt.
  • DylanB

    Hat das Label gelöst hinzugefügt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!