Score:0

proxing everything with Haproxy

cn flag

is it possible to not define backend in Haproxy configuration to make a proxy for every TCP connection? So if I will try to connect from host A(sftp,ssh,smtp) through HAproxy it will always reach destination.

Score:1
jp flag

I'm not aware of a method to "proxyfy" all TCP connections in HAProxy.

You should set up a front end and bind it to multiple ports, like:

bind 0.0.0.0:21
bind 0.0.0.0:22
bind 0.0.0.0:25

Then, based on port, set an ACL and a backend to that ACL, for every interesting port/service:

acl is_ftp dst_port 21
acl is_ssh dst_port 22
acl is_smtp dst_port 25

use_backend ssh if is_ftp
use_backend ftp if is_ssh
use_backend smtp if is_smtp
Score:0
pe flag

Maybe I misunderstand the question but if you dont define the ports on the frontend and the backend - then all traffic will stay on its current port i.e. WEB 80 -> 80 & SMTP 25 -> 25

listen L7_TCP_ALLPORTS
bind 10.0.0.20
mode tcp 
balance leastconn 
server RS001 192.168.1.21 check port 80

NB. You will need to specify the check port(otherwise it wont know).

cn flag
it doesn't work
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.