Home » windows » Opening Ports on the Windows Firewall Using Command Line
Powershell
New-NetFirewallRule -DisplayName "Name" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 2002
Cmd
netsh advfirewall firewall add rule name="name" dir=in|out protocol=tcp|udp localport=20002 action=allow