By using profile files for device configuration, iPhone can be set up to automatically establish a secure VPN connection when connecting public unsafe wireless networks. This article contains an explanation and an easily customizable template.