Simple port redirect on HAProxy no working

Hi,

I am trying to port forward using HAProxy in the following configuration:

Internet -> firewall -> HAProxy -> firewall -> end device

There is a DNS A record created to the public IP, and the public IP is mapped to HAProxy VIP on the firewall.

Here is my HAProxy config file:

listen test
bind *:3389
mode tcp
server srv1 privateIP:3389

From internet when trying to RDP to the end server I can see the connection success on the firewall to the HAProxy VIP.
From HAProxy box I can telnet to private IP on 3389 successfully.

However the RDP session from the internet never gets through.

What I actually want to do is use a random port for example 4422 from the internet and forward through to 3389 if I can get this to work. So I am simply trying to listen on 3389 and send to backend on 3389 for now, once this works I will change the bind and firewall ports etc. to the random port.

Please help, this is driving me crazy as it should be a simple setup.

Thank you in advance.

There are definitely not enough information’s in here to provide the answer.

The configuration snippet you posted should be correct, I don’t see anything wrong with it. Are you positive that haproxy actually receives your request?

Please provide the full configuration, the output of haproxy -vv, enable logging (in tcp mode) and provide those logs.