Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

TCP routing based on FQDN

$
0
0

Hi, I’m trying to route TCP traffic on port 122/tcp to remote SSH server based on the FQDN.

Here is my HAProxy configuration :

frontend my_ssh_frontend
    bind *:122
    mode tcp
    option tcplog
    acl my_ssh_acl hdr(host) myHostname.myDomain.com
    use_backend my_ssh_backend if my_ssh_acl

backend my_ssh_backend
    mode tcp
    server myserver1 x2.y2.z2.t2:22 check

But it is as if the ACL condition is never true and therefore, the traffic is not routed to the backend :

 ssh.exe -p 122 -l admin-media myHostname.myDomain.com -vvv 2>&1 | egrep.exe -vw "identity file|Failed to open"
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug2: resolving "myHostname.myDomain.com" port 122
debug2: ssh_connect_direct
debug1: Connecting to myHostname.myDomain.com [x1.y1.z1.t1] port 122.
debug1: Connection established.
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
kex_exchange_identification: Connection closed by remote host

How can I do that ?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>