Is there a way to assign/set IP addresses/ports to system services?

Zeglin, James 1 Reputation point
2021-06-18T13:36:06.77+00:00

I’ve been looking all around the internet for this and cannot find anything.

I’m looking for a way to use two Ethernet adapters, one with a local LAN IP address and another with a public static IP address. My system is fighting over which IP address the services it is using. I have local equipment that doesn’t like using the public IP causing network and reliability issues causing loss of connection.

Also, when I have routing and remote access enabled, it also takes down certain local services from being able to connect to the server, therefore any information on how to limit or assign which ports the services are using, would be great.

Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Anonymous
    2021-06-18T14:04:22.49+00:00

    The service developer may be your best resource to debug / troubleshoot the issues.

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

  2. MotoX80 36,421 Reputation points
    2021-06-18T15:45:09.887+00:00

    If you run the netstat command from an admin command prompt like this

    C:\>netstat -aon | findstr -i listen
      TCP    0.0.0.0:21             0.0.0.0:0              LISTENING       3764
      TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       1048
      TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:902            0.0.0.0:0              LISTENING       4220
      TCP    0.0.0.0:912            0.0.0.0:0              LISTENING       4220
      TCP    0.0.0.0:1536           0.0.0.0:0              LISTENING       920
      TCP    0.0.0.0:1537           0.0.0.0:0              LISTENING       744
      TCP    0.0.0.0:1538           0.0.0.0:0              LISTENING       1508
      TCP    0.0.0.0:1539           0.0.0.0:0              LISTENING       2652
      TCP    0.0.0.0:1540           0.0.0.0:0              LISTENING       3948
      TCP    0.0.0.0:1543           0.0.0.0:0              LISTENING       900
      TCP    0.0.0.0:5040           0.0.0.0:0              LISTENING       4552
      TCP    0.0.0.0:5357           0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:5985           0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:7680           0.0.0.0:0              LISTENING       2172
      TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:8081           0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:13482          0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:47001          0.0.0.0:0              LISTENING       4
      TCP    169.254.76.181:139     0.0.0.0:0              LISTENING       4
      TCP    [::]:21                [::]:0                 LISTENING       3764
      TCP    [::]:80                [::]:0                 LISTENING       4
      TCP    [::]:135               [::]:0                 LISTENING       1048
      TCP    [::]:443               [::]:0                 LISTENING       4
      TCP    [::]:445               [::]:0                 LISTENING       4
      TCP    [::]:1536              [::]:0                 LISTENING       920
      TCP    [::]:1537              [::]:0                 LISTENING       744
      TCP    [::]:1538              [::]:0                 LISTENING       1508
      TCP    [::]:1539              [::]:0                 LISTENING       2652
      TCP    [::]:1540              [::]:0                 LISTENING       3948
      TCP    [::]:1543              [::]:0                 LISTENING       900
      TCP    [::]:5357              [::]:0                 LISTENING       4
      TCP    [::]:5985              [::]:0                 LISTENING       4
      TCP    [::]:7680              [::]:0                 LISTENING       2172
      TCP    [::]:8080              [::]:0                 LISTENING       4
      TCP    [::]:8081              [::]:0                 LISTENING       4
      TCP    [::]:13482             [::]:0                 LISTENING       4
      TCP    [::]:47001             [::]:0                 LISTENING       4
    

    ... you will see that most services are listening on a given port and will accept a connection from any IP address that has connectivity to your server.

    https://www.lifewire.com/four-zero-ip-address-818384

    If your system is "fighting over IP addresses", you're going to have to explain what that means.

    Maybe you have a problem with your network configuration. Check out some of these results.

    https://www.bing.com/search?q=windowss+multi-homed+host

    0 comments No comments

  3. Anonymous
    2021-06-21T09:31:35.15+00:00

    Hi,

    Welcome to Q&A platform.

    Applications/services such as a HTTP web server or an FTP server are assigned a port to use/listen on, usually in the config of the application. And they often use a standard port. HTTP for example usually uses port 80.

    Every IP address on a system will have all ports available for use.

    If you really want to bind the IP to a specific port, I would suggest you could post this thread in the development related forum as it related to application development which our forum doesn't focus on.

    May I know which service was in impacted?

    You only need this services can be used by the public IP or can be used by both LAN IP and public IP?

    Best Regards,
    Sunny

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.