Performance of the proxy device compared to traditional iptables rules

That’s a common issue when you use a proxy. The solution is also common. In the case of nginx, you would use this module, Module ngx_http_realip_module to restore the source IP address. nginx would rewrite the source IP from the Host: HTTP header.

Most likely, you will end up using HAProxy so that you can put many more websites in different LXD containers. In that case, you need to tinker HAProxy according to https://www.haproxy.com/documentation/aloha/9-5/traffic-management/lb-layer7/http-rewrite/

2 Likes