Ubuntu, apache2 and SSL (443)
Go to solution
Solved by Jarsky,
1 hour ago, foxp3 said:telnet 127.0.0.1 443 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'.Without a problem. Could it be that my iptables only have an http entry and not an https entry?
Yup, you only have a rule for the http
ACCEPT tcp -- anywhere anywhere tcp dpt:http state NEW,ESTABLISHED
You're probably best to also use conntrack, so I would remove the existing entry and create a new one.
Run this command to find the chain number of the http entry above - its probably #5
sudo iptables -L --line-numbers
Then you should run this to remove the rule:
sudo iptables -D INPUT 5 (where 5 is the chain number of the rule)
Then create your new rules:
sudo iptables -I 5 INPUT -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -p tcp -m multiport --dports 80,443 -m conntrack --ctstate ESTABLISHED -j ACCEPT
Check that you can load the site on both port 80 & 443.
If all is good then you should be able to create your certificate.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now