Setting up VPN server
Warning: This guide is very out of date.Wi-Fi hotspots can sniff any unencrypted data and manipulate pages you open.
VPN encrypts and tunnels all Internet traffic to a machine of your choice. It's quite important if you want to use Wi-Fi hotspots with iPhone, because owner of Wi-Fi hotspot can view all unencrypted traffic, and if Wi-Fi signal isn't encrypted, anyone can. OTOH with VPN you can leech any connection on nobody will see what you're doing (except tunelling lots of unrecognizable data).Your Mac compresses and securely pipes data to your iPhone. I've heard people don't read anyting except image captions.
You will need a Mac with Tiger or Leopard and external IP address that can accept incoming TCP and UDP connections. Mac must be kept switched on while you browse from your iPhone (you will still be able to browse if Mac is shut down, but you'll have to disable VPN and lose security).
Don't forget to open ports in your firewall, forward ports on router and enable L2TP/VPN passthrough in your router's configuration (if it has such option).
To set up VPN server just follow an excellent guide on macosxhints.com.
Leopard needs a little help. In Terminal run:
sudo killall vpnd sudo racoon -Fv
Now you should be asked to confirm KeyChain access. Click “Always Allow”. Press Control+C in Terminal window.
sudo killall racoon vpnd
Go to Settings → General → Network → VPN.
- Server = your computer's external IP or hostname (if you have dynamic IP, you'll need use some dyndns service).
- Account = your OS X account login
- RSA SecurID = OFF
- Password = your OS X account password
- Secret = computer's secret, chosen during set-up.
- Send all traffic = ON
- Disable Wi-Fi on iPhone
- Stop and start VPN in iPhone's settings. Wait until it finishes connecting.
- Open (and refresh) any of the what's my IP websites and check which IP you appear to be using.
- If it's the same as your Mac's — congratulations!
- If it's IP of your EDGE connection, then VPN isn't working.
BTW: iPhone will have to drop VPN whenever you change networks, and unfortunately isn't smart enough to re-enable VPN on a new network, so remember to keep re-enabling it (complain to Apple, not me).
You can also use Internet Connect.app (Tiger) or create VPN device in Network Preferences (Leopard) and see if your Mac can connect.
Next step: Ziproxy
Images created with Tango Icons and OmniGraffle.