How can I make the up arrow work in Terminal's nslookup command?
Nslookup on OS X does not seem to use readline, so it does not support the arrow keys.

You can install rlwrap, which is available in MacPorts and presumably other package managers.  Then you can run 

rlwrap nslookup


To get arrow key support.

Many thanks to this thread on the MacRumors forums.