📎 AI Summary:
The thread discusses how to connect to remote shared folders using the "net use" command in Windows. The original poster asks about the specific ports used by "net share" (answered as ports 139 and 445) and whether the command works over VPNs or with IPv6 addresses. A key tip provided is that IPv6 addresses are not natively supported by "net share," but adding an IPv6 entry to the hosts file can facilitate connections, with the second poster offering some guidance on how this workaround might be implemented.

pstein

Extraordinary Member
Member details
Joined
Mar 20, 2010
Messages
454
Thread Author #1
In the past I mount a remote shared folder as drive W: in my local Windows Explorer with
a command similar to:

net use w: \\192.168.0.21\myshare /persistent:no

This works successfully on a IPv4 connection.

At first:
Which remote port does the "net share" command (implicitely) connect to on remote server?

Can I use the same command through a VPN and IPv4 connection as well?

Can I use the same command (with IPv6) address for an IPv6 command as well?
Example:

net use w: \\<IPv6 address>\myshare /persistent:no

Peter
 

Solution
Net share uses ports 139 and 445.

It would work though a VPN provided the traffic was allowed on the VPN.

And no net share doesn't understand ipv6 but there are a few tricks you can use such as adding a ipv6 entry in the hosts file

Neemobeer

Windows Forum Team
Staff member
Member details
Joined
Jul 4, 2015
Messages
8,995
Net share uses ports 139 and 445.

It would work though a VPN provided the traffic was allowed on the VPN.

And no net share doesn't understand ipv6 but there are a few tricks you can use such as adding a ipv6 entry in the hosts file
 

Solution

pstein

Extraordinary Member
Member details
Joined
Mar 20, 2010
Messages
454
Thread Author #3
Ok, thank you.

But how does your "hosts" workaround work in details?

Lets say I want to connect from my notebook to a remote shared folder over IPv6 with a command like

net use w: \\111.222.0.33\myshare /persistent:no

The remote computer understands (only) IPv6

What do I have to put into hosts file to get it working?