Legally you can unlock by approaching the network provider or a third party unlock vendor.T-Mobile will unlock the phone if you abide to their unlock rules.Otherwise you can get the permanent remote unlock service from Unlocking4u.com and remove the network lock in iPhone 3GS.