Access shared folder on remote comp. with "net share" cmdd through VPN and IPv6?


Extraordinary Member
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: \\\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?

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



Principal Cybersecurity Architect
Staff member
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


Extraordinary Member
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: \\\myshare /persistent:no

The remote computer understands (only) IPv6

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