jjkeijser / cifs-over-ssh

Tutorial on how to use CIFS/SMB over SSH in Windows
Apache License 2.0
28 stars 3 forks source link

Possibility to configure without restarting Windows #5

Open BlinD-HuNTeR opened 7 months ago

BlinD-HuNTeR commented 7 months ago

Hello!

Just wanted to mention that it's perfectly possible to make the configuration and start using it immediately, without restarting the operating system.

The major obstacle to achieve this was of course, the trouble with LanmanServer, as it grabs the 445 port very early, and as you may know, stopping this service doesn't close the port.

But it turns out that it's perfectly possible to close the 445 port in a running system with the command net stop srvnet /y. This command will stop the services Srvnet, Srv2 and LanmanServer, and when that happens, port 445 is no longer listening.

After configuring the portproxy rule, you can then run the command net start LanmanServer, which starts everything back again, while the portproxy keeps active.