Welcome! Log In Create A New Profile

Advanced

Re: Nginx TCP/UDP Load Balancer

Francis Daly
September 02, 2020 03:58AM
On Wed, Sep 02, 2020 at 01:08:43AM -0400, Dr_tux wrote:

Hi there,

> When I add the proxy_bind parameter, requests are never forwarded to the
> server behind.

Is there any hint in your nginx logs of what is happening?

For example, on one old system here, when I test the config as root,
I can see:

# sbin/nginx -t
nginx: [emerg] transparent proxying is not supported on this platform, ignored in /usr/local/nginx/conf/nginx.conf:240
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

and when I try to connect to my nginx udp port from a remote machine,
I see no hint of the request being forwarded; but I do see a [crit]
message in the nginx error log, of the form "bind(client ip) failed
(99: Cannot assign requested address) while connecting to upstream"

When I try to connect from the local machine, I do see the request being
forwarded, with the same source address as my original packet used -- the
192.168.x one, or the 127.0.x one. So proxy_bind is being attempted, and
my operating system setup is preventing the "external" address being used.

> server {
> listen 3478 udp;
> proxy_pass stream_backend;
> proxy_bind $remote_addr transparent;
> }

That looks correct; but the IP address that nginx is allowed to set as the
source IP for the packets that it sends, is not only controlled by nginx.

If you have similar logs, you may have a similar problem that may be
fixable by re-configuring the supporting system.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx TCP/UDP Load Balancer

Dr_tux August 31, 2020 06:15AM

Re: Nginx TCP/UDP Load Balancer

Francis Daly September 01, 2020 08:14AM

Re: Nginx TCP/UDP Load Balancer

Dr_tux September 01, 2020 04:47PM

Re: Nginx TCP/UDP Load Balancer

Francis Daly September 01, 2020 06:22PM

Re: Nginx TCP/UDP Load Balancer

Dr_tux September 02, 2020 01:08AM

Re: Nginx TCP/UDP Load Balancer

Francis Daly September 02, 2020 03:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 207
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready