KB0044173
ProxyProtocol get Source IP
Introduction
In this case, we want to get sourceIP, scheme trouth OVH API LoadBalancing, without install our SSL Certitificate on it. This is helpful if you have many domains with many SSL certificates.
Requirements
We assume you have already an OVH Load Balancer HTTP configured, if not follow ..refs:fr/fr/cloud/iplb/configure-iplb
You have :
- An OVH Load Balancer service
- Nginx (or Apache with mod_proxyprotocol) on an OVH backend
- A domain (option)
- An SSL certificate (option)
Nginx Configuration
For this example we use this minimal nginx configuration on each backend.
- Port 80 / 443 are used for direct connexion to backend (for test, management, ...)
- Port 8080 / 4443 are used with LoadBalancer
You can't use ProxyProtocol and HTTP on the same port, and theses protocols aren't cross-compatible.
Infrastructure
| Backend# | Public IP | Zone |
|---|---|---|
| backend_1 | 213.186.0.1 | rbx |
| backend_2 | 213.186.0.2 | rbx |
Configuration
Add backends
Create a new farm for each port on backend.
| Parameter | Return 1 | Return 2 |
|---|---|---|
| id | 1000 | 10001 |
| Parameter | Return 1 | Return 2 | Return 3 | Return 4 |
|---|---|---|---|---|
| id | 2000 | 20001 | 20002 | 20003 |
Add frontend
Apply changes
Firewall
Don't forget to allow IPLoadbalancing traffic to your backends: