Mac OS 10.4 and 10.5, (and I presume 10.3) you can update /private/etc/hosts exactly like in Linux’s /etc/hosts

in 10.5 /etc is just a symlink to /private/etc, so editing the /etc/hosts in 10.5 will work perfectly. (remember to do a “sudo su” before editing with vim og nano og wathever)