Haproxy redirect subdomains on ssh port

Discussion in 'Server Operation' started by myortyo, Jun 3, 2013.

  1. myortyo

    myortyo New Member

    Hello folks,

    I try to redirect my ssh port on two different machines on my local network.

    Here my haproxy.cfg

    Code:
    global
           daemon
           maxconn 10000
    
    defaults
           timeout connect 500s
           timeout client 5000s
           timeout server 1h
    
    frontend ssh
           bind *:22
           acl host_smart hdr_beg(host) -i smart
           acl host_git hdr_beg(host) -i git
           use_backend sshgit if host_git
           use_backend smart if host_smart
           default_backend smart
           timeout client 1h
    
    frontend http
            mode http
            bind *:80
            acl host_git hdr_beg(host) -i git
            use_backend git if host_git
            default_backend git
    
    #frontend https
    #        bind *:443
    #        mode tcp
    #        reqadd X-Forwarded-Proto:\ https
    #       forwardfor
    #        option http-server-close
    #        default_backend git
    
    backend git
            mode http
            server git 172.17.16.30:80
    
    backend smart
            mode tcp
            server smart 172.17.16.20:22 check port 22
    
    backend sshgit
           mode tcp
           server sshgit 172.17.16.30:22 check port 22
    the http port is working well and I come on my different webservers but the ssh port is not working :/.

    (http is working too when I got more as one backend on subdomains :) )

    WOuld be kind if anyone can help me.

    Nice greetings myortyo
     

Share This Page