Configure External and Internal URL in Exchange 2010

Spread the love




After installing Exchange 2010, you need to setup different URLs for various Exchange services that needs to be accesses from internal and external network. The Exchange services that needs URL configuration are, Outlook Web Access (OWA), ActiveSync, Exchange Control Panel (ECP), Offline Address Book (OWA), WebServices, AutoDiscover and Outlook Anywhere. It is highly recommended that you use same domain name to access these services both internally and externally. You can certainly use different internally vs externally but using same URL makes it easier for both users and administrators. This article shows how you can configure External and Internal URL in Exchange 2010 for various Exchange services.

Configure External and Internal URL in Exchange 2010

Here is a scenario with two Exchange servers named MBG-CAS01 and MBG-MBX01. These servers are in mustbegeek.local Active Directory forest root domain. CAS and Hub transport server roles are installed in MBG-CAS01 and Mailbox server role is installed in MBG-MBX01 server. The goal is to use mail.mustbegeek.com domain to access Exchange server both internally and externally. In order for mail flow to work correctly, mustbegeek.com domain should be added as Authoritative accepted domain in Exchange server which I have already done in previous article.

Configure External and Internal URL in Exchange 2010

Before configuring the URLs for each Exchange services, we need to add mustbegeek.com as new DNS zone in Active Directory. To do so, go to DNS server MBG-DCC01. Open DNS management console. Expand the server. Right-click forward lookup zones and click New Zone.

Configure External and Internal URL in Exchange 2010

Click Next on the Welcome page.



In the Zone Type page, choose primary zone as zone type and click Next.

In the Active Directory Zone Replication Scope page, choose to all DNS servers running on domain controllers in this domain: mustbegeek.local and click Next.

In the Zone Name page, type zone name as mustbegeek.com and click Next. In Dynamic Update page, choose allow only secure dynamic updates and click Next.

Review the settings and click Finish to create new DNS zone. Now right-click mustbegeek.com zone and click New Host (A or AAAA) option.

