Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    PfSense as NFS Server

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    2 Posts 2 Posters 12.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      nemysis
      last edited by

      Have AMD Turion II Dual Core Neo N40L for pfSense with 250GB Hardisk, and Sharkoon QuickPort Quattro, Docking-Station for SATA HDs with two 1TB Harddisks to share with NFS on mine LAN, which is on Netgear ProSafe GS108E, 8 Port Gigabit Switch

      http://www.sharkoon.com/?q=de/node/1812

      pfSense IP Address 192.168.2.101, ADSL Modem 192.168.1.110

      pfSense /etc/exports

      /data1 -maproot=1000 -network 192.168.2.0/24
      /data2 -maproot=1000 -network 192.168.2.0/24

      pfSense /etc/fstab

      Device                Mountpoint      FStype  Options         Dump    Pass#

      /dev/ad4s1a             /               ufs     rw              1       1
      /dev/ad4s1b             none            swap    sw              0       0

      /dev/ad0s1a             /data1       ufs     rw      2       2
      /dev/ad1s1a            /data2       ufs     rw      2       2

      FreeBSD /etc/fstab

      Network File System, only for Client

      192.168.2.101:/zajedno1  /data1      nfs    rw,noatime      0      0
      192.168.2.101:/zajedno2  /data2      nfs    rw,noatime      0      0

      This is the same as in FreeBSD default

      grep nfs /etc/defaults/rc.conf

      netfs_types="nfs:NFS nfs4:NFS4 smbfs:SMB portalfs:PORTAL nwfs:NWFS" # Net filesystems.

      Network daemon (NFS): All need rpcbind_enable="YES"

      nfs_client_enable="NO"          # This host is an NFS client (or NO).
      nfs_access_cache="60"           # Client cache timeout in seconds
      nfs_server_enable="NO"          # This host is an NFS server (or NO).
      nfs_server_flags="-u -t -n 4"   # Flags to nfsd (if enabled).
      mountd_flags="-r"               # Flags to mountd (if NFS server enabled).
      nfs_reserved_port_only="NO"     # Provide NFS only on secure port (or NO).
      nfs_bufpackets=""               # bufspace (in packets) for client
      rpc_lockd_enable="NO"           # Run NFS rpc.lockd needed for client/server.
      rpc_statd_enable="NO"           # Run NFS rpc.statd needed for client/server.
      nfsv4_server_enable="NO"        # Enable support for NFSv4
      nfscbd_enable="NO"              # NFSv4 client side callback daemon
      nfscbd_flags=""                 # Flags for nfscbd
      nfsuserd_enable="NO"            # NFSv4 user/group name mapping daemon
      nfsuserd_flags=""               # Flags for nfsuserd

      For NFS Server have I in FreeBSD /etc/rc.conf

      Network File System

      For NFS Server and Client

      rpcbind_enable="YES"
      nfsuserd_enable="YES"

      For NFS Server

      mountd_enable="YES"
      mountd_flags="-r -p NFS-Port"
      #mountd_flags="-r"
      nfs_server_enable="YES"
      nfsv4_server_enable="YES"
      rpc_lockd_enable="YES"
      rpc_statd_enable="YES"

      For NFS Client

      #nfs_client_enable="YES"
      #nfscbd_enable="YES"

      End Network File System

      How can I use this rc.conf Settings in pfSense, I knew that is there central configuration /cf/conf/config.xml for all and in /etc
      have manu rc. files, but not normaly /etc/rc.conf.

      Is safe to make a new /etc/rc.conf with this settings, or where should I write this Settings?

      If I start NFS Server with

      /etc/rc.d/rpcbind onestart

      /etc/rc.d/mountd onestart

      /etc/rc.d/nfsd onestart

      Then works pfSense as NFS Server, but not usable as NFSv4 which I need.

      Thanks

      1 Reply Last reply Reply Quote 0
      • P
        podilarius
        last edited by

        Not sure I would use firewall as NFS server. It also looks like you fstab is backwards. Should it not be:

        <ipaddress>:/data1 /zajedno1    nfs …..

        Even if you did a reboot might and an upgrade certainly would reconfigure the exports for you. There are better things out there to do that with, like freeNAS or openNAS ...</ipaddress>

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.