- Start a console window with elevated (Administrator) privileges.
- First, we disable the automatic starting of the
lanmanserver
driver:
sc config lanmanserver start= delayed-auto
NOTE the space after the start=
! Also, if start= delayed-auto
does not
work then try start= demand
- Make sure the
IpHlpSvc
driver is running at startup, as otherwise
the portproxy rules are not executed:
sc config iphlpsvc start= auto
NOTE the space after the start=
!
Thanks to Michael Uhlenberg for pointing out this important driver.
- Next we add a
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=44445
IMPORTANT NOTES:
- The
listenaddress
is the address of the Loopback adapter
configured in the section earlier
- The
connectaddress
must be identical to the listenaddress
- Using
listenaddress=127.0.0.1
does not work. Believe me, I've tried.
If all went well you should see something like