Creating a folder for exporting events to a network resource

You can export events to a file and save the file on a network resource of a computer that performs Server functions. To do so, you can use the Network File System (NFS) protocol, which is employed to mount a shared network resource of another computer (such as an NFS server export point) in the local file system of the Server computer. The standard tools of the operating system can be used to create a folder and to mount a shared network resource.

When using the NFS protocol, the rpcbind software package is activated in the operating system. Please keep in mind that cybercriminals may attempt to use this software package to conduct certain types of DDoS attacks. To eliminate an infiltration threat, the firewall must be properly configured. In the CentOS operating system version 8.3 or later, you are advised to use the network security configuration application known as Firewalld. In the Astra Linux SE 1.6 operating system, you are advised to use the network security configuration application known as UFW.

Manually creating a folder and mounting a shared network resource

To create a folder for saving files to a network resource:

  1. Open the operating system console.
  2. Create a local folder for mounting the shared network resource. To do so, enter the following command:

    mkdir <full path of the local folder>

    For example:

    mkdir ~/nfsshare

  3. After the folder is created, enter the following command for mounting a network resource:

    sudo mount -t nfs <name or IP address of the remote computer>:\

    <full path of the shared network resource>\

    <full path of the local folder>

    For example:

    sudo mount -t nfs nfs-server.example:/nfsshare ~/nfsshare

  4. Check the mount result by using the following command:

    mount | grep <full path of the local folder>

    For example:

    mount | grep ~/nfsshare

    If mounting was successful, you will see data containing the name or IP address of the remote computer, the name of the shared network resource, and the name of the parent folder.

Automatically mounting a shared network resource

To configure automatic mounting of a shared resource in the CentOS operating system:

Open the /etc/fstab file for editing with root privileges and add the following string to the text of the file:

<name or IP address of the remote computer>:<full path of the shared network resource> <full path of the local folder> nfs defaults 0 0

For example:

nfs-server.example:/nfsshare /home/user1/nfsshare nfs defaults 0 0

To configure automatic mounting of a shared resource in the Astra Linux SE 1.6 operating system:

  1. Check whether the libpam-mount package is available. In the Astra Linux SE 1.6 operating system, this package might not be installed by default.

    To check if the package is available, enter the following command in the command line:

    dpkg -l libpam-mount

    If the libpam-mount package is not detected in the operating system, install this package by using the following command:

    sudo apt install libpam-mount

    After entering this command, perform the necessary actions at the system prompts.

  2. Open the /etc/security/pam_mount.conf.xml file for editing with root privileges and edit or add the volume tag string within the pam_mount tag:

    <volume fstype="nfs" server="<name or IP address of the remote computer>" path="<full path of the shared network resource>" mountpoint="<full path of the local folder>" user="<user name>" options="defaults" />

    Example values for the volume tag string:

    <volume fstype="nfs" server="nfs-server.example" path="/nfsshare" mountpoint="/home/%(USER)/nfsshare" user="user1" options="defaults" />

    where user1 is the user name for which the network resource nfs-server.example/nfsshare will be connected as the /home/user1/nfsshare folder when the user logs in to the system.

Page top