Posted: April 28th, 2009 | Author: xanda | Filed under: IT Related | Tags: iSCSI, iSCSI Initiator, linux, ubuntu | No Comments »
This is not the first time I deal with SAN device but I never use it with Ubuntu Linux before. Anyway, there is first time for everything.
After 15 minutes playing around with Open-iSCSI (it can be done in just a few seconds in Windows by using GUI based iSCSI Initiator), here is the howto (and at the same time as a note for myself)
1) Install Open-iSCSI Initiator
sudo apt-get install open-iscsi |
sudo apt-get install open-iscsi
2) If you want your computer manually connect to the SAN volume, proceed with step 3. But if you want your computer automatically connect to the volume, edit the iscsid configurtation file
sudo nano /etc/iscsi/iscsid.conf |
sudo nano /etc/iscsi/iscsid.conf
And change the following parameters
- isns.address = SAN-IP-ADDRESS-HERE
- isns.port = 3260
3) If the restriction is based on IP (without password) procees with step 4. But if password is required, edit the iscsid configurtation file
sudo nano /etc/iscsi/iscsid.conf |
sudo nano /etc/iscsi/iscsid.conf
And change/set the following parameters
- node.session.auth.username = USER
- node.session.auth.password = PASSWORD
- discovery.sendtargets.auth.username = USER
- discovery.sendtargets.auth.password = PASSWORD
4) Restart the open-iscsi service
sudo /etc/init.d/open-iscsi restart |
sudo /etc/init.d/open-iscsi restart
5) Run open-iscsi administration utility with root privilege to discover available volume
sudo iscsiadm -m discovery -t sendtargets -p 192.168.10.1 |
sudo iscsiadm -m discovery -t sendtargets -p 192.168.10.1
where 192.168.10.1 is the IP of your SAN. If your configuration is working, you will get something similar to this :-
192.168.10.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-f260b4603-e8b0000001249f55-vss-control
192.168.10.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-6980b4603-a990000001f49f56-csmvol3
192.168.10.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-58c0b4603-1730000001c49f56-csmvol2
192.168.10.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-4280b4603-a410000001949f56-csmvol1 |
192.168.10.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-f260b4603-e8b0000001249f55-vss-control
192.168.10.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-6980b4603-a990000001f49f56-csmvol3
192.168.10.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-58c0b4603-1730000001c49f56-csmvol2
192.168.10.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-4280b4603-a410000001949f56-csmvol1
6) In this case, I want to connect to volume 1 (iqn.2001-05.com.equallogic:0-8a0906-4280b4603-a410000001949f56-csmvol1), so here is what I should do
sudo iscsiadm --mode node --targetname iqn.2001-05.com.equallogic:0-8a0906-4280b4603-a410000001949f56-csmvol1 --portal 192.168.10.1:3260 --login |
sudo iscsiadm --mode node --targetname iqn.2001-05.com.equallogic:0-8a0906-4280b4603-a410000001949f56-csmvol1 --portal 192.168.10.1:3260 --login
And if you are successfully connected, you’ll get the following message
Logging in to [iface: default, target: iqn.2001-05.com.equallogic:0-8a0906-4280b4603-a410000001949f56-csmvol1, portal: 192.168.10.1,3260]
Login to [iface: default, target: iqn.2001-05.com.equallogic:0-8a0906-4280b4603-a410000001949f56-csmvol1, portal: 192.168.10.1,3260]: successful |
Logging in to [iface: default, target: iqn.2001-05.com.equallogic:0-8a0906-4280b4603-a410000001949f56-csmvol1, portal: 192.168.10.1,3260]
Login to [iface: default, target: iqn.2001-05.com.equallogic:0-8a0906-4280b4603-a410000001949f56-csmvol1, portal: 192.168.10.1,3260]: successful
7) Now, verify the device name that has been connected to your machine
tail -f /var/log/messages |
tail -f /var/log/messages
And in my case, this is my output
Apr 28 09:42:48 xps kernel: [ 2514.014658] scsi 6:0:0:0: Direct-Access EQLOGIC 100E-00 4.0 PQ: 0 ANSI: 5
Apr 28 09:42:48 xps kernel: [ 2514.016499] sd 6:0:0:0: [sdb] 209725440 512-byte hardware sectors: (107 GB/100 GiB)
Apr 28 09:42:48 xps kernel: [ 2514.017832] sd 6:0:0:0: [sdb] Write Protect is off
Apr 28 09:42:48 xps kernel: [ 2514.018256] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Apr 28 09:42:48 xps kernel: [ 2514.019240] sd 6:0:0:0: [sdb] 209725440 512-byte hardware sectors: (107 GB/100 GiB)
Apr 28 09:42:48 xps kernel: [ 2514.019434] sd 6:0:0:0: [sdb] Write Protect is off
Apr 28 09:42:48 xps kernel: [ 2514.019836] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Apr 28 09:42:48 xps kernel: [ 2514.019842] sdb: sdb1
Apr 28 09:42:48 xps kernel: [ 2514.024882] sd 6:0:0:0: [sdb] Attached SCSI disk
Apr 28 09:42:48 xps kernel: [ 2514.026039] sd 6:0:0:0: Attached scsi generic sg2 type 0 |
Apr 28 09:42:48 xps kernel: [ 2514.014658] scsi 6:0:0:0: Direct-Access EQLOGIC 100E-00 4.0 PQ: 0 ANSI: 5
Apr 28 09:42:48 xps kernel: [ 2514.016499] sd 6:0:0:0: [sdb] 209725440 512-byte hardware sectors: (107 GB/100 GiB)
Apr 28 09:42:48 xps kernel: [ 2514.017832] sd 6:0:0:0: [sdb] Write Protect is off
Apr 28 09:42:48 xps kernel: [ 2514.018256] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Apr 28 09:42:48 xps kernel: [ 2514.019240] sd 6:0:0:0: [sdb] 209725440 512-byte hardware sectors: (107 GB/100 GiB)
Apr 28 09:42:48 xps kernel: [ 2514.019434] sd 6:0:0:0: [sdb] Write Protect is off
Apr 28 09:42:48 xps kernel: [ 2514.019836] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Apr 28 09:42:48 xps kernel: [ 2514.019842] sdb: sdb1
Apr 28 09:42:48 xps kernel: [ 2514.024882] sd 6:0:0:0: [sdb] Attached SCSI disk
Apr 28 09:42:48 xps kernel: [ 2514.026039] sd 6:0:0:0: Attached scsi generic sg2 type 0
The connected volume appear to be as SDB in my machine
8 ) If the volume already contain partition and already formated, you can straight away mount them, but if they dont have partition and filesystem yet, you can either use fdisk or gparted to create the partition and format them 😉
Enjoy..!~
Demo for fdisk -l output
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x12961295
Device Boot Start End Blocks Id System
/dev/sda1 1 12 96358+ de Dell Utility
/dev/sda2 * 13 7661 61440592+ 7 HPFS/NTFS
/dev/sda3 7662 11396 30001387+ b W95 FAT32
/dev/sda4 11397 19457 64749982+ 5 Extended
/dev/sda5 11397 11520 995998+ 82 Linux swap / Solaris
/dev/sda6 11521 19457 63753921 83 Linux
Disk /dev/sdb: 107.3 GB, 107379425280 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00093e08
Device Boot Start End Blocks Id System
/dev/sdb1 1 13054 104856223+ 83 Linux |
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x12961295
Device Boot Start End Blocks Id System
/dev/sda1 1 12 96358+ de Dell Utility
/dev/sda2 * 13 7661 61440592+ 7 HPFS/NTFS
/dev/sda3 7662 11396 30001387+ b W95 FAT32
/dev/sda4 11397 19457 64749982+ 5 Extended
/dev/sda5 11397 11520 995998+ 82 Linux swap / Solaris
/dev/sda6 11521 19457 63753921 83 Linux
Disk /dev/sdb: 107.3 GB, 107379425280 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00093e08
Device Boot Start End Blocks Id System
/dev/sdb1 1 13054 104856223+ 83 Linux
[Reference: Cyberciti & Ubuntu Forum]
Posted: April 21st, 2009 | Author: xanda | Filed under: IT Related | Tags: oracle, sun | No Comments »

