A look behind the scenes and setting up a test environment

I often receive questions like this one (from a few collected emails):

I don't have a fixed IP address, but would like to run my own Exchange server, is that possible?

I would like to set up an Exchange test environment at home, how do you do that?

I have a very small customer who wants to use Exchange, what do I need?

Since these questions land in my mailbox relatively often, I would like to take this opportunity to give you a little insight into my own small Exchange organization. Here was this view behind the scenes before, but "back then" it was Exchange Server 2010, so here is the current environment, which is also suitable for your own test environment, mini Exchange organization or just for playing.

Update: While I was writing this article, it occurred to me that I could also document the complete setup for the replica here. So a few posts with one of my test domains will follow. Where the following environment is set up step by step.

The environment / test environment

Test environment

My domain is still hosted by Strato, so far I have absolutely nothing bad to report, I have only had little need to contact support, but they have been consistently fast and competent. Therefore: thumbs up!

Strato's big advantage: you can create subdomains that can be updated dynamically, more on this later.

Internet access is via a VDSL line (100/50Mbit), dial-up is handled by a Fritzbox, which in turn forwards port 80 (HTTP) and port 443 (HTTPS) to the virtual firewall.

Die virtuelle Firewall (Sophos UTM) ist auf einem ESXi Server beheimatet. Der schluckt dank dem aktuellen Core-i7 und SSDs angenehm wenig Strom (~30 Watt unter Normallast). Mit 32 GB DDR4 RAM ist er auch ausreichend schnell. Für meine Exchange Organisation laufen auf dem ESXi 3 VMs: Domain Controller, Exchange Server und POP3 Connector VM.

Network

Network

Since my ESX server only has 2 network cards, I have configured various VLANs, VLAN 9 serves as a transfer network between Fritzbox and Sophos UTM. DC and Exchange Server are located in VLAN 10, which is behind the Sophos UTM. VLAN 11 is the DMZ. In the DMZ there is a Windows server that collects the mails via POP3 from Strato from the Catchall mailbox and sends them via SMTP to the UTM (enin, not directly to the Exchange). VLAN 20 is provided for the clients. The default gateway for all LANs is the Sophos UTM. There are other VLANs, but these are not relevant from an Exchange perspective.

Mail flow (incoming)

Mail flow

The POP3 Connector VM retrieves the mails from the Strato Catchall mailbox via POP3 and forwards them to the Sophos UTM via SMTP. The UTM in turn forwards the mail via SMTP to the Exchange server. Of course, you could also forward the mail directly from the POP3 connector to the Exchange server, but I decided against it. The UTM has a pretty good SPAM filter in the e-mail protection, but the SPAM filter prefers to work with the SMTP protocol, although the UTM can also act as a POP proxy and thus filter out viruses, but then you have to accept a few cuts. Since I do a lot of testing and playing around, I can use SMTP profiles in this configuration to redirect individual domains to other Exchange servers, for example when I install a new test environment, and the SPAM quarantine also works in this way.

Mail flow (outgoing)

Mailflow_A

Exchange first sends the mails to the UTM, which in turn has configured the Strato SMTP server as a smart host. Exchange could also send directly to the Strato SMTP server, but this configuration leaves a lot of freedom for test scenarios etc. thanks to the SMTP profiles of the UTM.

Active Directory / DNS / Exchange

The Active Directory is called frankysweb.de, I wanted to keep it as simple as possible at this point, so I don't need to work with alternative suffixes. Since I am only dealing with a tiny environment, I have made the e-mail address the user name in the simplest possible way. This also results in the DNS split brain:

dns

Two subdomains have been created at Strato, which are updated by the UTM with the dynamic IP of my Internet connection. On my internal DNS server, the Outlook and Autodiscover entries point to the IP address of the Exchange server.

The Exchange directories (internal and external with the exception of Autodisover) are all configured with the name outlook.frankysweb.de, so official certificates can be used and there is no certificate warning anywhere.

Publication of Exchange services

The Exchange services (Outlook Anywhere, OWA or Outlook on the Web, Autodiscover, EWS, etc.) are also published via the Sophos UTM. I use the web server protection of the UTM for this.

waf

The Fritzbox forwards port 80 (HTTP) and port 443 (HTTPs) to the Sophos UTM. The web server protection of the UTM then performs an HTTP to HTTPs redirection if connections arrive unencrypted.

Summary

