1

I've got an smb share on a computer connected to a 10.0.0.0 network and an 192.168.0.0 network, and I only want smb to listen on the 10 network. Not just setting up a firewall or something like that, simply close it off. Ideally something in powershell would be good but I'm not picky.

lmal
  • 11
  • 2

2 Answers2

1

On my setup, where I have two adapters with IPv4 addresses configured (LAN connection with DHCP, and another internal network with static IP), just disabling "Client for Microsoft Networks" and "File and Printer Sharing" would not do the trick. Neither did it help to adjust the interface metrics, i.e. to down-prioritize the internal network so that it would never be chosen.

Network shares would not work as long as I had cable plugged on the internal network interface.

Only after I had disabled NetBIOS over TCP/IP and LMHOST lookups from the IPv4 settings of the adapter connected to the internal network, would things work to some extent -- lookups and authentication would take very long time (As if Windows was still using the wrong adapter), but would eventually succeed.

huoneusto
  • 111
  • 3
1

You can go through the following steps: - Open Control Panel - Click on Network and Sharing Center - Go to Change Adapter Settings - Right click on network adapter, disable which you don't want to share the files and choose Properties. - Disable File and Printer Sharing

RobinP
  • 11
  • 1