Don't Feed the TechnicianMoodle

DNS – Redirect external address to internal

This post is related to my Moodle project. Quick summary of that, I build a server to host my in-house moodle site. It had LDAP SSO for MS-AD users. Can be now assessed internally and externally.


The reason for this post is if a user was to got to http://moodle/ they would have SSO, but if they imputed the external URL they would not be authenticated and would have to input username and password. Nothing wrong with this but would defeat point of SSO.


I had to change DNS so users in school who used would be redirected direct to the Moodle server.


  • Open an MMC and add DNS snap-in. Right click and “Connect to DNS Server…
  • Right click on DNS and click “Connect to DNS Server“, in the dialog box enter the name of your DNS server.
  • Expand: DNS Server -> [DNS Controller] -> Forward Lookup Zones.
  • Right click on empty space and add “New Zone“. This will start the New Zone Wizard.
  • Click “Next“.
  • Make sure to select “Primary Zone” &  keep “Store in the Active Directory…”  ticked.
  • Next“.


  • Select “To all DNS servers running on domain controllers…” then press “Next“.


  • For “Zone name:” put in the URL you wish to redirect. For me (
  • Next“.
  • Select top option “Allow only secure…” then press “Next“.
  • Review your setting then press “Finish“.


Now you will see your new Forward Lookup Zone.


  • Click on your new Zone and add: “New Host (A or AAAA)…
  • If the site is a sub domain of the new zone (eg then under “Name” put in then sub domain name.
  • For IP put in the IP of the IIS server.
  • Click “Add Host

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.