To jailbreak an iPhone, you would need the right firmware version. Although 4.2.1 can be jailbroken, it is not recommended for the iPhone as it is still a tethered jailbreak. Versions below 4.1 can be jailbroken with the jailbreakme.com
website. Simply point your browser to the URL and slide the rectangular slider. For version 4.1, download limera1n or greenpoison. The router feature is available in the Cydia Store. The app is called 'MyWi'. It's not free but every dollar is worth it!