How to configure iSCSI service on FreeNAS with Windows server 2012 iSCSI Initiator?

Today we will look at how to configure iSCSI service on FreeNAS.

FreeNAS is a free and open-source software network-attached storage (NAS) system based on FreeBSD  system. FreeNAS supports Windows, OS X and Unix clients and various virtualization hosts such as XenServer and VMware.FreeNAS supports the OpenZFS files system which provides data integrity checking to prevent data corruption, enable point in time snapshotting, replication and several levels of redundancy including striping, mirroring, striped mirrors (RAID 1+0), and three levels of RAID-Z.

To configure iSCSI service on FreeNAS, please follow steps below:

1.Login to FreeNAS web administration:


2.Shortly i want show you some basic configuration below, You can set your own hostname,DNS and etc:

1Iscsiconfigure 2Iscsiconfigure 4Iscsiconfigure

3.Then go to  Storage->Volumes and click on Volume Manager , type Volume Name and click + to add available disk and click Add Volume:

5Iscsiconfigure 6Iscsiconfigure

4.You can set permission to that volume  by clicking Permission (2):



5.  To configure iSCSI navigate to Sharing->Block(iSCSI)->Target Global Configuration and accept or modify Base Name and click Save:


6. To setup authorized access click Add Authorized access and type User name and secret key and click OK:


7. To allow Initiators  Go to the menu Initiators > Add Initiator and click OK:


8. Click Portal->Add Portal  and select iSCSI IP and port:


9.When an iSCSI Initiator connects to an iSCSI server it connects to a Target. To create a Target click Targets and Add Target. Enter a Target Name and set all setting alike as picture below:  


10. To create volume for iSCSI  click Create zvol volume and type name for volume and size and click Add zvol:


11.To add a device extent, go to Sharing > Block ISCSI > Extents > Add Extent:


12. Type Extent name and click ok:


13.After the Extent created, the next step is the Target-Extent association. Click Associated Targets and Add Extent to Target and select Target and Extent from the list:


14. To start service iSCSI click Services menu and launch the iSCSI service:


15. That’s all for FreeNas server. Now log on to Windows server 2012(or other) and Open the iSCSI Initiator. Specify the IP address used during the Portal configuration and click Quick Connect:


16. As we see target Inactive. To active target we need to authenticate target and initiator, So click Done:


17.Select Target and click Connect:


18. Click Advanced :


19. Enable CHAP log on and type name and target secret which we define on freenas server and click OK:


20. So target is connected. Now we can enable and use iSCSI storage from Disk managment: