How to set dynamic ports for drive mapping

By rspraggs ·
I was wondering if anyone knew how to set the dynamic port range that Microsoft uses when trying to map a network drive? It used to be that function used ports 135, 137 and 139 but after SP2 it looks like they are opening a dynamic port on the requesting side and port 445 on the share side.

Any help would be greatly appreciated.


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Dynamic Source Port

by Toivo Talikka In reply to How to set dynamic ports ...

Are you thinking of limiting the source port to a particular range in your firewall rules?

According this MS Knowledgebase article, you can set the range of the 'random RPC ports' for some RPC services:

The following article shows how to configure the RPC dynamic port allocation to work with firewalls by allocating a range of ports above 5000: http://support.microsoft.com/kb/154596/

It would be interesting to know if that does what you want.

Collapse -

Does not work with Netbios

by rspraggs In reply to Dynamic Source Port


Thanks for the reply but it did not work. I am trying to configure a Windows XP SP2 machine to control the dynamic ports allocated when a "Map Network Drive" session is started with Netbios over TCP. It seems that the client allocates a dynamic port and then attaches to the server using ports >1024 and attaches to the server on port 445. I would like to set the dynamic range that the client is using.

Thanks again for the help.

Collapse -


by Toivo Talikka In reply to Does not work with Netbio ...

Have you tried disabling NetBIOS over TCP?

Collapse -

Tried just about everything

by rspraggs In reply to NBT

I have tried it in just about every conceivable combination and I cannot get it to either go back to the original netbios ports, or allow me to designate the ports it can connect with.

Tahnks again for the help.

Collapse -

The Firewall Service

by CG IT In reply to Tried just about everythi ...

how is your firewall service configured with SP2?

Collapse -

I'm looking in the wrong direction

by rspraggs In reply to The Firewall Service

It looks like the issue is with older code that is using the Windows LSP to capture ports that are not available to the program in Windows XP.

I was hoping to capture the dynamic ports being allocated, but it does not look like that is going to work.

Thank you everyone for your help.


Related Discussions

Related Forums