Monday, November 8, 2021


If you need to run a samba server with a custom port (on a linux server for example) and need to access it remotely.
Or even want to redirect a certain port to another in Windwos

1 - Run the Add Hardware wizard Open the execeutar (Windows + R) type hdwwiz.exe and run

Next to continue

Select Install the hardware I manually select from a list (advanced) Then click Next to continue

From the list select Network adapters Then click Next to continue

From the list on the left select Microsoft From the list on the right select Microsoft KM-TEST Loopback Adapter Then click Next to continue

At the end click Next and the test interface will be installed

If necessary, renamed to find more easily

Go to settings and select Internet Protocol Version 4 (TCP/IPv4) Then click Properties

Set any IP, just being careful not to be in the same IP range as your current network(s) and cause an IP conflict
In my case I used the ip

Open PowerShell or CMD as an administrator and type the command below

netsh interface portproxy add v4tov4 listenaddress= listenport=445 connectport=44518

listenaddress - is the address defined in the previous steps, in this example
listenport - the original samba port (445, 137, 138, 139) usually only 445 will resolve
connectaddress - the remote address that will be proxied, can be a domain or an ip
connectport - the custom port of the service, in the example I used the 44518

Restart your computer then!

Once this is done the port forwarding will already be working
In the case of the example accessible through \\
Collected from :

No comments:

YouTube Channel