Question

How to enable smtp in digitalocean on port 465

Posted April 9, 2020 2.2k views
Apache

I have created 10s of droplet and destroy them again and again. uploading my script and do again. for couple of days. Upset and angry without finding a solution. I need a help please:

When I run the command for ports I got these:

OpenSSH ALLOW Anywhere
Apache Full ALLOW Anywhere
443/tcp ALLOW Anywhere
25 ALLOW Anywhere
80/tcp ALLOW Anywhere
80 ALLOW Anywhere
443 ALLOW Anywhere
587 ALLOW Anywhere
465 ALLOW Anywhere
993 ALLOW Anywhere
110 ALLOW Anywhere
995 ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Apache Full (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
25 (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
587 (v6) ALLOW Anywhere (v6)
465 (v6) ALLOW Anywhere (v6)
993 (v6) ALLOW Anywhere (v6)
110 (v6) ALLOW Anywhere (v6)
995 (v6) ALLOW Anywhere (v6)

465 ALLOW OUT Anywhere
587 ALLOW OUT Anywhere
25 ALLOW OUT Anywhere
465 (v6) ALLOW OUT Anywhere (v6)
587 (v6) ALLOW OUT Anywhere (v6)
25 (v6) ALLOW OUT Anywhere (v6)


When I run the command

code
nmap -p 25,465,587 (My ip address)

I got this reply

PORT STATE SERVICE
25/tcp closed smtp
465/tcp closed smtps
587/tcp closed submission

Before it was given me like this

PORT    STATE    SERVICE
25/tcp  closed   smtp
465/tcp filtered smtps
587/tcp filtered submission

And the reason behind that is the following of these two tutorials.

UFW Essentials: Common Firewall Rules and Commands
https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands#service-mail

Iptables Essentials: Common Firewall Rules and Commands
https://www.digitalocean.com/community/tutorials/iptables-essentials-common-firewall-rules-and-commands#service-mail

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

I think we need some more info before we can solve this. All general data above.

  • What specific commands did you run?
  • Do you have an IP we can test?
  • What kind of “script” are you running?

Let me know.

  • Thank you so much brother for your reply, I hope if you help me to make my website up and running.

    I use

    ufw status
    

    I got these

    To                         Action      From
    --                         ------      ----
    22/tcp                     ALLOW       Anywhere
    80/tcp                     ALLOW       Anywhere
    443/tcp                    ALLOW       Anywhere
    465/tcp                    ALLOW       Anywhere
    3306/tcp                   ALLOW       Anywhere
    25                         ALLOW       Anywhere
    22/tcp (v6)                ALLOW       Anywhere (v6)
    80/tcp (v6)                ALLOW       Anywhere (v6)
    443/tcp (v6)               ALLOW       Anywhere (v6)
    465/tcp (v6)               ALLOW       Anywhere (v6)
    3306/tcp (v6)              ALLOW       Anywhere (v6)
    25 (v6)                    ALLOW       Anywhere (v6)
    

    But when I am using my ip address: (This is my ip address below.) This command said by digitalocean support.

    nmap -p 25,465,587 157.245.240.195
    

    I got this

    PORT STATE SERVICE

    25/tcp  closed smtp
    465/tcp closed smtps
    587/tcp closed submission
    

    I want to use smtp from my zoho account to phpmailer on my script.

Submit an Answer