Product SiteDocumentation Site

9.3. Setting up a Kerberized NFS Server

FreeIPA can be used to set up a Kerberized NFS server.

NOTE

The NFS server does not need to be running on Fedora.

9.3.1. Setting up a Kerberized NFS Server

  1. If the NFS host machine has not been added as a client to the FreeIPA domain, then create the host entry. See Section 6.2, “Adding Host Entries”.
  2. Create the NFS service entry in the FreeIPA domain. See Section 6.5.1, “Adding and Editing Service Entries and Keytabs”.
  3. Generate an NFS service keytab for the NFS server. If this command is run on the NFS server, then save the keys directly to the host keytab. For example:
    If this command is run on a different machine:
    1. Save the keytab to a temporary file. For example:
      ... -k /tmp/nfs.keytab
    2. Copy the keytabs over to the NFS machine.
    3. Set the file permissions to 0700.
    4. On the NFS host machine, add the service key to the keytab file.
      #  (  echo rkt /tmp/nfs.keytab; echo wkt /etc/krb5.keytab) |ktutil
  4. Install the NFS packages. For example:
    # yum install nfs-utils
  5. Edit the NFS server configuration to use NFSv4 security by uncommenting the SECURE_NFS line.
    # vim /etc/sysconfig/nfs
    
    SECURE_NFS="yes"
  6. If the NFS server and client are in different DNS domains, then configure the NFS domain.
    # vim /etc/idmapd.conf
    
    Domain = example.com
  7. Edit the /etc/exports file and add the Kerberos information:
    /export  *(rw,sec=sys:krb5:krb5i:krb5p)
    
  8. Restart the NFS server.
    # service nfs restart
  9. Configure the NFS server as an NFS client, following the directions in Section 9.3.2, “Setting up a Kerberized NFS Client”.

9.3.2. Setting up a Kerberized NFS Client

  1. If the NFS client is not enrolled as a client in the FreeIPA domain, then set up the required host entries.
    1. Create the host entry. See Section 6.2, “Adding Host Entries”.
    2. Generate host keytab for the NFS client. If this command is run on the NFS clien, then save the keys directly to the host keytab. For example:
      If this command is run on a different machine:
      1. Save the keytab to a temporary file. For example:
        ... -k /tmp/nfs.keytab
      2. Copy the keytabs over to the NFS machine.
      3. Set the file permissions to 0700.
      4. On the NFS host machine, add the service key to the keytab file.
        # ( echo rkt /root/nfs-client.keytab; echo wkt /etc/krb5.keytab) |ktutil
  2. Edit the NFS common configuration to enable client-side secure NFS, by uncommenting the SECURE_NFS line.
    # vim /etc/sysconfig/nfs
    
    SECURE_NFS="yes"
  3. If the NFS server and client are in different DNS domains, then configure the NFS domain. The idmapd.conf must be the same on the NFS client as it is on the NFS server.
    # vim /etc/idmapd.conf
    
    Domain = example.com
  4. Start the GSS daemon.
    # service rpc.gssd start
  5. Mount the directory.
    # echo "$NFSSERVER:/this /mnt/this nfs4 sec=krb5i,rw,proto=tcp,port=2049"  >>/etc/fstab
    # mount -av