Now users from internal network can go to Exchange server using mail.mustbegeek.com domain name. 192.168.1.21 is the IP address of MBG-CAS01 Exchange server with CAS and Hub Transport role installed. Now let’s change URL of each Exchange services. These URLs needs to be configured on Exchange server running Client Access Server role.

  1. Autodiscover: Autodiscover service is very important and is used by clients like Office Outlook to find and setup Outlook profile automatically by discovering the mailbox settings automatically. Autodiscover is used both internally and externally but URL for Autodiscover service is configured internally only. To change the URL of Autodiscover go to Exchage server and open Exchange Management Shell, type following cmdlets
    [PS] C:\Windows\system32>Set-ClientAccessServer -Identity MBG-CAS01 -AutoDiscoverServiceInternalUri https://mail.mustbegeek.com/autodiscover/autodiscover.xml

    To view the changes made, type

    [PS] C:\Windows\system32>Get-ClientAccessServer -Identity MBG-CAS01 | Select Autodiscoverserviceinternaluri
    
    AutoDiscoverServiceInternalUri
    ------------------------------
    https://mail.mustbegeek.com/autodiscover/autodiscover.xml

    You can also use autodiscover.mustbegeek.com for autodiscover URL internally, make sure you add A record for Autodiscover in your internal DNS server. From external network, while accessing the mailbox, the Outlook client will use autodiscover.mustbegeek.com domain. So make sure your public DNS hosting provider like GoDaddy, has autodiscover.mustbegeek.com pointed to correct public IP address of your organization that is NATed to the Exchange server. Also make sure, the certificate installed in Exchange server has autodiscover.mustbegeek.com subject alternative name.

  2. ActiveSync Virtual Directory: ActivcSync virtual directory is used by ActiveSync clients. To set external and internal URL for ActiveSync virtual directory type following cmdlets,
    [PS] C:\Windows\system32>Set-ActiveSyncVirtualDirectory -Identity "MBG-CAS01\Microsoft-Server-ActiveSync (Default Web Site)" -InternalUrl https://mail.mustbegeek.com/Microsoft-Server-ActiveSync
    [PS] C:\Windows\system32>Set-ActiveSyncVirtualDirectory -Identity "MBG-CAS01\Microsoft-Server-ActiveSync (Default Web Site)" -ExternalUrl https://mail.mustbegeek.com/Microsoft-Server-ActiveSync
  3. Web Services Virtual Directory: To set internal and external URL for WebServices virtual directory type following cmdlets,
    [PS] C:\Windows\system32>Set-WebServicesVirtualDirectory -Identity "MBG-CAS01\EWS (Default Web Site)" -InternalUrl https://mail.mustbegeek.com/ews/exchange.asmx
    [PS] C:\Windows\system32>Set-WebServicesVirtualDirectory -Identity "MBG-CAS01\EWS (Default Web Site)" -ExternalUrl https://mail.mustbegeek.com/ews/exchange.asmx
  4. OAB Virtual Directory: OAB virtual directory is used to roll out offline address books to clients. To set internal and external URL for OAB virtual directory type following cmdlets,
    [PS] C:\Windows\system32>Set-OABVirtualDirectory -Identity "MBG-CAS01\OAB (Default Web Site)" -InternalUrl https://mail.mustbegeek.com/oab
    [PS] C:\Windows\system32>Set-OABVirtualDirectory -Identity "MBG-CAS01\OAB (Default Web Site)" -ExternalUrl https://mail.mustbegeek.com/oab
  5. OWA Virtual Directory: OWA virtual directory is used when users access web mail via, mail.mustbegeek.com\owa in their browser. To set internal and external URL for OWA virtual directory type following cmdlets,
    [PS] C:\Windows\system32>Set-OWAVirtualDirectory -Identity "MBG-CAS01\OWA (Default Web Site)" -InternalUrl https://mail.mustbegeek.com/owa
    [PS] C:\Windows\system32>Set-OWAVirtualDirectory -Identity "MBG-CAS01\OWA (Default Web Site)" -ExternalUrl https://mail.mustbegeek.com/owa
  6. ECP Virtual Directory: ECP is used to access settings of a mailbox by browsing mail.mustbegeek.com/ecp. For example, users can create inbox rules by going to Organize E-Mail and Inbox Rules.

    To set internal and external URL for ECP virtual directory type following cmdlets,

    [PS] C:\Windows\system32>Set-ECPVirtualDirectory -Identity "MBG-CAS01\ecp (Default Web Site)" -InternalUrl https://mail.mustbegeek.com/ecp
    [PS] C:\Windows\system32>Set-ECPVirtualDirectory -Identity "MBG-CAS01\ecp (Default Web Site)" -ExternalUrl https://mail.mustbegeek.com/ecp
  7. Outlook Anywhere: Outlook Anywhere is not enabled by default in Exchange 2010. You need to enable it manually. You can set the external URL while enabling the feature. Internally it uses SCP or Autodiscover URL. You can also manually change external URL of Outlook Anywhere using following cmdlets after it is enabled,
    [PS] C:\Windows\system32>Set-OutlookAnywhere -Identity "MBG-CAS01\Rpc (Default Web Site)" -ExternalHostname mail.mustbegeek.com

After making all the changes, restart IIS service. Use this command to restart IIS from command prompt, iisreset /noforce. User can now connect to mailbox using Outlook application. For user to be able to connect to Outlook from Internet, Outlook Anywhere must be enabled.

 




The following two tabs change content below.
Bipin is a freelance Network and System Engineer with expertise on Cisco, Juniper, Microsoft, VMware, and other technologies. You can hire him on UpWork. Bipin enjoys writing articles and tutorials related to Network technologies. Some of his certifications are, MCSE:Messaging, JNCIP-SEC, JNCIS-ENT, and others.

Latest posts by Bipin (see all)

scroll to top