• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Cloudflare and HAProxy, 522 error - how solve this?

Scheduled Pinned Locked Moved Cache/Proxy
3 Posts 2 Posters 552 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    swemattias
    last edited by swemattias Jan 7, 2023, 11:16 AM Jan 7, 2023, 11:13 AM

    So all is up and running, but when my domains get resolved, I get the Cloudflare IP for where my services and that is not correct.
    I am using proxied dns, to add a layer of security. I have found lots of solutions but I am not sure that none of them are for my issue (adding all CF IPs, and adding that to a frontend).

    So what am I trying to do?
    browser -> service.domain.io -> Cloudlfare
    Cloudflare -> finds domain -> returns Cloudflare IP

    My service is not at that IP... how do I get this to work?

    V 1 Reply Last reply Jan 7, 2023, 8:12 PM Reply Quote 0
    • V
      viragomann @swemattias
      last edited by Jan 7, 2023, 8:12 PM

      @swemattias said in Cloudflare and HAProxy, 522 error - how solve this?:

      So all is up and running, but when my domains get resolved, I get the Cloudflare IP for where my services and that is not correct.

      So your Cloudflare DNS is configured the CF proxy.
      Configure it to point to your IP.
      That's not something, which can be solved on pfSense.

      S 1 Reply Last reply Jan 7, 2023, 8:36 PM Reply Quote 0
      • S
        swemattias @viragomann
        last edited by Jan 7, 2023, 8:36 PM

        @viragomann I must have not made what I wrote Crystal clear.
        Pfsense + haproxy is working, haproxy has my true wan ip but when it tries to send it to CF it gets the proxied ip back.

        Or the error is Connection time out, 522. When trying to reach a service.

        1 Reply Last reply Reply Quote 0
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received