The iPhone Dev Team has just released ultrasn0w 1.2 which brings carrier unlock for iPhone 3GS and iPhone 3G on iOS 4.2.1 or iOS 4.1.
Simply follow the simply step by step guide posted below for unlocking iPhone 3G and iPhone 3GS on 4.2.1 firmware using.
Step 1: First follow the complete step by step guide posted here to jailbreak iPhone 3GS or iPhone 3G on iOS 4.1/4.2.1 firmware.
Step 2: Once your iPhone is jailbroken, start “Cydia” on your iPhone and touch on “Manage” tab on the bottom. Now touch on “Sources”.
Note: T-Mobile users should disable 3G before installing ultrasn0w.
Step 3: Touch on “Edit” and then on “Add”. You will be prompted to enter a url source as seen in the screenshot below. Type “http://repo666.ultrasn0w.com” and touch on “Add Source”.
Step 4: Once the repository has been added successfully, Search for “ultrasn0w” in Cydia and install this application. The latest version 1.2 of this app will automatically unlock your iPhoneso that you can use it with any carrier with proper carrier name/logo.
Step 5: Now simply restart your iPhone. Voila! You should now have a fully unlocked iPhone 3G/3GS on firmware 4.1/4.2.1.