azure firewall blocked after using telnet

Peter Smith 0 Reputation points
2023-03-02T14:53:06.7133333+00:00

I built a vm with a website and a small postfix mail server, everything ran fine with a list of open ports, 80,443,143,25 and 993 I could send and receive emails to and from this server, everything worked fine, but as soon as i ran a telnet on port 25 the connection was dropped and all ports to this server were no longer available, they were still in the nsg as allow. I have rebuilt this server 3 times thinking it is server based. only port 22 remains open.

How do i reset the firewall or get the ports open again

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,043 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,775 questions
{count} votes

2 answers

Sort by: Most helpful
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2023-03-02T17:44:11.56+00:00

    @Peter Smith

    I don't think this issue was specifically caused by the usage of telnet, likely it was a coincidence. Azure platform blocks outbound SMTP connections on TCP port 25 for deployed VMs to ensure better security for Microsoft partners and customers, protect Microsoft’s Azure platform, and conform to industry standards.

    If you are using an Enterprise Agreement subscription, the outbound SMTP connections on TCP port 25 won't be blocked. However, there's no guarantee that external domains will accept the incoming emails from the VMs. If your emails are rejected or filtered by the external domains, you should contact the email service providers of the external domains to resolve the problems.

    If you are using a Pay-as-you-go subscription, outbound port 25 communication is blocked from all resources. No requests to remove the restriction can be made, because requests aren't granted. If you need to send email from your virtual machine, you have to use an SMTP relay service.

    If you are using an Enterprise subscription, you can request to have the block removed by going to the "Cannot send email (SMTP-Port 25)" section of the Diagnose and Solve blade in the Azure Virtual Network resource in the Azure portal and run the diagnostic.

    Hope this helps! Let me know if you still have questions or need help.


    Please don’t forget to "Accept the answer" wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

  2. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2023-03-08T17:18:29.32+00:00

    @Peter Smith

    That does sound odd and wouldn't be expected behavior. Both telnet and port scanning are allowed activities and no longer require pre-approval to perform. See here for information on penetration testing.

    Please setup retest and let us know if you face any issues. If needed we can work with you directly to help diagnose the issue.

    0 comments No comments

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.