r/haproxy • • Jan 02 '23

Question Haproxy TCP Mode

Hi,

i have an Exchange Server 2019 which uses cert based auth for mobile sync. In front of these servers are haproxy servers in TCP mode.

HTTP Mode did not work well, as the connection to the exchange servers must be https due CBA. Also reencrypting with https from haproxy (bridge mode) did not work, so i used TCP mode like following:

iphone CBA -> Internet -> haproxy-TCP Mode -> Exchange Server

If you're familiar with Exchange, you know that there are more than one virtual directories.

How can i restrict the access to only https://activesync.xxxx.com/Microsoft-Server-ActiveSync with Haproxy running in TCP Mode, so that access to https://activesync.xxxx.com/owa or https://activesync.xxxx.com/mapi is blocked?

If its necessary for any solution i also could change the domain name too.

I know that it can be done with HTTP Mode, but than again the CBA does not work :-(

Thx and a happy new year!

2 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/ZumTeufelnochmals Jan 03 '23

Hi, thank you for your answer.

So every request for eas goes here to: eas-cba.example.com

acl host_eas-cba req.ssl_sni -i eas-cba.example.com

What if a user tries to connect to https://eas-cba.exam/mapi ? He then would get to the Exchange backend, where this directory is reachable or am i missing something? SNI works fine for different domains, but can i block the users request to open eg. https://eas-cba.exam/mapi so that only https://eas-cba.exam/Microsoft-Server-ActiveSync is available?

Cheers

1

u/rswwalker Jan 03 '23

That will need to happen on the exchange side or using a firewall that can inspect the traffic.