Apparently it is possible to unlock you iPhone legally, and it’s all down to iPhone maker Apple reports an article on the apple blog. Apple Blog member Oily Farshi claims he legitimately unlocked his 2yr old iPhone 3G simply by taking advantage of a European loophole.
What Farshi did was pay of his 2 year Sonera carrier contract, which Sonera than forwarded the request to Apple, and then when Farshi synced his iPhone 3G with iTunes he saw a prompt to install an official carrier update.
Farshi explains that paying off your contract early entitles means you complete your contract prematurely and thus the owner to have their iPhone 3G unlocked permanently and can use any carrier SIM.