lanmanserverservice is up and running.
hdwwiz.exeThe Hardware Wizard will come up:
lanmanserverservice for all interfaces. If we can insert a
portproxyrule to grab port 445 for the loopback interface before the
lanmanserverservice starts, we can circumvent this. Be aware that
portproxyrules are executed by the
iphlpsvcservice. By adding a dependency to the
lanmanserverservice we ensure that the
iphlpsvcservice is always launched before the
lanmanserverservice. This section explains how to do this:
sc qc lanmanserverYou should see output similar to this:
[SC] QueryServiceConfig SUCCESS SERVICE_NAME: lanmanserver TYPE : 20 WIN32_SHARE_PROCESS START_TYPE : 2 AUTO_START ERROR_CONTROL : 1 NORMAL BINARY_PATH_NAME : C:\WINDOWS\system32\svchost.exe -k netsvcs -p LOAD_ORDER_GROUP : TAG : 0 DISPLAY_NAME : Server DEPENDENCIES : SamSS : Srv2 SERVICE_START_NAME : LocalSystemAlternatively, you can use the
Get-Service -DisplayName server -RequiredServices
Serverservice (also known as
lanmanserver) depends. In this case, these services are
srv2(the service names are case independent).
lanmanserverservices depends by adding the
iphlpsvcservice to the list of required services found in the previous step:
sc config lanmanserver depend= samss/srv2/iphlpsvcNOTES:
"depend= "is required!
portproxyrule to reroute TCP port 445 to a port of our choosing. For this tutorial, I choose 44445:
netsh interface portproxy add v4tov4 listenaddress=10.255.255.1 listenport=445 connectaddress=10.255.255.1 connectport=44445NOTES:
listenaddressis the address of the Loopback adapter configured in the section earlier
connectaddressmust be identical to the
listenaddress=127.0.0.1does not work. Believe me, I've tried.
portproxyrule is persistent, so there should be no need to repeat this step after a reboot.
portproxywas applied successfully by checking the open ports on the system. Type in a command console
netstat -an | find ":445 "You should see something like:
0.0.0.0:445' instead then the 'portproxy' rule was not applied correctly. Verify that the right 'portproxy' rule was used
netsh interface portproxy show v4tov4and verify that the
IpHlpSvcservice is running at Windows startup using
sc query iphlpsvcAnother reason for the 'port grabbing' to fail could be the
LanmanWorkstationservice running at Windows startup. If so, try giving it the same treatment as
LanmanServer. However, on the Windows 10 installations I tested this service was running at system startup without causing any problems.
sc query lanmanserverThe 'LanmanServer' service should be in the state Running. If it is not, then follow these steps to create a task using the Task Schedule to start it at system startup.
10.255.255.1:445in the 'netstat` output) then try the Old driver tweak instructions to see if that works better for you.
login2.nikhef.nlas normal. Open a Command console or terminal and type:
ssh -v -N -n -L 10.255.255.1:44445:beuk.nikhef.nl:445 <Your-nikhef-userid>@login2.nikhef.nlYes, there are lots of colons in that
-Loption but you need them all.
debug1: Local connections to 10.255.255.1:44445 forwarded to remote address beuk.nikhef.nl:445is present before continuing.
debug1: Connection to port 44445 forwarding to beuk.nikhef.nl:445 requested.as in the following screenshot:
-voption from the command line:
ssh -N -n -L 10.255.255.1:44445:beuk.nikhef.nl:445 <Your-nikhef-userid>@login2.nikhef.nlNote If you carefully inspect the above screenshot then you will notice that I am using the (built-in) OpenSSH Authentication Agent in combination with an SSH public/private keypair to avoid having to type in my Nikhef password every time.
login2.nikhef.nland press OK.
login.nikhef.nland press OK.
lanmanserverservice by typing
sc config lanmanserver depend= samss/srv2NOTE the list of required services may be slightly different on your system. Use the PowerShell command from section 4 to obtain a list.
portproxyrule by typing
netsh interface portproxy delete v4tov4 listenaddress=10.255.255.1 listenport=445
Device Managerby typing
devmgmt.mscExpand the 'Network Adapters', right-click on Loopback adapter and select Uninstall.