The PwnageTool for Mac OS X have been released now and you could use to jailbreak your iPhone 3G on iOS 4.1 while preserving the baseband so that you could unlock iPhone 3G 4.1 iOS. The old version of Ultrasn0w, that is version 1.1-1 could be used to unlock iPhone 3G 4.1 iOS. Here are the steps to do it.
NOTE: You could now use the guide given here instead of this.
How to Unlock iPhone 3G iOS 4.1
1. Jailbreak iPhone 3GS on iOS 4.1 using the guide given here.
2. Launch Cydia.
3. Choose the Manage tab at the bottom.
4. Choose the Sources option.
5. Tap the Edit button and then on the Add button.
6. Then add the source http://repo666.ultrasn0w.com.
7. After the source is added, search for â€ ultrasn0w 1.1-1 â€ in Cydia.
8. Install the Ultrasn0w 1.1-1 app to unlock iPhone 3GS 4.1 firmware.
9. Restart your iPhone 3GS.
Thatâ€™s it! Now you have an unlocked iPhone 3GS running iOS 4.1.?