Enabling file sharing for Private Network but not for Public Network

3

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?

dtb

Posted 2009-10-09T14:05:36.270

Reputation: 130

Answers

2

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

telebog

Posted 2009-10-09T14:05:36.270

Reputation: 391

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 – 2009-10-09T15:05:21.240

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 – 2009-10-09T15:09:14.917

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 – 2009-10-09T15:14:20.743

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 – 2009-10-09T15:16:33.343

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 – 2009-10-09T15:19:20.440

This is strange, I have vista Business sp1 x64 and works. Try to disabled the Ethernet adapter connected to the LAN (only the Ethernet adapter connected to the internet to be enabled) – telebog – 2009-10-09T15:28:21.407

0

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 192.168.0.0/16, 172.16.0.0/16, and 10.0.0.0/8. 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.


secureBadshah

Posted 2009-10-09T14:05:36.270

Reputation: 1 411

-1

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: http://www.vistax64.com/tutorials/124812-network-location-type-change.html

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

Pit

Posted 2009-10-09T14:05:36.270

Reputation: 882

Is this answer related to my question? – dtb – 2009-10-09T15:01:20.313

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... – Pit – 2009-10-12T10:02:47.547