Trying to proxy udp traffic. nginx doesn't throw any error about the configuration. The client connects until half-way (it says it could reach the end server) but the connection then gets stuck and eventually closes out with timeout.
nginx version: 1.21.3
OS: Ubuntu 18.04
nginx.conf:
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
worker_rlimit_nofile 30000;
events {
worker_connections 30000;
multi_accept on;
}
stream{
server {
listen *:4800-4899 udp;
proxy_pass 217.178.x.x:$server_port;
}
}
error.log:
2213#2213: *3 recv() failed (90: Message too long) while proxying and reading from upstream, udp client: 49.98.x.x, server: 66.42.x.x:4801, upstream: "217.178.x.x:4801", bytes from/to client:1464/0, bytes from/to upstream:0/1464
49.98.x.x: client IP
66.42.x.x: proxy IP
217.178.x.x: end server IP
ip a output
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 56:00:03:95:cc:59 brd ff:ff:ff:ff:ff:ff
inet 66.42.x.x/23 brd 66.42.x.255 scope global dynamic enp1s0
valid_lft 57402sec preferred_lft 57402sec
inet6 fe80::5400:3ff:fe95:[xxx]/64 scope link
valid_lft forever preferred_lft forever
Any idea what's wrong? Can anyone see any issue in the config?
Thanks