• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

HAProxy to multiple internal domains and exchange server

Scheduled Pinned Locked Moved Cache/Proxy
5 Posts 2 Posters 1.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V
    vjizzle
    last edited by Mar 13, 2018, 3:40 PM

    So guys I have done some research but I can't seem to fine the answer. What I need is the following:

    https://www.domain01.com -> pfSense -> internalwebserver01
    https://www.domain02.com -> pfSense -> internalwebserver01
    https://www.domain03.com -> pfSense -> internalwebserver01

    https://www.domain01.com/owa -> pfSense -> internal_exchangeserver01
    https://www.domain01.com/ecp -> pfSense -> internal_exchangeserver01
    https://www.domain01.com/EWS/Exchange.asmx -> pfSense -> internal_exchangeserver01
    https://www.domain01.com/mapi -> pfSense -> internal_exchangeserver01
    https://www.domain01.com/Microsoft-Server-ActiveSync -> pfSense -> internal_exchangeserver01
    https://www.domain01.com/OAB -> pfSense -> internal_exchangeserver01

    I have onlye 1 public IP and need to get my domains to be accessible to the internet at the same time publish exchange server with activesync using that same public IP. So far I have not found any article of using pfsense in this exact configuration so any help is greatly appreciated!

    1 Reply Last reply Reply Quote 0
    • P
      PiBa
      last edited by Mar 13, 2018, 8:56 PM

      There are plenty of articles that show how to use haproxy with multiple domains.. The difference for you is that you want to use a acl based on the path instead of the hostheader.. But that shouldnt hinder you from following any article..

      Other than that, have you considered making a mail.domain1.com for the exchange server?. Seems easier to me..

      1 Reply Last reply Reply Quote 0
      • V
        vjizzle
        last edited by Mar 14, 2018, 11:16 PM

        Thanks for your suggestion! That would be the way to go indeed. So I started to configure and now I got it working partially.

        See attached screenshots.

        So when I access https://www,vikash.nl it works perfectly. But when I try and access https://leviathan.vikash.nl to reach webmail I just get redirected to my webservers root directory showing the Apache2 default page in stead off the http page webmail of my mailserver.
        As you can see the backend configured are both different servers. Also I am not doing anything with SSL offloading so for now my Webmail page is using a default selfsigned certificate and my websites are using a valid SSL certificate.

        I feel like I am so close..but missing something. Any help is greatly appreciated!

        Screenshot_1.jpg
        Screenshot_1.jpg_thumb
        Screenshot_2.jpg
        Screenshot_2.jpg_thumb
        Screenshot_3.jpg
        Screenshot_3.jpg_thumb
        Screenshot_4.jpg
        Screenshot_4.jpg_thumb

        1 Reply Last reply Reply Quote 0
        • P
          PiBa
          last edited by Mar 14, 2018, 11:58 PM

          Screenshots seem to look good at first sight. Can you post (in # code tags) the haproxy.conf from bottom of setting tab?

          Have you removed any nat-portforward setting that might have been there before in pfSense/firewall/nat?
          Do make sure to add a regular pass firewall rule on the wan though instead.

          Also for the https://levithian.vikash.nl/ i dont get any response.. Where the http://levithian.vikash.nl/ shows a apache page, but thats correct as you are not (yet)  handling 'http' :80 with haproxy.

          On second thought perhaps the server isnt 'up' in haproxy stats?
          Or there is some ssl<>http mismatch?

          1 Reply Last reply Reply Quote 0
          • V
            vjizzle
            last edited by Mar 15, 2018, 10:46 AM

            Hi!

            I did some more testing now I am not at home. So it seems like everything is working fine :). Now testing with different SSL certificates. Thanks!

            1 Reply Last reply Reply Quote 0
            1 out of 5
            • First post
              1/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received