mpaul
October 13, 2017, 8:48pm
1
I am new to haproxy.
I am deploying haproxy to route client connections for a specific port to my backend server running on a different port.
The backend server sees all clients have been originated on the same host.
Is there any configuration most likely in “default” or “front end” to pass the client hostname to the backend server.
Any help is appreciated.
Thanks
MPaul
Hi,
your question is unclear. What do you mean by “client hostname” ?
mpaul
October 16, 2017, 9:38pm
3
inside haproxy I wish to view what clients are connected and from what hostname!
quite like the " ss -at |grep port " ouput but inside hapropxy.
I tried the haproxy status page but it has no such details … atleast the webpage.
yes, it is possible but need to bind the port for frontend and backend on same IP but different port number
mpaul
October 17, 2017, 3:01pm
5
Please help confirm if you meant the following I did !
#---------------------------------------------------------------------
main frontend which proxys to the backends for mysql default port 3306
#---------------------------------------------------------------------
frontend MyFrontend
option tcplog
option logasap
bind 192.xxx.xxx.xxx:3306
default_backend TransparentBack
#---------------------------------------------------------------------
static backend for serving up data
#---------------------------------------------------------------------
backend TransparentBack
mode tcp
server mysql 192:xxx.xxx.xxx:3309 maxconn 1000
mpaul
October 18, 2017, 3:01pm
7
Thanks… but the status webpage does not show any frontend client list atall.
it does show some linkages for the “frontend” but no details…
Is it because we use tcplog !
mpaul
October 18, 2017, 3:04pm
8
sample snip output attached
remember we are not routing web clients these are std mysql tcp clients being switched to a new port