port 443 blocked?

Posted March 12, 2020 14.7k views

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
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?

edited by alexdo

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.

Submit an Answer
3 answers

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.


by Brian Boucheron
by Erika Heidi
UFW, or Uncomplicated Firewall, is an interface to iptables that is geared towards simplifying the process of configuring a firewall on Linux servers. In this guide, you'll learn how to set up a firewall with UFW on Ubuntu 18.04.

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?

Show answer This answer has been marked as resolved by comis.