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?

3 Answers 3

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

6
  • 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, 2009 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, 2009 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. Oct 9, 2009 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, 2009 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, 2009 at 15:19
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.


0
-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.

2
  • Is this answer related to my question?
    – dtb
    Oct 9, 2009 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...
    – Pit
    Oct 12, 2009 at 10:02

You must log in to answer this question.

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