question

JamilAslam-0167 avatar image
0 Votes"
JamilAslam-0167 asked JiaYou-MSFT commented

GCP VM Instance windows server 2016 is not accessible via IP or RDP after setting up firewall settings for SQL Server Remote Access

Hi,
I was trying to enable remote access to SQL Server 2016 installed on GCP VM instance. Allow remote connections was enabled on SQL Server, but couldn't access remotely. So, I setup inbound rules to allow TCP and UDP ports on 1433 and 1434 respectively without help. Then I made some changes to firewall settings to allow/block connections(I don't remember exactly what I changed here).

Suddenly I lost my RDP session and now that Instance is unreachable via IP or RDP or URL. I tried pinging that IP but request timed out.

Can someone please help?

remote-desktop-serviceswindows-server-2016
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HI
Is there any progress on your question?

0 Votes 0 ·

HI

Is there anything to help you?

0 Votes 0 ·

1 Answer

JiaYou-MSFT avatar image
0 Votes"
JiaYou-MSFT answered JiaYou-MSFT edited

HI

1.Could you please check if we have enabled TCP 3389 and UDP 3389 in windows firewall on windows server 2016?

2.What's the error message do you meet, when you remote access the VM by using mstsc?

3.Please find another VM in the same AD domain as this issue VM and try to disable firewall temporarily, finally we can logon to adjust the firewall correctly.

Connect to a VM that’s located on the same virtual network as the VM that you cannot reach by using RDP connection.
Open a PowerShell console window.
Run the following commands:
Enter-PSSession (New-PSSession -ComputerName "<HOSTNAME>" -Credential (Get-Credential) -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck))
netsh advfirewall set allprofiles state off
Restart-Service -Name mpssvc
exit


Disable the guest OS Firewall in Azure VM
https://docs.microsoft.com/en-us/troubleshoot/azure/virtual-machines/disable-guest-os-firewall-windows

============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.