port 443 blocked?

Port 443 is open in iptables:

iptables -L -v Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination … ACCEPT tcp – any any anywhere anywhere tcp dpt:https

But when I try to access the port by various means its rejected: telnet localhost 443 Trying… telnet: Unable to connect to remote host: Connection refused

Apache2 is running and has the 443 set up: <VirtualHost *:443> …

Is something blocking the port in front of my droplet?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Solved it. The words “Connection refused” let me to believe it was actively being refused, but really it was just apache not listening to the port because of a misconfiguration. I had an apache site enabled for a virtual host on port 443 but it was not loading because the apache ssl module was not enabled ie. “a2enmod ssl”.

UFW is “inactive”. I copied the iptables rules from an old droplet where 443 is open and works. If I compare both tables side by side from the output of “iptables -L -v” both droplets show the same rules and https is ACCEPTED.

The reason Im asking if something is blocking in front of the droplet is that I have the same problem with port 25 but when i open port 26 and config the a mail client to use 26 instead it works - so it seems there is something in front of the droplet thats not completely open?

Hello, @comis

From what I can see the port is closed. What you can do is to make sure it’s open using the following commands:

Check if UFW is enabled:

sudo ufw status

If UFW is disabled, which it is by default, you’ll see something like this:

Status: inactive

To enable UFW, use this command:

sudo ufw enable

Open the port with this command:

sudo ufw allow https


sudo ufw allow 443

Check the status again:

sudo ufw status

You should see that the port is open and this should solve the issue for you. Hope it helps.

You can check this tutorial as well:

Let me know how it goes.

Regards, Alex