How to open HTTPS port in Google cloud?

6k Views Asked by At

Hello today configured vps on Google Cloud and put Vesta control panel, but the problem is not open one https that is, and the ip server and the domain itself does not open on https. Set up Google Cloud firewall and opened ports 80,443 but https does not open the site itself is not the ip of the server. Checked through online services port 443 is closed but settings of the server and a firewall of Google and ip tables say that port 443 is opened (checked by several services port 443) and in the browser through ip of the server and the domain on https do not open. Please tell me how to open port 443?

Same with ports 8443,8080.

2

There are 2 best solutions below

1
On BEST ANSWER

I am not able to comment but here are some steps that might help to isolate the issue:

  1. Check to see if the port is open or closed or filtered using nmap

    nmap [ip_address]

  2. Firewall rules are defined at the network level and therefore make sure that you follow this document while creating the firewall rules to allow incoming traffic on TCP port 80 and 443 (same for other ports). In this document in step 11, choose " specified protocols and ports" and enter tcp: 80, tcp: 443.

  3. As you previously stated, you need to make sure there is no firewall running inside the VM blocking those connections.

  4. You also need to verify if the application running on your vps is listening on port 443. To check this, try with this command.

    sudo netstat -ntlp | grep LISTEN

In the output, if you don't see the application beside port number, check if your vps is rightly configured to ports for your application.

0
On

I was having the same issue with NGinx. And Found the root cause finally to be the Firewall (GCP VM Firewall) having a lower priority for the rule. ie: I had 65534 (which is super low priority) for the "Ingress 443" rule. Which did block the traffic coming into the SSL. Instead when I set this rule to 1, traffic started flowing and issue sorted.

What finally helped me was https://cloud.google.com/vpc/docs/using-firewalls

Thanks @Md Zubayer for the tip.