HTTPS Enablement with DNS Registrar: AWS Route 53, DNS Management: Cloudflare, Loadbalancer:OCI
Tags: aws, dns, oraclecloud, cloudflare
Published: 2024-04-30 08:22:46


The post below describes SSL enablement for a domain registered with AWS Route 53, DNS management in Cloudflare, and the setup of load balancers and compute instances hosted on Oracle Cloud Infrastructure (OCI).

The background involves three actors due to the domain's previous use for other purposes. Keeping the status quo helps understand the complexities involving multiple actors. The DNS management part can be shifted to either AWS or OCI, reducing the number of actors in the value chain to two.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/be35wl2gz7cya1rhppv6.png)



**Starting Point.**

1. bantwal.ch domain obtained from AWS Route 53
2. NS Records in AWS Route 53 pointing to Cloudflare
3. OCI Instance _instance-web-1 and instance-web-2_  serves Apache webserver on http://PUBLICIP:80


**Objective**
1) LoadBalancer in OCI pointing to OCI Instance _instance-web-1 and instance-web-2_
2) Associate domain bantwal.ch to Loadbalancer
3) Enable HTTPS access for bantwal.ch

**Steps**

**1) Create Load Balancer on the regional subnet, add backend instance-web-1 and instance-web-2, add HTTP listener**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mlnppdmyouyft2i0728u.png)


**2) Navigate to the browser and do http test on public ip of Loadbalancer**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y8o83owjr4ygqgncrcx7.png)


Objective 1: Done

**3) Domain Registrar setting at AWS Route 53**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rzcjprpa7nwijxacwm24.png)

DNS NS records pointing to Cloudflare

**4) DNS Management in CloudFlare**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/87xm234ao7yc9z0huyre.png)

DNS A record pointing to the loadbalancer created in Step 1

SSL TLS Setting is Cloudflare is set to OFF


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jhjmt49apksiml9rvw4x.png)


**5) Navigate to the browser and do DNS Test**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cyt6spoqeafpnrve2pib.png)

Objective 2: Done

**6) Get the Certificate from CA Authority.**

This example uses
[SSL for Free](https://www.sslforfree.com/)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ecq3gf3kq6bur5ry52vj.png)

**7) Verification of domain**

This example uses DNS CNAME entry in Registar/DNS Management.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xu6bdepwfelj6hpokwax.png)


Copy the values. And verify the domain.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nbozzyzwthhgt3lscg7z.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ilotv1qz93hu5ji8kb21.png)

Download the Certificate

**8)Create Certificate object in OCI**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f6kusv92t3w4o0dhpruq.png)

Upload the files from the zip file downloaded in previous step.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uak57jj8yfyu85ddfsrd.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vegx6lwpkrp49btfuyyc.png)

**9)Create HTTPS Listener in Load Balancer**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43x8k1qe2qf8tc1002hu.png)

**10) Add the HTTPS Port to the stateful Ingress on Load Balancer Subnet**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hq73dhvpy236ivakzeh9.png)

**11) Access the site using SSL**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rv7s6iskubfrwi9vmd79.png)


**12) Verify the Certificate details on the browser**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hp28gi2g7r5jt2qdr2gt.png) 

Objective 3: Done