This can be done using the built in Windows Firewall. If you would prefer an alternative security solution, I highly recommend Kaspersky Internet Security 2012.