beautypg.com

Enabling chap for the open-iscsi iscsi initiator – HP MPX200 Multifunction Router User Manual

Page 101

background image

Enabling CHAP for the open-iscsi iSCSI initiator

To enable CHAP for the open-iscsi iSCSI initiator:
1.

Edit the /etc/iscsi/iscsid.conf file:
a.

Enable CHAP for both discovery and normal sessions:

discovery.sendtargets.auth.authmethod=CHAP
node.session.auth.authmethod=CHAP

b.

Set up the user name and password for the initiator for a normal session. For example:

# To set a CHAP username and password for initiator
# authentication by the target(s), uncomment the following lines:
#node.session.auth.username = username
#node.session.auth.password = password
node.session.auth.username = iqn.1994-05.com.redhat:fc813cac13.
sanergy33
node.session.auth.password = CHAPSecret01

c.

Set up the user name and password for the initiator for a discovery session. For example:

# To set a discovery session CHAP username and password for the initiator
# authentication by the target(s), uncomment the following lines:
#discovery.sendtargets.auth.username = username
#discovery.sendtargets.auth.password = password
discovery.sendtargets.auth.username = iqn.1994-05.com.redhat:fc813cac13.
sanergy33
discovery.sendtargets.auth.password = CHAPSecret01

2.

Save the /etc/iscsi/iscsid.conf file and start or restart iSCSI:

[root@sanergy33 iscsi]# /etc/init.d/iscsi start

or /etc/init.d/iscsi

restart

3.

Use the iscsiadm command to perform a discovery. For example:

[root@sanergy33 iscsi]# iscsiadm -m discovery -t sendtargets -p

10.10.1.23

4.

Use the iscsiadm command to log in to the iSCSI target. For example:

[root@sanergy33 iscsi]# iscsiadm --mode node --targetname
iqn.1986-03.com.hp:fcgw.mpx200.0840e00002.
b1.01.50001fe15006ac39 --login

The following is a sample iscsid.conf file for CHAP:

# *************
# CHAP Settings
# *************

# To enable CHAP authentication set node.session.auth.authmethod
# to CHAP. The default is None.
#node.session.auth.authmethod = CHAP
node.session.auth.authmethod = CHAP

# To set a CHAP username and password for initiator
# authentication by the target(s), uncomment the following lines:
#node.session.auth.username = username
node.session.auth.username = iqn.1994-05.com.redhat:fc813cac13.sanergy33
#node.session.auth.password = password
node.session.auth.password = CHAPSecret01

# To set a CHAP username and password for target(s)
# authentication by the initiator, uncomment the following lines:
#node.session.auth.username_in = username_in
#node.session.auth.password_in = password_in

# To enable CHAP authentication for a discovery session to the target
# set discovery.sendtargets.auth.authmethod to CHAP. The default is None.
#discovery.sendtargets.auth.authmethod = CHAP
node.session.auth.authmethod = CHAP

Setting up authentication

101