Follow the following steps for both Windows and Mac Operating systems :
1) 2.2.1 Firmware from Apple iPhone 3G updates the baseband to 2.30 disabling the software unlock.
2) Make sure you have jailbroken your iPhone 3G Firmware below 2.2.1 using QuickPwn 2.2.
3) Now,if you have access to a Mac, feel free to download Pwnage 2.2.5 and build a custom firmware. Windows users might want to download the custom firmware and restore to that firmware using iTunes (Hold Shift key (Windows) / Opt key (Mac) whle hitting the restore button in iTunes).
4) Follow this post if you need to unlock your iPhone 3G.
Enjoy your iPhone 3G 2.2.1 with the software unlock! You don’t have to worry about Apple screwing up your unlock chances till iPhone Firmware 2.3.
p.s : My test environment involves Intel Macs and iPhone 3G.