You can simply edit your Mac's /etc/hosts file and iPhone Simulator will adopt whatever is set there.
It works because the iPhone Simulator simply provides a simulated frontend of Mobile Safari's user interface, which just uses your Mac's network settings.