Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: ----------------------------------------------------------------------------------------------------------------
- :: SRC: https://www.itprotoday.com/windows-8/top-10-windows-firewall-netsh-commands
- :: man: https://ss64.com/nt/netsh.html
- ::
- :: Syntax:
- :: Elevated : yes
- ::
- ::man -> manual
- :: ----------------------------------------------------------------------------------------------------------------
- ::LocalPort (O/P -> https://imgur.com/ytOxIk6)
- netsh advfirewall firewall add rule name=OpenWsus8530 dir=in action=allow protocol=tcp localPort=8530
- ::Domain
- ::Find rule name (? no regex permit)
- :: O/P --> http://pix.toile-libre.org/upload/original/1547396084.png
- netsh advfirewall firewall show rule name=all | findstr /i "name Rule:" | findstr /i "nameRule* "
- ::Reset firewall default
- netsh advfirewall reset
- ::Delete rule
- netsh advfirewall firewall delete rule name="Open SQL Server Port 1433" protocol=tcp localport=1433
- ::Allow ping (default rule disabled)
- :: O/P --> http://pix.toile-libre.org/upload/original/1547394676.png
- netsh advfirewall firewall set rule name="file and printer sharing (echo request - icmpv4-in)" new enable=yes
- ::Create youself
- ::O/P -> https://imgur.com/44FKhVD
- Netsh advfirewall firewall add rule name=”Allow ping” dir=in protocol=icmpV4:8,any action=allow profile=domain
- ::Export/Import firewall
- netsh advfirewall export "C:\temp\WFconfiguration.wfw"
- netsh advfirewall import "C:\temp\WFconfiguration.wfw"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement