Hello, I really need some help accessing my app via cloudfared tunnel. The app is installed on an AWS EC2 Debian machine. I can successfully hit the page using http://[EC2IP]:[port] configured via inbound security rules. I can also successfully setup the cloudflare tunnel and access it via that tunnel and my personal domain and CNAME, but ONLY if I expose all TCP ports for 0.0.0.0/0. Otherwise Cloudflare cannot access the application. I have tried adding the public cloudflare ipv4 ranges (https://www.cloudflare.com/ips/) to the inbound rules, but that does not work either. Can anyone help with this?

EDIT: got it to work! Thank you so much @lilshalom@Lemmylefty@lemmy.world and @voidx@futurology.today !!

  • chandz05@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    10 months ago

    OMG I figured it out. It was actually my last comment that got me thinking in the right direction. The problem was that I was using the EC2 public IP address to point the tunnel to. EC2 also has an internal private IP address. Switched the tunnel to point to that, and it works! I felt like such a dummy when I thought about it. The tunnel is trying to hit the app internally. Why would it need to go out to the internet and retrieve a firewalled public address? Seems so obvious now.

      • chandz05@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        10 months ago

        I’ve always personally hated localhost and just opt to use the IP directly, which I guess was my downfall this time :)