Using NFS to automate the transfer of disconnected scan results from IBM i (disconnected scenario)

You can use NFS to automate the transfer of scan results from IBM i computers to the License Metric Tool server. The results will be stored in a shared directory and imported by License Metric Tool without any additional actions.

About this task

You can use NFS in different configurations:
  • License Metric Tool acts as an NFS server
  • Each IBM i computer acts as an NFS server
  • You use a separate NFS server

In this procedure, License Metric Tool that is installed on Linux acts as an NFS server and shares a directory with an IBM i system that acts as an NFS client. Scan results that are saved to the shared directory on the IBM i system are readily available to License Metric Tool.

Procedure

  1. Configure the License Metric Tool server to allow transfer of data by using NFS.
    1. Install the nfs-utils package.
    2. Configure the firewall to allow NFS-related traffic from IBM i computers.
    3. Create a directory for the results of disconnected scans and change its ownership and rights.
      • On Red Hat Enterprise Linux 7, run the following command:
        mkdir /disconnected
        chown nfsnobody:nfsnobody /disconnected
        chmod 755 /disconnected
      • On Red Hat Enterprise Linux 8 and higher, run the following command:
        mkdir /disconnected
        chown nobody:nobody /disconnected
        chmod 755 /disconnected
    4. Add this directory as a data source in License Metric Tool.
    5. Edit /etc/exports, and add the directory to the list of shared directories. The following example shows a single IP address of an IBM i computer, but you can specify a range of addresses.
      /disconnected 172.16.0.31(rw,sync)
      Tip: If you experience issues with access permissions, add the all_squash option to the command to force all connecting users to use the nfsnobody or nobody account (depending on the version of Red Hat Enterprise Linux): /disconnected 172.16.0.31(rw,sync,all_squash).
    6. To refresh the NFS configuration, run the following command.
      exportfs -rav
    7. On Red Hat Enterprise Linux 8 and higher, run the following command to share files with the read/write access.
      setsebool -P nfs_export_all_rw 1
  2. On the IBM i computer, create an output directory for scan results and mount the shared directory from the License Metric Tool server.
    MKDIR '/lmt_server'
    ADDMFS TYPE(*NFS) MFS('IP_address_of_LMT_server:/disconnected') MNTOVRDIR('/lmt_server') OPTIONS(*DFT)
    This step connects these directories. Whenever you save files into /lmt_server, they also become available in the /disconnected directory on the License Metric Tool server.
  3. Open the disconnected scanner installation directory, and modify the following parameter in the bin/tools.sh script to save all scan results into the new output directory.
    PACKAGE_OUTPUT_DIR="/lmt_server"
  4. Run the software scan to collect new scan results. When the scan is complete, the package with scan results can be imported to License Metric Tool by running an import.