0

Is there a way to restrict Google Chrome to using only a very small range of Local Ports?

Presently, Chrome is using a large range of high-numbered ports. I'd prefer to be able to more precisely manage such ports.

How could I restrict Chrome to using a small range of ports, or perhaps only 1 port?

0

1 Answer 1

0

These high-numbered ports are probably dynamic ports or Ephemeral ports.

If you are indeed referring to these above ports, they are temporary ports used by the processes that make up Chrome and its tabs.

These ports are allocated by Windows with random numbers, that are not under the control of Chrome. As it's not possible to predict the port numbers, it's also not possible to block them. In any case, blocking these ports will render Chrome unusable.

The dynamic port range on Windows can be viewed by using the following commands:

netsh int ipv4 show dynamicport tcp
netsh int ipv4 show dynamicport udp
netsh int ipv6 show dynamicport tcp
netsh int ipv6 show dynamicport udp

The new TCP and UDP default start port is 49152, and the default end port is 65535.

This port range can be modified by using the following command:

netsh int <ipv4|ipv6> set dynamic <tcp|udp> start=number num=range

Example:

netsh int ipv4 set dynamicport tcp start=10000 num=1000
netsh int ipv4 set dynamicport udp start=10000 num=1000

These examples set your dynamic port range to start at port 10000 and to end at port 11000 (1000 ports).

A few important things to know about the port range:

  • The smallest range of ports that can be set is 255.
  • The lowest starting port that can be set is 1025.
  • The highest end port (based on the range set) cannot exceed 65535.
6
  • There must be some way to manage them. Either via Chrome or via a utility or script in the OS... You've basically said there's nothing that can be done.
    – Arianax
    Nov 5, 2018 at 16:58
  • There is - I added it in my answer.
    – harrymc
    Nov 5, 2018 at 19:14
  • Bear in mind that TCP ports cannot necessarily be immediately reused; this is the reason for the TIME_WAIT state. You therefore can create problems if you reduce the range for ephemeral ports to the level that it is insufficient for the rate at which you're consuming connections.
    – dave
    Nov 5, 2018 at 22:33
  • It would be nice if I could vet connections as they came and went. Haven't found a firewall that effectively exposes eavesdroppers yet.
    – Arianax
    Nov 5, 2018 at 23:52
  • There's probably a setting in Chrome to control this use of 'ephemeral' ports?
    – Arianax
    Nov 6, 2018 at 0:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .