Proper way to setup MariaDB behind Spectrum?

I currently have a MariaDB server setup behind (Enterprise) spectrum. The application type is set to TCP, and I’ve enabled Proxy Protocol v2. Connections work fine.

However, I run into an issue with translating my own IP to the server, since all my users are IP bound, I would like to send that IP to the server to handle. Without it, I get that what I assume is Cloudflare’s IP cannot access the server, which is reassuring that no one except me can access it, but I would still like to access it since I am, in fact, me.

After searching, I was led to MariaDB’s article on Proxy Protocol: Proxy Protocol Support - MariaDB Knowledge Base

However, I am asked to specify subnets:

To enable use of the proxy protocol, it is necessary to specify subnetworks that are allowed to send proxy headers, using the proxy-protocol-networks server variable.

I assume these are Cloudflares, so I’m not exactly sure how to give it this information.

I could be overlooking something, so any help is appreciated!

It says a comma-separated list of IPv4 and IPv6 subnets. That list is below. Beyond that, I don’t know what those proxy headers would look like, or if they’d exist through Spectrum.

1 Like

Ah, that’s exactly what I needed. I set

proxy-protocol-networks=::1,, localhost,,,,,,,,,,,,,,,, 2400:cb00::/32, 2606:4700::/32, 2803:f800::/32, 2405:b500::/32, 2405:8100::/32, 2a06:98c0::/29, 2c0f:f248::/32

(All of the ranges)

And it seems to be working fine now. Thank you!


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