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, 192.168.0.0/16, localhost, 103.21.244.0/22, 103.22.200.0/22, 103.31.4.0/22, 104.16.0.0/13, 104.24.0.0/14, 108.162.192.0/18, 131.0.72.0/22, 141.101.64.0/18, 162.158.0.0/15, 172.64.0.0/13, 173.245.48.0/20, 188.114.96.0/20, 190.93.240.0/20, 197.234.240.0/22, 198.41.128.0/17, 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!

2 Likes

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