Resolve the correct IP addresses using x_forwarded_for variable when behind a proxy. Add rdns_proxy and rdns_proxy_rdns_proxy_recursive configuration directives.