SANTA CLARA, Calif., April 20, 2009 — Sun Microsystems (NASDAQ: JAVA) and Oracle Corporation (NASDAQ: ORCL) announced today they have entered into a definitive agreement under which Oracle will acquire Sun common stock for $9.50 per share in cash. The transaction is valued at approximately $7.4 billion, or $5.6 billion net of Sun’s cash and debt.
[Read more]
Posted: March 31st, 2009 | Author: xanda | Filed under: IT Related | Tags: 2009, april, conficker, conficker.c | No Comments »
has been observing increasing trend of IT security related discussion and information sharing about a worm variant called Conficker.C on the internet. It is expected that the enhanced version of previous worm variant Conficker.A and Conficker.B will trigger on the coming 1st of April. Security researchers believe, the latest outbreak of Conficker variant C began first spreading at roughly 6 p.m. PST, 4 March 2009 (5 March UTC). would like to highlight that this is not a new outbreak nor a new piece of malware. Removal and mitigation strategies were highlighted in our previous advisory.
[">Read more]
Posted: March 10th, 2009 | Author: xanda | Filed under: IT Related | Tags: howto, install, ruby, scrubyt, setup, ubuntu | 5 Comments »
scRUBYt! is a simple but powerful web scraping toolkit written in Ruby. It’s purpose is to free you from the drudgery of web page crawling, looking up HTML tags, attributes, XPaths, form names and other typical low-level web scraping stuff by figuring these out from your examples copy’n’pasted from the Web page or straight from Firebug.
Here are some tips on how to make scRUBYt! works on Ubuntu Linux :
Update your packages list
Now install build-essential and dependencies
sudo apt-get install build-essential ruby-full rubygems libxml-ruby libxslt1.1 libxslt1-dev libxslt-ruby libxml2 libxml2-dev |
sudo apt-get install build-essential ruby-full rubygems libxml-ruby libxslt1.1 libxslt1-dev libxslt-ruby libxml2 libxml2-dev
By using gem, install scRUBYt!’s dependencies
sudo gem install rack rubyforge rake hoe sinatra nokogiri user-choices xml-simple s4t-utils builder commonwatir activesupport hpricot mechanize firewatir |
sudo gem install rack rubyforge rake hoe sinatra nokogiri user-choices xml-simple s4t-utils builder commonwatir activesupport hpricot mechanize firewatir
Finally, install scrubyt
Enjoy! 😀
Posted: March 10th, 2009 | Author: xanda | Filed under: IT Related | Tags: linux, secure, security, vulnerable | No Comments »

Damn Vulnerable Linux (DVL) is a Slackware and Slax-based live DVD purposefully stuffed with broken, ill-configured, outdated and exploitable software, began life as a training system used during the author’s university lectures.
Its primary goal is to design a Linux system that is as vulnerable as possible — in order to teach and demonstrate a variety of security topics, including reverse code engineering, buffer overflows, shell code development, web exploitation, and SQL injection.
It contains older, easily breakable versions of Apache, MySQL, PHP, and FTP and SSH daemons, as well as several tools available to help you compile, debug, and break applications running on these services, including GCC, GDB, NASM, strace, ELF Shell, DDD, LDasm, LIDa, and more.
So if you are looking for a new playground, DVL is a good choice for you.