This setup is certainly suitable for test environments, gimmicks or your own small environment. Whether you want to run a single-server solution as a company is up to you. I don't have any major availability requirements. If my ESX server burns down, I find that annoying, but I can quickly restore my backup to my workstation as a Hyper-V VM until I have a new ESX server :-)

A how-to for rebuilding will follow.

14 thoughts on “Ein Blick hinter die Kulissen und Aufbau einer Testumgebung”

  1. Vielen Dank für deine Klasse Tutorials!

    Meinst du, du kann noch etwas näher auf deine IP-Konfiguration, Switch, Gateway, VLAN, vSwitch eingehen? Ich habs bisher auch noch nicht geschafft, die eth0 dazu zu bewegen, eine Verbindung aufzubauen geschweige denn, diese durch eth1 zu routen.

    Reply
  2. Hallo Frank,
    Du schreibst hier:
    Die virtuelle Firewall (Sophos UTM) ist auf einem ESXi Server beheimatet. Der schluckt dank dem aktuellen Core-i7 und SSDs angenehm wenig Strom (~30 Watt unter Normallast). Mit 32 GB DDR4 RAM ist er auch ausreichend schnell. Für meine Exchange Organisation laufen auf dem ESXi 3 VMs: Domain Controller, Exchange Server und POP3 Connector VM.

    Wie darf ich mir das vorstellen? Hast du da einfach nen Mini PC ala Zotac ZBox mit ordentlich Power genommen? Leider sind meine Kriegskassen momentan geplündert. Habe zwar noch den Asus Vivo, welcher die Tage noch nen 8 GB Riegel für den Exchange bekommt, aber da macht ein Mini PC schon Sinn. Akutell habe ich die Pfsense als Appliance auf nen Apu Board laufen. Nen ESX hab ich zwar schon aber den auf nem 19″ Zoll Server und diesen möchte ich nicht 7/24 laufen lassen. Dachte zunächst an nen kleinen 19″ 1 HE aus der Bucht oder hast du mir vllt. genauere Details bzw. einen Kauftipp?

    Reply
    • Hallo Phil,
      der Beitrag ist nun ja auch schon etwas älter…
      Ich glaube die Hardware kann man schon gar nicht mehr kaufen :-) Ich habe hier einfach Standard Komponenten genommen, also keine Serverhardware oder Mini PCs. Standard Mainboard, CPU, RAM, SSDs fertig.
      Gruß,
      Frank

      Reply
      • Hi Frank,

        ja das geht bisher auch mit MiniPCs ganz gut. Will es aber dennoch richtig machen. Gut, wenn ich überlege, PC in der Leistugsklasse sind wir schnell bei 400-500, hatte eher an einen 1HE G6-G7 Server von HP gedacht, die sind Preisgünstig und werden meist schon mit ausreichend Speicher angeboten. SSDs und Festplatten hab ich noch da.

        Zwecks Sophos Home XG oder auch OPNSense: Hab mir das die Tage mal genauer angeschaut. Nutze zur Zeit ne Pfsense auf nem APU Board. Das läuft soweit aber wenn ich jetzt deine Config hier aus den Artikeln anwende, die auf Sophos und OPNSense recht einfach gehalten sind, bin ich bei der Pfsense und den Settings total überfordert. Würde ganz gerne die Spohos XG von dem VMWare PC trennen und in ne alte UTM 220 invstieren, da ich dann den Server nicht permanent laufen lassen muss, um meine Firewall zu betreiben. Läuft den die Sophos XG noch gut auf ner UTM?

        Ach, ja und zwecks der Dynamischen IP. Was muss ich wo einstellen, wenn ich ne feste IP habe?

        Grüße
        Phil

        Reply
  3. Hallo Frank,

    welches Programm nutzt du um die Umgebungspläne / Netzwerkpläne zu machen?
    Das sieht in deinen Beiträgen immer super Übersichtlich aus.

    Danke im Voraus.

    VG
    Maximilian

    Reply
  4. Hallo Frank,
    vielen Dank für deine äußerst hilfreichen und insteressanten How-To’s :) Wie ich in diesem Artikel sowie in deiner neuen Blog Serie „Erweiterung der “kleinen Exchange Organisation” schreibst du das du deine E-Mails per POP Connector der UTM von deinem Provider Strato abholst. Meines wissens kann man doch mittlerweile bei sämtlichen Anbietern auch DynDNS Hostnamen als MX-Record definieren !? Hat das einen bestimmten Grund oder machst du das nur weil dein Server nicht dauerhaft an ist um Mails zu empfangen?

    Besten Dank vorab und einen schönen Abend :)

    Gruß
    Sebastian

    Reply
    • Hi Sebastian,
      den Umweg via POP Connector mache ich, da es bei DynDNS Records nicht möglich ist, Reverse DNS Einträge zu konfigurieren. Das Empfangen von Mails funktioniert zwar eingeschränkt mit DynDNS, das Senden allerdings nicht. Ohne gültigen RDNS Eintrag lehnen nahezu alle Empfänger die Mails direkt ab.

      Gruß, Frank

      Reply
  5. Hallo Frank
    Ich habe den gesamten Artikel gelesen. Prima Anleitung für die Situation. Ich möchte mir mein DC und Exchange selbst neu auf setzten. Ähnlich deiner Konfiruation. Der Kampf fest IP war auch bei immer ein Thema. Nun bekomme ich eine. Was ich bei Dir vermisse ist der DHCP mit dem DC. Hast Du diesen noch auf der Fritz Box am laufen oder übersehe ich hier nun etwas. Ich würde den DHCP gern über den DC Server mitlaufen lassen da ich hierüber häufig mit den IP-Vergaben und MAC Filtern arbeite. Kannst Du mir vielleicht Gründe nennen warum ich das anders sein sollte oder es Probleme geben könnte? Wie ist das bei Dir?

    Reply
    • Hi,
      bei mir ist die UTM der DHCP Server, es spricht allerdings nichts dagegen, den DHCP Server auf einem Windows Server laufen zu lassen. Die Fritzbox kann in dieser Konfiguration zwar den DHCP Server aktiviert haben, wird allerdings maximal eine Adresse vergeben, nämlich an die UTM (entsprechende VLAN Konfiguration vorausgesetzt).
      Gruß, Frank

      Reply
  6. Hallo Frank,
    ich habe deine Anleitungen für die kleine Umgebung interessiert verfolgt.
    Bei mir ist es jedoch so, dass die interne Domäne anders lautet als die externe Domäne.
    Kannst du mir bei dieser Konstellation ein paar Typs geben; hab nämlich gerade ein größeres Brett vor dem Kopf und komme nicht weiter.
    Danke
    Jürgen

    Reply
    • Hi Jürgen,

      der Name der internen Domain darf ruhig unterschiedlich sein. Das Prinzip bleibt gleich. Wo gibt es denn Unklarheiten?
      Gruß, Frank

      Reply
  7. Hallo Frank,

    Eine Frage zu deiner Konfiguration. Wieso rufst Du deine Mails per POP3 ab?

    Ich war kurz davor meinen Anschluss auf einen Festen IP Anschluss umzustellen.
    Jetzt habe ich in deiner Konfig gelesen, dass das auch ohne geht. Dann kann ich meinen Anschluss so weiter verwenden wie bisher und meine Fritzbox wird nicht zum Modem degradiert ;-)
    Ich bin mal auf deine Anleitung gespannt.

    Meine Konfig zur Zeit:

    Unitymedia Business Anschluss mit „dynamischer“ IPv4
    Fritzbox
    Sophos UTM 110/120
    Hyper-V Server mit 4 VMs (2 DCs und 2 Exchange 2013)

    Geplant später noch eine NoSpam Proxy Firewall.

    Gruß Dirk

    Reply
    • Hi Dirk,
      ich werde auf das POP3 Thema in dem entsprechenden Konfigurations Artikel näher eingehen. Zwar ist es nicht mehr zeitgemäß E-Mails via POP3 abzurufen, aber es hat für kleine Umgebungen/Testumgebungen und Umgebungen mit dyn. IP folgende Vorteile:
      – Die Mails landen beim Provider und bleiben bis zum Abruf dort (Ausfall der Internetverbindung)
      – E-Mail Anbieter hassen dynamische IPs und wollen E-Mails weder von dynamischen IPs bekommen, noch dort hin senden
      – Reverse Records nicht bei dyn. IPs nicht möglich
      Wie schon erwähnt, genaueres gibt es im entsprechenden Artikel. Eine feste IP ist also nicht zwingend nötig, ich habe ja auch keine :-) Beim Spam Filter muss man dann allerdings etwas aufpassen, Infos folgen ;-)

      Gruß, Frank

      Reply

Leave a Comment