Cloudflare Ports?

When proxying traffic through a CF’s A record, what ports should I choose as incoming in order for my port-forwarding rules to work? I know Cloudflare has a limited port number it can proxy, but I need to know where is Cloudflare trying to hit my origin IP, by port? The connection client-Cloudflare succeeds, but I don’t know what port should I keep open in order for Cloudflare to hit my Origin IP successfully

I’m trying to receive TCP connections (Non-http) to a port of my choosing, at my origin.

Greetings,

Thank you for asking.

Supported and compatible ports with Cloudflare proxy mode :orange: are listed on the link from below:

Setup port forwarding on your origin to one of them if possible, otherwise you should use unproxied :grey: (DNS-only) hostname.

Are you using HAProxy or Nginx or some other?

Hi, thank you. I know what ports Cloudflare uses, but I’d like to know what port is Cloudflare trying to reach at the Origin IP. I’m not using any proxy, just port forwarding rules accepting incoming connections (That’s where I need to specify an open port in order to let Cloudflare successfully hit the internal IP). I hope this makes sense

For no special reason, I just tried to accept incoming connections for example, to the router’s 2052 port, and at the client-side, also trying to connect to Cloudflare’s 2052 port, but I’m not reaching anything yet

What’s the difference between DNS only and “proxied” at the A record? I always set it up to ‘proxied’ but at this moment I’m not 100% sure what that is

But, the app which you are using on your host, does it listen and work on the same 2052 port or rather some intern 3001 then proxying to 2052 on your NAT (firewall)?

Unless you are using Cloudflare Spectrum, protocols other than HTTP/HTTPS will not work on :orange: hostnames.

1 Like

I’ll need to read the docs again thoroughly, because I’m not even sure what that means. I am succesfully sending TCP through Cloudflare. I never achieved this with Cloudflared, but with the normal proxy I’m okay now. By the way, my A record had an underscore in the name, and that’s why it didn’t work :facepalm:

1 Like

Thank you fritex, I had an error at the A record; the record name (subdomain) had an underscore, and it was never going to work that way… Thank you! I learned a couple things by this troubleshooting :raised_hands:

1 Like

Okay, deactivated Proxy-ing and it worked (My subdomain only resolved to my origin IP) but when I activated it, it stopped communicating, I’ll need to solve that problem now

I checked Spectrum, but an enterprise plan (Quoted at ~30K a month) is an extreme for this use case, I think I’m stuck with this. Ngrok will work fine for this

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.