I'm now VPS red pilled (and protecting with CloudFlare)

Web Dev Cody2 minutes read

The speaker discussed their experience with protecting cloudfront distribution, switching to VPS with Cloudflare for DOS protection, and detailed the process of setting up a Next.js application in a Docker container, pushing it to an AWS ECR repository, and integrating Cloudflare for secure communication.

Insights

  • Despite blocking 63 million requests, the speaker was still charged for 65 million allowed requests, highlighting potential discrepancies in cloud service billing systems.
  • The speaker's transition to a VPS setup with Cloudflare for DOS protection involved intricate steps like Dockerizing applications, utilizing Docker Compose, setting up a Caddy server for reverse proxy, and configuring SSL encryption with Cloudflare, showcasing a comprehensive approach to enhancing security and cost-effectiveness in hosting solutions.

Get key ideas from YouTube videos. It’s free

Recent questions

  • How can I protect my cloudfront distribution from DOS attacks?

    To protect your cloudfront distribution from DOS attacks, you can utilize services like Waf or Cloudflare. Waf can help block malicious requests, but be aware of potential charges for allowed requests. Consider switching to a VPS and using Cloudflare for free DOS protection to mitigate costs.

  • What is needed to deploy a Next.js application in a Docker container?

    Deploying a Next.js application in a Docker container requires adding g++, make, and cmake to the Docker file for successful deployment. These tools are essential for building and running the application within the container environment.

  • How can I push a Docker image to an AWS ECR repository?

    To push a Docker image to an AWS ECR repository, you can use a script that logs in to the repository, builds the container, tags it appropriately, and then pushes it to the repository. This process ensures that your Docker image is securely stored and accessible within your AWS environment.

  • What is involved in setting up a Docker Compose file for a Next.js application?

    Setting up a Docker Compose file for a Next.js application involves defining the services required for the application to run smoothly. Additionally, you may need to include a Caddy server acting as a reverse proxy in the Docker Compose file to manage incoming requests and facilitate communication between services.

  • How can I integrate Cloudflare with my VPS setup for added security?

    To integrate Cloudflare with your VPS setup, you can start by setting up DNS records and creating custom DNS records to point to your VPS. Configure SSL encryption by creating and transferring origin certificates to the VPS for secure communication. This integration enhances security and performance for your VPS setup.

Related videos

Summary

00:00

"Switching to VPS with Cloudflare for DOS Protection"

  • The speaker initially discussed using Waf to protect their cloudfront distribution from dos attacks, but despite blocking 63 million requests, they were still charged for 65 million allowed requests.
  • Due to the high costs incurred, the speaker decided to switch to hosting on a VPS and utilizing Cloudflare for free DOS protection.
  • The speaker detailed the process of setting up a Next.js application in a Docker container, emphasizing the need to add g++, make, and cmake to the Docker file for successful deployment.
  • They explained the process of pushing the Docker image to an AWS ECR repository using a script that logs in, builds the container, tags it, and pushes it to the repository.
  • Moving to the VPS setup, the speaker created a Docker Compose file to run the Next.js application and a Caddy server acting as a reverse proxy, with a Caddy file defining services and TLS certificate setup.
  • To integrate Cloudflare, the speaker walked through setting up DNS records, creating custom DNS records, and configuring SSL encryption, including creating and transferring origin certificates to the VPS for secure communication.
Channel avatarChannel avatarChannel avatarChannel avatarChannel avatar

Try it yourself — It’s free.