Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 3rd June 2013, 17:05
myortyo myortyo is offline
Junior Member
Join Date: Jun 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Haproxy redirect subdomains on ssh port

Hello folks,

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

Here my haproxy.cfg

       maxconn 10000

       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

backend smart
        mode tcp
        server smart check port 22

backend sshgit
       mode tcp
       server sshgit 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
Reply With Quote
Sponsored Links


ssh haproxy redirect

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
strange fail2ban behaviour > doesn't ban specific IP Djamu Server Operation 2 13th January 2012 03:29
Mail Question: installed smf forum on centos perfect server setup with ispconfig happz Installation/Configuration 7 22nd August 2008 14:15
Getting e-mail working hansoffate Installation/Configuration 29 13th August 2008 17:33
SSH port forwarding (SQLYog Tunnel) mastorna Server Operation 0 22nd June 2006 02:16
How to install BFD (Brute Force Detection) domino Tips/Tricks/Mods 9 31st March 2006 23:40

All times are GMT +2. The time now is 22:24.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.