Latest interface: 0.3.1
Latest system: 010
Install istgt from ports:
cd /usr/ports/net/istgt/
make install clean

Now adjust configuration:
ee /usr/local/etc/istgt/istgt.conf
And replace the file with the following contents:
Comment "Global section"
# node name (not include optional part)
NodeBase "vx.istgt"
# NodeBase ""

# files
PidFile /var/run/
AuthFile /usr/local/etc/istgt/auth.conf
# MediaFile /usr/local/etc/istgt/media.conf
# LiveFile /usr/local/etc/istgt/

# syslog facility
LogFacility "local7"

# socket I/O timeout sec. (polling is infinity)
Timeout 30
# NOPIN sending interval sec.
NopInInterval 20

# authentication information for discovery session
# DiscoveryAuthMethod Auto
DiscoveryAuthGroup AuthGroup9999

# reserved maximum connections and sessions
# NOTE: iSCSI boot is 2 or more sessions required
MaxSessions 32
MaxConnections 8

# iSCSI initial parameters negotiate with initiators
# NOTE: incorrect values might crash
FirstBurstLength 65536
MaxBurstLength 262144
MaxRecvDataSegmentLength 262144

Comment "Internal Logical Unit Controller"
#AuthMethod Auto
AuthMethod CHAP Mutual
AuthGroup AuthGroup10000
# this portal is only used as controller (by istgtcontrol)
# if it's not necessary, no portal is valid
#Portal UC1 [::1]:3261
Portal UC1
# accept IP netmask
#Netmask [::1]

# You should set IPs in /etc/rc.conf for physical I/F
Comment "T1 portal"
Portal DA1
# for dhcp clients use (max. 1 declaration!)
# Portal DA1

Comment "V1 group"
# InitiatorName ""
InitiatorName "vx1.ubuntu"

TargetName V1
Mapping PortalGroup1 InitiatorGroup1
AuthGroup AuthGroup1
UnitType Disk
QueueDepth 255
# QueueDepth 0
LUN0 Storage /dev/zvol/tank/zvol/V1 20GB

Now edit the auth.conf file:
ee /usr/local/etc/istgt/auth.conf
And replace the file with the following contents:
Comment "VX1"
Auth "vx1.ubuntu" "vx1passwd"

# tag 9999 is defined as AuthGroup for Dicsovery in sample istgt.conf
# Auth "*"
Auth "vx1.ubuntu" "vx1passwd"

# tag 10000 is defined as AuthGroup for UnitControl in sample istgt.conf
Comment "Unit Controller's users"
Auth "testuser" "secret" "mutual user" "mutual secret"
Auth "ctluser" "test" "mutualuser" "mutualsecret"
Auth "onlysingle" "secret"

# end

Start the daemon
Now ensure that /etc/rc.conf has the istgt_enable="YES" set. You can start the daemon with the following command:
/usr/local/etc/rc.d/istgt start
If you change the configuration you need to restart the daemon:
/usr/local/etc/rc.d/istgt restart

Valid XHTML 1.1