One of the great things about the iPhone is that you can connect to the Internet just about anywhere. And the bad thing is that sidejackers and bad guys may be working in the same public places as you.
However, AnchorFree, the maker of the Hotspot Shield virtual private network (VPN) service for Mac and Windows laptops, recently released a service for the iPhone.
I found the software service simple and straightforward. After clicking to the Hotspot Shield for iPhone Welcome Page, you just click on the Get Started button, which presents the settings for the iPhone's built-in VPN client; it also gives you a password.
After logging the information into the iPhone, you just click the VPN button in the Network settings panel. It connected and a little blue VPN icon displayed up in the connection bar at the top of the screen.
Of course, this means turning off the general WiFi button in the Network panel. If you want to connect to a trusted WiFi network at work, just turn off the VPN.
Glenn Fleishman at TidBITS points out that the version of Hotspot Shield for notebook computers is based on the OpenVPN project, a "lightweight" design for SSL authentication.
... But Hotspot Shield has two problems for the iPhone. First, it requires that you download and install Mac OS X or Windows software to create a connection; the iPhone doesn't yet allow VPN software to be installed. Second, the iPhone also doesn't yet natively support SSL/TLS VPNs, despite their popularity.
To work around these problems, AnchorFree chose to add to Hotspot Shield a VPN type that the iPhone has built in: L2TP, which stands for Layer 2 Tunneling Protocol over IPsec (Internet Protocol security). L2TP is an extremely strong method of creating a secure connection, and is one of three methods that the iPhone 2.0 Software and later support. (Alas, the iPhone can't maintain a seamless VPN connection when you roam among Wi-Fi networks or between Wi-Fi and cell data networks; you have to disable and then re-enable the VPN connection for each network move.)