6.11. Creating an iSCSI ACL
Create Access Control Lists (ACLs) to define which initiators can access specific storage targets and control permissions for secure iSCSI connections. This essential security measure ensures only authorized clients can access your shared storage resources.
For more information, see the targetcli(8) man page on your system.
Prerequisites
-
Installed and running
targetcli. For more information, see Installing targetcli. - An iSCSI target associated with a Target Portal Groups (TPG). For more information, see Creating an iSCSI target.
Both targets and initiators have unique identifying names. You must know the unique name of the initiator to configure ACLs. The /etc/iscsi/initiatorname.iscsi file, provided by the iscsi-initiator-utils package, contains the iSCSI initiator names.
Procedure
- Optional: To disable auto mapping of LUNs to ACLs, see Creating a read-only iSCSI LUN.
Navigate to the
aclsdirectory:/> iscsi/target_iqn_name/tpg_name/acls/Use one of the following options to create an ACL:
Use the initiator_iqn_name from the
/etc/iscsi/initiatorname.iscsifile on the initiator:iscsi/target_iqn_name/tpg_name/acls> create initiator_iqn_name Created Node ACL for initiator_iqn_name Created mapped LUN 2. Created mapped LUN 1. Created mapped LUN 0.Use a custom_name and update the initiator to match it:
iscsi/target_iqn_name/tpg_name/acls> create custom_name Created Node ACL for custom_name Created mapped LUN 2. Created mapped LUN 1. Created mapped LUN 0.For information about updating the initiator name, see Creating an iSCSI initiator.
Verification
Verify the created ACL:
iscsi/target_iqn_name/tpg_name/acls> ls o- acls .................................................[1 ACL] o- target_iqn_name ....[3 Mapped LUNs, auth] o- mapped_lun0 .............[lun0 ramdisk/ramdisk1 (rw)] o- mapped_lun1 .................[lun1 block/block1 (rw)] o- mapped_lun2 .................[lun2 fileio/file1 (rw)]