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 127.0.0.1… 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?
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!
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
or
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:
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-18-04
Let me know how it goes.
Regards, Alex
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?
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”.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.