RTMP protocol passthrough?

I run a website on a remote Ubuntu server.
It runs a web server and a media server (rtmp).
When I try to send a video stream via my cloudflare domain, it fails.
If I use the machine’s IP address or an alternative domain name assigned to the same IP (without cloudflare), it works.
How can I fix this?

Note: I do not want cloudflare to process the media in any way, I just want it to allow the connection to pass through to my server.

By signing up for an Enterprise plan. As this is most likely not the most viable option you can only unproxy that DNS record and connect straight to the IP address. Cloudflare does not proxy that on standard plans.

I knew there must be a catch when I signed up to cloudflare.
So what other protocols does it block?
I know http and https works. What about ftp, sftp, etc?
If I send the stream via http will it work?

It doesn’t block protocols. Cloudflare simply only proxies HTTP, that’s it. FTP won’t work either.

Streaming via HTTP would technically work but you’ll be very quickly in violation of point 2.8 of the terms of service and will get your account suspended.

If you want to do something with media you best purchase a Stream subscription.

I strongly suggest you check out support.cloudflare.com before using Cloudflare.

From my perspective, it’s as if by using this service I’m locking myself from using my domain for all sorts of purposes: FTP, SMTP, RTMP, etc.

Is it not possible to set it up to work in my favour? ie, so the various assets on my site are handled by cloudflare, but everything is handled directly through my server, and if so would this be in violation of the terms of service?

You can use all these services, just not via the proxies. Keep unproxied records and all these services are available as they always were.

And yes, you can have your actual site on a proxied record but link all media resources via an unproxied record, which goes directly to your server instead of Cloudflare. That would be fine.

ok, so currently my DNS looks like this (redacted IP addresses and domain name):

What exactly would I need to do there to achieve my desired outcome?

Create an additional record, just like “mail” (:grey:) and use that record exclusively for all non-HTTP services, respectively web resources which would be in violation of the terms.

1 Like

Thanks for your help, I’ll give it a try.

Essentially, everything website related can be loaded via an :orange: link, everything media related has to be loaded via :grey:.

Incidentally, my website can potentially serve quite a lot of video content. It has a back-end file manager where lots of high bitrate video media is stored, and this can be downloaded via an interface.
By serving this content through my cloudflare proxy, is this a no-no? I would assume it only proxies certain files like css, js, html, etc.
Should I make sure this also goes through an unproxied subdomain?

That is exactly what I was referring to.

Right, but am I correct in assuming Cloudflare wouldn’t cache and serve via proxy a 1GB video file anyway, so I shouldn’t really worry about serving large media download requests via a non-proxied subdomain?

A one gigabyte file would not be cached, but caching is not so much the issue. Traffic is. Simply keep anything media related on :grey: only and you will be good. Or look into Cloudflare Stream.

There is no issue using your domain for any protocol, but you can only put HTTP/HTTPS through :orange: hostnames. (Unless you are using Spectrum).

I would be curious if you can put RTMPT through Cloudflare. It will probably get your account banned if there is any volume, so consider doing this carefully.

RTMP is all but over for end user delivery, but it still has a role in live invest. Flash is disappearing rapidly from browsers, and even in browsers that still ship with Flash it’s deliberately painful to use. Use HLS and DASH instead. Both of these are offered by Cloudflare Stream, and are supported by all the usual commercial CDNs.