LAN drive - Port Mapping Manual

Follow us on twitter @poppyto Follow the XDA thread to send your thoughts / issues / ideas on LAN drive Android version

Want to read this tutorial on your computer ? here a simplified URL : https://bit.ly/LandrivePortMapping (case sensitive)

Purpose

You probably want to change the network ports of LAN Drive to make it work with NON-ROOTED Android or for other reasons.

Access from MAC or LINUX

You doesn't need port forwarding for these platforms : connect to smb://devicename:port or smb://ip:port

Access from WINDOWS

On Windows you unfortunately can't connect to a special port like \\devicename:port, it's stucked on port TCP 445, and that's why there's a need of a port forwarder.
You'll need 5 minutes to install and configure.

1. Mapping

Android NON ROOT : You have to use ports greater than 1023

We will map ports as it :

You can map to any unused ports if you want (greater to 1023 for Android NON ROOT)<


Change the ports in the LAN drive settings, click the Save button and Start the server

2. Install the port forwarder

There's not so much good port forwarder (maybe only this one!), Windows embed netsh but it can't work on port already opened (and you probably don't want to disable SMB server on your computer) and works only with TCP.
I found a good software from Verigio company named Multi Port Forwarder which work like a charm for our needs. Download it and restart your computer as expected (there's a driver which need the restart)

3. Configure the port forwarder

The rules we will implement :

Note: We clone the UDP packets to not break the actual network discovery.

A. Add UDP RULES

Click the Add Rule button

Add the cloning UDP 137 to 1137

Add the cloning UDP 138 to 1138

B. Add TCP RULES

Add the rewrite TCP 445 to 1445
Don't forget to change the IP address by the IP of your device (you can find it below the big green START button in the app)

/

C. Activate the rules

Click the checkboxes to activate each rules

D. Save the rules

Save the rules to a file (or it will be lost when you close the app)

4. Enjoy LAN drive

Go back to Explorer in the network places, and enjoy LAN drive :) !