S
S
shell_guy2021-08-25 16:15:14
PowerShell
shell_guy, 2021-08-25 16:15:14

How to add tcp/udp ports to firewall via Powershell exceptions?

Greetings!
Please tell me how to add private, local, domain tcp & udp connections to the firewall exceptions via pwsh

For example, in this way you can add several tcp
New-NetFirewallRule -DisplayName "WHITELIST TCP" -Direction inbound -Profile Any -Action Allow -LocalPort 80,8080, 8090 -Protocol TCP

but what about udp?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Bezrukov, 2021-08-25
@NortheR73

but what about udp?
Exactly the same command, only in the -Protocol parameter specify the desired protocol: TCP, UDP, ICMPv4 or ICMPv6

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question