Here are the instructions to unlock the iphone 3G. Before you start your iphone must be jailbroken and running the 2.2 firmware.
1.Launch Cydia
2.Press the "Manage" tab at the bottom of the screen
3.Press the "Sources" button in the middle of the screen.
4.Press the "Edit" button at the top right of the screen.
5.Press the "Add" button, top left of the screen
6.Enter http://apt9.yellowsn0w.com/ as the source url and press the Add Source button.
7.Now wait for the source to be added then press the "Return to Cydia" button.
- Top right of the screen, press 'Done"
9.Select apt9.yellowsn0w.com from the list of user entered sources.
10.Select yellowsn0w from the list of packages
11.Press "install" , top right
12.Press "confirm", top right
13.It will now install, when completed successfully press "Return to cydia"
- Turn off the phone.
15.Done!! Insert any sim you like!
Any problems :
Try taking out and reinserting your sim.
You can reset your network settings from "Settings . General . Reset Menu"
Toggle the Airplane Mode switch on and off.
Make sure 3G is turned off.
If you are still having problems then just uninstall yellowsnOw.