AWS Classic Load Balancer End-to-End Encryption - amazon-web-services

Is it possible to configure an AWS Classic Balancer to do something like this:
Client <-- SSL (Signed Certificate) --> ELB <-- SSL (Self-Signed Certificate) --> EC2
Looking at listener configurations, it looks like there is a one to one relationship between the listener and the certificate it uses.
If anyone knows how I could achieve this, being pointed to some documentation would also be helpful.

You can create a load balancer that listens on both the HTTP (80) and
HTTPS (443) ports. If you specify that the HTTPS listener sends
requests to the instances on port 80, the load balancer terminates the
requests and communication from the load balancer to the instances is
not encrypted. If the HTTPS listener sends requests to the instances
on port 443, communication from the load balancer to the instances is
encrypted.
Create a Classic Load Balancer with an HTTPS Listener

Related

AWS Load Balancer, Static IP's and SSL termination on the server (not load balancer)

The Goal: Assign Elastic/static IP's to Load Balancer (LB) to serve EC2 Instances that process DNS (port 53), HTTPS (port 443), HTTP (port 80).
Static IP's are needed to correctly configure DNS records (namely A Records). TLS termination on the backend/server is needed to serve an unlimited & ever changing amount of SSL Certificate's, hence avoiding Amazon Certificate Manager (ACM) as it has limits.
A Classic Load Balancer would allow custom security rules and permit SSL termination on the EC2 Instances. The problem being that Static IP's cannot be assigned to a Classic LB, only to individual instances within it, which doesn't balance the load.
To have static IP’s assigned we could use an Application Load balancer (ALB) with Global Accelerator or a Network Load balancer (NLB); but they both force TLS termination and prevent the instances from serving SSL certs.
Am I missing a slice? I don't even want to eat the cake, I want to share it around. Does anyone have a solution?
Use the Network Load Balancer. It would be configured the following way:
DNS - Either UDP or TCP listener depending on how its used.
HTTP - A TCP Listener
HTTPS - A TCP Listener
Yes the Network load balancer does support a TLS listener for SSL termination, but you can use the TCP Listener to have the servers become responsible for SSL termination.
You would attach a static IP address for each availability zone for your Network Load Balancer.

How to create a http and https load balancer that will allow SSL pass to my instances

I am trying to create a load balancer on GCP that will route HTTP and HTTPS traffic to my single instance (I'm just testing things out so I have a single instance that serves http traffic).
My instance will be serving for many domains, and these domains are not owned by me but for my clients. I will simply manage the letsecrypt SSL certificates for these domains. They will point their domains to my service like a DNS record: service.example.com
Can I still use GCP load balancers for HTTPS traffic with the above considerations? I essentially need the load balancers to pass all SSL traffic to my instances.
I can't seem to figure out how to create a load balancer that will pass SSL traffic to my instances, is this possible?
If your goal is to create a load balancer that passes thru HTTPS traffic (and HTTP) directly to a backend instance(s), use the TCP Load Balancer.
Step 1. Create a "regional" static IP address before creating the load balancer. Create the IP address in the same region as your instance.
Step 2: Create a TCP Load Balancer. I will skip the minor details that are obvious.
Backend configuration:
Select Single region only. This will allow you to bypass having instance groups.
Select existing instances -> Select your vm.
Frontend configuration:
Protocol TCP. IP: select the static IP address that you created. Port: 80. Click Done.
Add another frontend. Protocol TCP. IP: same IP address. Port: 443. Click Done.
Once you create the load balancer, wait 5 or 10 minutes for everything to configure and startup.
Now your and HTTP and HTTPS traffic will be passed directly to your backend instance(s). Note that this configuration does not use autoscaling, managed instance groups, healthchecks, etc.
You will manage your SSL certificates on your backend instance(s) (your Compute Engine VMs). The load balancer just passes traffic thru with no SSL offload.

Adding a secure HTTPS certificate to AWS EC2 Instance

I have an application running on an AWS EC2 instance with the domain's nameservers on AWS as well. I have an A record with the public IP.
I've create a secure certificate with ACM and also created an ELB Load Balancer. My domain still doesn't show the HTTPS in front of it.
Can anyone provide some help? Many thanks
Have you tried this ?
First, you need to open HTTPS port (443). To do that, you go to https://console.aws.amazon.com/ec2/ and click on the Security Groups link on the left, then create a new security group with also HTTPS available. Then, just update the security group of a running instance or create a new instance using that group.
After these steps, your EC2 work is finished, and it's all an application problem.
Credit to : https://stackoverflow.com/a/6253484/8131036
The solution is pretty simple.
First of all, edit the listeners on your ELB and do the following:
443 (HTTPS) => 80 (HTTP) - and apply ACM certificate.
What this essentially is doing is tells the ELB to listen on port 443 (HTTPS) and terminate the certificate and then forward traffic internally over port 80 (HTTP) - the port the instance is listening on.
You can also add port 80 (HTTP) and forward to port 80 (HTTP) (recommended and then set up your application to redirect all users to HTTPS). You can read more about ELB and setting up listeners here Create a Classic Load Balancer with an HTTPS Listener
Second thing you need to do is update Route 53 to point to ELB.
ascisolutions.com. A ALIAS s3-website-us-west-2.amazonaws.com. You can read more about it here Routing Traffic to an ELB Load Balancer
Let me know if you have more questions in the comments section and I'll do my best to reply.
You cannot install an ACM certificate on an ec2 instance directly, but you can install it on your load balancer and have the load balancer terminate SSL.
Create a target group and register your ec2 instances using port 80.
In your ELB, setup listeners for both port 80 and 443. You'll need to add your ACM cert to your https listener (port 443). Note that the certificate needs to be issued in the same region as your ELB.
The ELB does not handle redirecting insecure traffic to HTTPS, if needed, you will need to update your application to redirect http to https.

elastic load balancer port redirection?

i configured an ELB for an ec2 instance such the load balancer receives data from http:80 send it to https:443 to instances. But when i entered ELB DNS url , it is not redirecting to https.
output of ELB is:
it is showing the output of port 80. can anyone please help to configure elb such that it redirects incoming port 80 traffic to port 443 to ec2 instacne.
Load balancer used to send and receive traffic from different ports from the EC2 instances attached to that Load Balancer. You cannot setup any redirect using a Load Balancer. For redirects you have to set that up using the Web Server of your EC2 instance attached to that load balancer.
Also as per the https goes either you add a SSL certificate to the EC2 instance or the ELB. But that SSL certificate will be for the domain you are going to use for your application, and you do not own the domain "amazonaws.com" so your load balancer URL will never work for https. You have get a Domain and a SSL certificate for that domain upload that SSL certificate to ELB or the EC2 instance and then point the domain to the ELB by adding a C-Name. Then your domain will work for https ://www.domain.com if you have set everything correctly in the web server.
It sounds like you want to redirect HTTP requests to HTTPS. This is more than just a port "redirect", it is also a protocol change. To properly redirect HTTP traffic to HTTPS you will need to configure your web server to do that.

Issues with EC2 Load balancer, SNI, multiple SSL domains on the same server

i am having issues setting up an EC2 load balancer, on a instance, that has multiple domains protected by SSL.
Is it possible to make the load balancer pass the HTTPS request as is, and get it decrypted at the server level? If so, how do i set that up?
I have a standard LAMP setup on a EC2.
On your Elastic Load Balancer, configure a TCP listener that listens on port 443 and forwards to port 443 on the instances. This will allow your EC2 instances to perform the SSL termination.
Note that you won't be able to use Sticky Sessions in this configuration.