Jump to content

only allow port to be used by specific program, even if that program not running


Recommended Posts

Hi, Using ESS 14.0.22 here. I was wondering how to reserve a port to a specific application e.g. app1. If other applications try and take over the port (even if app1 is not running) it will deny those applications from using that port. Is this just a matter of specifying the port in

Advanced > Firewall > Advanced > Rules > Edit > "local tab" > Port?

 

Link to comment
Share on other sites

  • Administrators

It's not possible. I don't even think that Windows allows for reserving a port for a specific application if it's not running, maybe some programmers here will confirm.

In TCP/UDP, the only way to "reserve" a port is to actually bind() a socket to it. A bound port will not be used by other applications; an unused port is, well, unused so other applications are free to use it.

Link to comment
Share on other sites

This has nothing to do with either the Eset or Win firewall as @Marcos has pointed out.

Reserving ports in Windows hasn't been implemented since Vista days:

Quote

Windows Vista and later operating systems

Note: the registry setting ReservedPorts are not implemented in Windows Vista, Windows 2008 and later operating systems.

For more information about adjusting the dynamic port range by using the netsh command, click the following article number to view the article in the Microsoft Knowledge Base: 929851 The default dynamic port range for TCP/IP has changed in Windows Vista and in Windows Server 2008

https://docs.microsoft.com/en-us/troubleshoot/windows-server/networking/reserve-a-range-of-ephemeral-ports

Edited by itman
Link to comment
Share on other sites

It also appears that at leastone  security vendor, Broadcom, supports the reserved ports feature by using the deprecated ReservedPorts registry key in their CA Client Automation product. Note that this use would be exclusive to the product internally and is in effect, "invisible" to Windows:

Eset_Ports.thumb.png.2cf4ecffea756290a5ed9ce2f8a2dd46.png

https://knowledge.broadcom.com/external/article/25869/how-do-i-reserve-ports-on-windows.html

 

Edited by itman
Link to comment
Share on other sites

Thanks everyone for your help. I thought there might have been a solution within ESET as I frequently find myself in situations with port unavailability. Programs like pyCharm, LiveServer(VSCode), torrent, etc etc all require port access. When using one or more, some other one doesn't seem to work as it issues a "cannot obtain port" error. Looking in Resource Monitor > Listening Ports doesn't lead to much. I end up restarting the PC. I'll look deeper into these programs and try and restrict their port ranges to avoid conflict. I don't want to make this any more complicated than it should be. Thanks.

Edited by freesolo
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...