I have two servers, server-1 and server-2 (which is my destination server). I have firewall configured to allow traffic from server-1 --> server-2, UDP port 33055.
I have configured my nginx running on server-1 as below.
server {
listen 0.0.0.0:55 udp reuseport;
proxy_timeout 20s;
proxy_pass server2 33055;
}
Now when I try to connect server-1 on port 55, I am expecting it will route traffice to sever-2, UDP port 33055. Instead I see error in nginx logs as "connect() failed (111: Connection refused) while connecting to upstream".
Since sever-2 is allowing traffic from server-1, I am not sure if I have to set any header / host so when nginx is routing the traffic it will change the host header to server-1. Not sure how I can achieve that for UDP traffic.
Please note firewall is also configured on server-2 to allow traffic on port 22 from server-1 and that works, as the first step is to authenticate with a user of server-2, so that works But seeing issue wih UDP port 33055. If there is a way to enable more verbose logs on nginx then please share that so I can enable them as well.
Please share your suggestions.
Thanks,