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.