Sometimes I upload an application to a server that doesn't have external internet access.
I would like to create the same environment in my machine for testing some features in the application and avoid bugs (like reading a rss from an external source).
I thought about just unplugging my ethernet cable to simulate, but this seems archaic and I don't know if I'm going to raise the same exceptions (specially in Python) when doing this compared to the limitations at the server.
So, how do I simulate "no external access" in my development machine? Will "deactivating" my ethernet interface and reactivating later (with a "no hassle" command) have the same behavior as the server with no external access?
I'm using Ubuntu 10.04. Thanks!