Hi,
I created a udp syslog load balancer. I'm trying to get the actual IP address of host in the log, instead of load balancer IP.
I tried below settings but I get an error "set_ip directive is not allowed here" etc.
where should I add the x-forwarded-for, or set_ip directive....etc???
Thanks in advance.
worker_rlimit_nofile 10000;
events {
worker_connections 100;
}
stream {
server {
listen 514 udp;
location / {
proxy_pass backend;
proxy_responses 0;
set_real_ip_from 10.xx.xx.xx/26
real_ip_header X-Forwarded-For;
}
}
# server {
# listen 514;
# proxy_pass backend_tcp;
# proxy_responses 0;
# }
upstream backend {
least_conn;
server 10.xx.xx.xx:514;
server 10.xx.xx.xx:514;
server 10.xx.xx.xx:514;
}
}