well you can unlock jailbreak iphone 2g,3g,3gs from your computer just installed itune for 2g best firmware is 3.1.3 Turn off your device press menu button and put cable your set will goes to recovery mod open itune and you will see your set in recovery mode just press shift button and open the destination file where you downloaded the 3.1.3 when the restoring is comlete. Just jailbreak your 2g with redsnow the one i mentioned. Same process for 3g 3gs you just need 4.1 firmware for 3g 3gs and redsnow for 4.1 firmware follow the instructions update your baseband to 6.15 and 6.15 is ipad baseband. Just put repo666.ultrasn0w.com installed this source from cydia and your set 3g, 3gs will be unlocked.
for 4g if you need factory unlocking you just need to know about your network it will be in setting general about check it. There are many online websites unlocking many networks like o2,t-mobile,vodafone,orange etc.