While you can indeed have your local server working with the outside world as though it is on a real server, there are several hoops you have to jump through to get there. Since the times you really need such a setup are so rare, it really is not worth the time and effort (and risk) to get it working compared to the ease of setting up a real development server (a duplicate of your real shop on your hosting).
I jumped though all those hoops through sheer bloody mindedness but rarely use it. I do however have my local servers set up as virtual hosts. I found that was necessary for uri-rewriting to work locally.