Windows 2019 change Network profil for two virtual Network adapters

Alexander 1 Reputation point
2021-07-25T15:07:18.647+00:00

I have installed a Windows 2019 server on a vServer which is hosted by Hetzner.com
The server has a public IP and a privat IP.

In the spirit of Windows Firewall, I would like to turn on the firewall for Public and turn it off for the private network.

Since the installation, both network cards are in the "Public" network profile.

I would like to change the network card of the internal network from Public to Private.

I tried to change the network profile of the private IP to "Private" with the Powershell but then both network cards are assigned to the network profile "Private" although I only addressed the InterfaceIndex of the network card of the private network.

Powershel:
Get-NetConnectionProfile

Name : Network
InterfaceAlias : Public
InterfaceIndex : 14
NetworkCategory : Public
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic

>

Name : Network
InterfaceAlias : Internal
InterfaceIndex : 8
NetworkCategory : Public
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic

Powershell

Set-NetConnectionProfile -InterfaceIndex 8 -NetworkCategory Private
Unfortunately both interfaces change to Private although the InterfaceIndex is different.

I also tried InterfaceAlias ... the same result.

I also try it with the GUI

Open Windows Firewall with Advanced Security
Click on Windows Firewall Properties
Click the Private Profile Tab
Click Customize
Select the Interface I want (private)
Click OK
Repeat step 3-6 for the public profile

but if I call Get-NetConnectionProfile both are Public?

Has it something to do with the Network Name? Both Networks are named "Network"?

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles

... shows me only one network profile.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,117 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Eleven Yu (Shanghai Wicresoft Co,.Ltd.) 10,756 Reputation points Microsoft Vendor
    2021-07-26T05:57:57.003+00:00

    Hi,

    Thank you for posting the question to Q&A forum.

    Yes, your understanding is correct. From your result of "Get-NetConnectionProfile", there is only one Network Profile on your server. That means both network adapters are identified to connect to the same network.

    You can only change the network types for specific network profile. Since both adapters are under the same network profile, both will be changed to "public" or "private".

    Please check your network settings to ensure the network adapters are connected to different networks. If you have any problem on network configuration, we suggest that you could raise a new post to network forum.

    Thanks,

    ----------

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


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.