Cheatsheet
General
# Open RDP
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
netsh advfirewall firewall set rule group="Remote Desktop" new enable=Yes
# Open SMB
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
# Open RPC and allow DCOM over RPC
netsh advfirewall firewall add rule name="Allow RPC" dir=in action=allow protocol=TCP localport=135
netsh advfirewall firewall add rule name="Allow RPC Dynamic Ports" dir=in action=allow protocol=TCP localport=49152-65535
Last updated