mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-21 20:23:18 +00:00
GITBOOK-3905: change request with no subject merged in GitBook
This commit is contained in:
parent
2fafcfd659
commit
8460bde312
1 changed files with 3 additions and 0 deletions
|
@ -380,6 +380,9 @@ Get-NetFirewallRule -Direction Outbound -Enabled True -Action Allow
|
|||
Get-NetFirewallRule -Direction Inbound -Enabled True -Action Block
|
||||
Get-NetFirewallRule -Direction Inbound -Enabled True -Action Allow
|
||||
|
||||
# Open SSH to the world
|
||||
New-NetFirewallRule -DisplayName 'SSH (Port 22)' -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow
|
||||
|
||||
# Get name, proto, local and rremote ports, remote address, penable,profile and direction
|
||||
## You can user the following line changing the initial filters to indicat a difefrent direction or action
|
||||
Get-NetFirewallRule -Direction Outbound -Enabled True -Action Block | Format-Table -Property DisplayName, @{Name='Protocol';Expression={($PSItem | Get-NetFirewallPortFilter).Protocol}},@{Name='LocalPort';Expression={($PSItem | Get-NetFirewallPortFilter).LocalPort}}, @{Name='RemotePort';Expression={($PSItem | Get-NetFirewallPortFilter).RemotePort}},@{Name='RemoteAddress';Expression={($PSItem | Get-NetFirewallAddressFilter).RemoteAddress}},Profile,Direction,Action
|
||||
|
|
Loading…
Reference in a new issue