There are a few different ways that you can go about this depending on the final result you're looking for. If you want a reusable module that you can build, search for "restrict site access by ip address" (no quotes) in google and find the link on the first page of results to codeproject.com...it can be done in about 30 lines of code. You could also set up windows authentication on your staging site (instructions here in our manual) if you have direct access to the server.
<a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>