Allow UDP 3389 at firewall configuration
This commit is contained in:
parent
a3cd8ca630
commit
56915ccf5b
|
@ -50,6 +50,7 @@ if not !errorlevel!==0 (
|
||||||
echo [*] Setting firewall configuration...
|
echo [*] Setting firewall configuration...
|
||||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
|
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
|
||||||
netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=tcp localport=3389 profile=any action=allow
|
netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=tcp localport=3389 profile=any action=allow
|
||||||
|
netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=udp localport=3389 profile=any action=allow
|
||||||
echo [*] Looking for TermService PID...
|
echo [*] Looking for TermService PID...
|
||||||
tasklist /SVC /FI "SERVICES eq TermService" | find "PID" /V
|
tasklist /SVC /FI "SERVICES eq TermService" | find "PID" /V
|
||||||
echo.
|
echo.
|
||||||
|
|
|
@ -978,8 +978,10 @@ end;
|
||||||
procedure TSConfigFirewall(Enable: Boolean);
|
procedure TSConfigFirewall(Enable: Boolean);
|
||||||
begin
|
begin
|
||||||
if Enable then
|
if Enable then
|
||||||
ExecWait('netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=tcp localport=3389 profile=any action=allow')
|
begin
|
||||||
else
|
ExecWait('netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=tcp localport=3389 profile=any action=allow');
|
||||||
|
ExecWait('netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=udp localport=3389 profile=any action=allow');
|
||||||
|
end else
|
||||||
ExecWait('netsh advfirewall firewall delete rule name="Remote Desktop"');
|
ExecWait('netsh advfirewall firewall delete rule name="Remote Desktop"');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue