6

I have a workstation with 2 network adapters, one is connected to a domain network, the other one is connected to a device, you can think of this device like a raspberry pi, via an integrated network adapter onboard. The workload is to execute a couple of tasks while connected to the device, like SSH, SFTP push, TFTP server, etc. and once finished move to the next device and repeat.

Sometimes the windows firewall gets in the way to complete these tasks, the hot fix being turning it off completely and I would like to address this issue. Each time I change the device windows tries to "Identify" the network, and once it sets it up as unidentified defaults the network profile to "Public"

I've tried the PS commands:

PS C:\Users\User> Get-NetConnectionProfile

Name             : contoso.com
InterfaceAlias   : Ethernet
InterfaceIndex   : 5
NetworkCategory  : DomainAuthenticated
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic

Name             : Unidentified network
InterfaceAlias   : Ethernet 4
InterfaceIndex   : 8
NetworkCategory  : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : NoTraffic

PS C:\Users\User> Set-NetConnectionProfile -InterfaceAlias "Ethernet 4" -NetworkCategory Private

But it defaults each time I change devices, I might be able to tie this cmdlet to an event, but I don't know which one.

other things that come to mind are:

  1. Opening the firewall ports used by the protocols required on the public profile. But this might get overwritten by group policy.
  2. Forcing the link to UP, that way windows doesn't tries to identify the network, but I don't know if windows is capable of this
  3. Changing in Control Panel\Network and Internet\Network and Sharing Center\Advanced sharing settings the settings regarding Guest or Public

Any suggestions?

1 Answer 1

5

To set any unidentified network to be classified as private rather than public by default, do the following:

  • Open Start > Local Security Policy
  • Select "Network List Manager Polices" on the left
  • Double-click "Unidentified Networks"
  • Select "Private" under Location type
  • Click OK.
  • Reboot.
2
  • This worked pretty well, I just hope this policy doesn't get overwritten by the Domain Controller
    – polloman15
    Commented Dec 16, 2022 at 0:54
  • 1
    But setting all of them to private is not a good idea :c Commented Dec 21, 2023 at 11:29

You must log in to answer this question.

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