From ModMyiFone - Wiki
This guide will teach you how to unlock an iPhone which is activated, jailbroken, and running the 1.1.1 firmware.
Step 1. - Install anySIM 1.1
Download (but do NOT run yet) iNdependence 1.2.5 and anySIM 1.1. If you already downloaded the virginizing pack, then you already have them, as they're included in there. Unzip the anySIM file so the anySIM file is on your desktop.
Make sure your iPhone is connected to the computer, and iTunes is NOT running. Also open Activity Monitor (Applications/Utilities/Activity Monitor) and make sure iTunes Helper is quit - click it and click Force Quit if its active).
Make sure OpenSSH is installed onto your iPhone, and you have the AutoLock set to Never and you know your iPhone's IP address. If you don't know how to do this, its detailed in the virginizing guide, and the prep guide.
Now open iNdependence. At the bottom it should say its connected to the iPhone with 1.1.1 firmware. Under the Customize tab, click Applications>System, and then hit the Add button.
iNdependence will ask you which application you want to install onto the iPhone. Navigate to the anySIM file you just downloaded, and hit Open.
Now type in your iPhone's IP address, and the root password. If you haven't changed it yet, its Alpine, or dottie.
iNdependence will tell you it is Setting application permissions...
If it says the host verification failed then click Yes to continue.
NOTE: I recommend you also install Installer.app from the virginizing pack as well using these same methods before continuing. This will get you ready for easy application management on your unlocked iPhone.
Reboot your iPhone (just once ;) ) and move on to the next step to unlock it...
Step 2. - Unlock the iPhone
All right, you should now have anySIM installed on your iPhone. On the homescreen of your iPhone, click the anySIM icon. You will see this screen:
Slide to unlock like it asks.
The next page will display a TOS. Read it, scroll down, and click OK, Unlock My iPhone.
Wait a few minutes as it goes through the steps, and then you will get a success message!
Congratulations, you're running an unlocked iPhone with the 1.1.1 firmware!