I have a Windows Server (2019) with two interfaces. The first Interface is for Internet access only and the second for management only. Now I want to block all incoming connections on the first interface as it's a direct attached public IPv4 address. Till now i was not able to figure out how to accomplish this as it seems that Microsoft expects that you only have one interface in place and there is not proper Firewall management per Interface. What can I do?
1 Answers
Not very easy to find, but you can do it from the GUI:
CP --> System & Security ---> Windows Firewall --> advanced setting(left panel) --> choose Proprieties(Action TAB(right)) --> click customize --> then uncheck the interface(NIC) you want to disable Firewall on
and from Powershell. Let's say you have a connection called LAN
and another INET
:
Set-NetFirewallProfile -Name Private -DisabledInterfaceAliases 'LAN'
Set-NetFirewallProfile -Name Domain -DisabledInterfaceAliases 'LAN'
Set-NetFirewallProfile -Name Public -DisabledInterfaceAliases 'LAN'
Note that this automatically enables the Windows Firewall on all other interfaces. If you want to disable it on more than one, just specify them separated by comma: 'LAN','INET'
.
Credits: https://serverfault.com/a/1032171/406435
Credits: https://serverfault.com/a/534572/406435
- 1,037
- 2
- 14
- 22