I'm looking for some software that will block all internet activity on a PC and only allow people to connect specific locations. I also need to be able to turn back on all internet activity when required. I will require all source code and own all copyrights to the code. This will be a c++ or c# application complete with all source code. I would prefer c# but I know the lower level developer may require c++ instead.
I forgot to mention that this can't be done with editing the hosts file. This needs to be a proxy type application and needs to be automated. I don't want anything that I need to manage remotely or allow the user to manage. It needs to turn everything off except my defined sites and I need a function call to turn everything back on.