Sut i ychwanegu, tynnu a gweld rheolau firewall mewn Ffenestri Powershell?

Ychwanegu rheol wal dân

New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22

 

Gweld rheol wal dân

Get-NetFirewallRule -Enw sshd

 

Dileu rheol wal dân

Remove-NetFirewallRule -Name sshd