Server not responding after Restart

Himanshu Kashyap 1 Reputation point
2022-01-07T09:37:25.81+00:00

I have deployed Ubuntu Server 20.04 and whenever I restart it, I won't be able to get SSH back to the server. the server has been installed with Dovecot, Litespeed, Postfix, Cyberpanel, Rainloop, etc. which have their own web consoles. whenever I access them after a restart, nothing loads up.
I have already allowed the following from the server's firewall and from the VM NSG:
21,22,80,443,7080,8090,53,110,143,25,587,465,993 and some other ports required for installed services both inbound and outbound.
The funny thing is from the last 2 days, I create a rule to allow all 65535 ports both inbound and outbound and that allows me login back to all my web consoles and I'm able to SSH too. even when I remove that rule that allows all 65535 ports none of my consoles and SSH connection gets lost. this is weird but was working. today morning, even after allowing 65535 ports am still not able to access the server. I tried with the connection troubleshoot utlity inside Azure portal and tested the connection on port 22, it shows me positive results. I'm so confused where the issue lies.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,762 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. msrini-MSFT 9,291 Reputation points Microsoft Employee
    2022-01-08T13:28:46.193+00:00

    @Himanshu Kashyap ,

    When you add a rule to the NSG, and if you have a active session which matches that rule, then it will still be allowed even if you delete the rule until the session is closed. That is the possible explanation that I can provide you for the issue that you have been through.

    Connection troubleshoot will not send actual traffic to validate that port. It checks the NSG rules and see if the traffic is allowed or not.

    Best bet is to check the ports from online tools like https://ping.eu/port-chk/ and check if the ports are open. Cannot SSH can be due to following reasons:

    1. Issue with the NSG/ connectivity to the VM itself.
    2. Issue in the Guest OS where SSH port is not open. To troubleshoot this you need to check the Serial console logs and requires deeper troubleshooting.

    Regards,
    Karthik Srinivas


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.