One way of doing it is to change your network location setting in your pc to Public network to make it restrictive.
Open your Network and Sharing Center, click on ethernet if your connection is wired then click on the Ethernet Connection shown on the right window then turn off "make this pc discoverable".
If your connection is wireless, click on wifi then go to "Advanced options" and turn off "make this pc discoverable."