Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My Vista PC has two Ethernet adapters: one is connected to the Internet, and one to a LAN. In the Network and Sharing Center I've configured the first to be a Public Network and the second to be a Private Network.

When I try to enable File Sharing, Vista offers me to turn the first network into a Private Network, or to enable File Sharing for all Public Networks. I don't want any of these options; I want to enable File Sharing for the LAN connection but not for the Internet.

How do I enable File Sharing only for Private Networks but not for Public Networks?

share|improve this question

So you have 2 network connection: 1 is the internet connection (Local Area Connection) 2 is the lan network connection (Local Area Connection2)

Try to enable file sharing, and from Control Panel\Network Connections, right click on the internet conection(Local Area Connection)->properties and unceck Client for microsoft networks and file and printers sharing for microsoft networks

share|improve this answer
Good suggestion, but if I turn off everything except IPv4/6, I can still see other user's machines that are on the same link as my adapter connected to the Internet. So it's still enabled for some reason!? – dtb Oct 9 '09 at 15:05
If uncheck Client for microsoft networks and file and printers sharing for microsoft networks, you will not see any computers (machine) from that connection. I have 2 Lan too, and I just try that now and works – telebog Oct 9 '09 at 15:09
it may take a few minutes for your computer's network browser to catch on to the fact that access to systems on that link has been cut off. – quack quixote Oct 9 '09 at 15:14
I've just tried it again. Unchecked "Client for Microsoft" and "File and Printer Sharing for Microsoft Networks" on the Ethernet adapter connected to the Internet, and enabled "Network disovery for all public networks". I can perfectly access computers on the Internet link. Weird! (Vista x86 SP2) – dtb Oct 9 '09 at 15:16
No change after waiting a couple of minutes. I've even disabled the Ethernet adapter connected to the LAN. Both my PC and another user's PC are shown in the Network Neighborhood, and both can be browsed. – dtb Oct 9 '09 at 15:19

If the purpose is to allow "file and print sharing" to LAN users only then you may change the scope for "File and Print Sharing" in windows firewall. Add exception for only LAN subnets which could be private IP address range like,, and Please note that these settings are applied at PC level and not at interface level. Hoping that you have different subnets on two interfaces.

Goto Interface->Properties->Advanced->Windows Firewall Settings->Tab Exception
Select "File and Print Sharing" (Checkbox is ticked)
Click Edit button
Click "Change scope"
Select "Custom List" radio button
Enter the subnets which should be able to access this service on your PC.
Save the configuration.

share|improve this answer
Thanks, I will try this on Monday and report back. – dtb Oct 10 '09 at 11:49

When you make a connection to the internet, Vista asks you what kind of connection it is. Always choose Public. This way, your files will not be shared to the internet. However, when you need to reset this. Follow:

However, sometimes your connection to your network is also your connection to your gateway. In this case check your routers/gateways firewall.

share|improve this answer
Is this answer related to my question? – dtb Oct 9 '09 at 15:01
Yes it is. Read it again and again and again... :) Do you have two connections? Usually at home you have just one which connects you to everything... – Aaaaaaaaaha ERLEBNIS Oct 12 '09 at 10:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .