lanmanserver
service is up and running.
hdwwiz.exeThe Hardware Wizard will come up:
SMB 1.0
:
lanmanserver
service for all interfaces.
If we can insert a portproxy
rule to grab port 445 for the loopback
interface before the lanmanserver
service starts, we can circumvent this.
Be aware that portproxy
rules are executed by the iphlpsvc
service.
By adding a dependency to the lanmanserver
service we ensure that the
iphlpsvc
service is always launched before the lanmanserver
service. 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
Powershell
command
Get-Service -DisplayName server -RequiredServices
Server
service
(also known as lanmanserver
) depends. In this case, these services
are samss
and srv2
(the service names are case independent).
lanmanserver
services depends
by adding the iphlpsvc
service to the list of required services found in the
previous step:
sc config lanmanserver depend= samss/srv2/iphlpsvcNOTES:
"depend= "
is required!
portproxy
rule 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:
listenaddress
is the address of the Loopback adapter
configured in the section earlier
connectaddress
must be identical to the listenaddress
listenaddress=127.0.0.1
does not work. Believe me, I've tried.
portproxy
rule is persistent, so there should be no need to repeat
this step after a reboot.
portproxy
was 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
IpHlpSvc
service is running at Windows startup using
sc query iphlpsvcAnother reason for the 'port grabbing' to fail could be the
LanmanWorkstation
service
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:445
in the 'netstat` output)
then try the Old driver tweak instructions to see if that
works better for you.
port-forwarding
:
login.nikhef.nl
. Choose host login2.nikhef.nl
and protocol SSH.
login2.nikhef.nl
as normal.
login2.nikhef.nl
and press OK.
login.nikhef.nl
and press OK.
lanmanserver
service 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.
depend=
!
portproxy
rule by typing
netsh interface portproxy delete v4tov4 listenaddress=10.255.255.1 listenport=445
Device Manager
by typing
devmgmt.mscExpand the 'Network Adapters', right-click on Loopback adapter and select Uninstall.