Add batch files to add and remove firewall rules
This commit is contained in:
parent
6000b85b1a
commit
65b557d003
2 changed files with 14 additions and 0 deletions
8
src_assets/windows/misc/firewall/add-firewall-rule.bat
Normal file
8
src_assets/windows/misc/firewall/add-firewall-rule.bat
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
set RULE_NAME=Sunshine
|
||||||
|
set PROGRAM_BIN="%~dp0sunshine.exe"
|
||||||
|
|
||||||
|
rem Add the rule
|
||||||
|
netsh advfirewall firewall add rule name=%RULE_NAME% dir=in action=allow protocol=tcp program=%PROGRAM_BIN% enable=yes
|
||||||
|
netsh advfirewall firewall add rule name=%RULE_NAME% dir=in action=allow protocol=udp program=%PROGRAM_BIN% enable=yes
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
set RULE_NAME=Sunshine
|
||||||
|
|
||||||
|
rem Delete the rule
|
||||||
|
netsh advfirewall firewall delete rule name=%RULE_NAME%
|
||||||
Loading…
Add table
Add a link
Reference in a new issue