Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: Masquerading.

Masquerading: Difference between revisions

From MoodleDocs
Line 15: Line 15:
  TODO: add explanation how to setup DNS in intranet so that the same name points to private address from intranet and public address from Internet. --[[User:Skodak|Skodak]] 12:49, 16 January 2007 (CST)
  TODO: add explanation how to setup DNS in intranet so that the same name points to private address from intranet and public address from Internet. --[[User:Skodak|Skodak]] 12:49, 16 January 2007 (CST)


NOTE:  Came upon this page on 1/16/07 at 3:16 Pacific (what a coincidence).  Adding quick note on Windows DNS.  If running Win200x Server in an AD domain, a domain controller must be running DNS.  This DNS server should be configured with Forwarders to your ISP for resolving names it doesn't have in its own zones.  And your Windows clients should be pointing to this DNS server.  (another note, if you're running AD and your Windows clients do not have DNS pointing to the DNS server running on your DC, that's why it's taking you 5+ minutes to logon to the domain)
NOTE:  Came upon this page on 1/16/07 at 3:16 Pacific (what a coincidence).  Assuming you already have your NAT firewall performing port forwarding to your moodle.  Adding quick note on Windows DNS.  If running Win200x Server in an AD domain, a domain controller must be running DNS.  This DNS server should be configured with Forwarders to your ISP for resolving names it doesn't have in its own zones.  And your Windows clients should be pointing to this DNS server.  (another note, if you're running AD and your Windows clients do not have DNS pointing to the DNS server running on your DC, that's why it's taking you 5+ minutes to logon to the domain)


To accomodate using the same URL for intranet and Internet access to your moodle, you can create a new zone with the domain your moodle is in on your DNS server.  Create an A record for your moodle's internal IP address inside this zone.  Since your internal clients are using this DNS server, they'll get the private IP address; and Internet clients will get your public IP address.
To accomodate using the same URL for intranet and Internet access to your moodle, you can create a new zone with the domain your moodle is in on your DNS server.  Create an A record for your moodle's internal IP address inside this zone.  Since your internal clients are using this DNS server, they'll get the private IP address; and Internet clients will get your public IP address.

Revision as of 23:28, 16 January 2007

Running Moodle Behind A Masquerading Firewall

You may be running Moodle behind a Masquerading Firewall (using Network Address Translation or NAT). In this case your internal Moodle server will most likely be assigned a non-routable (private) IP address in one of the following ranges:

  • 10.0.0.0 - 10.255.255.255
  • 172.16.0.0 - 172.31.255.255
  • 192.168.0.0 - 192.168.255.255

You can not use internal ip address or internal server name in config.php if you want to access the server from Internet too.

NOTE: The original text was removed because it encouraged very bad practices --Petr Škoda (škoďák) 12:49, 16 January 2007 (CST)
TODO: add explanation how to setup DNS in intranet so that the same name points to private address from intranet and public address from Internet. --Petr Škoda (škoďák) 12:49, 16 January 2007 (CST)

NOTE: Came upon this page on 1/16/07 at 3:16 Pacific (what a coincidence). Assuming you already have your NAT firewall performing port forwarding to your moodle. Adding quick note on Windows DNS. If running Win200x Server in an AD domain, a domain controller must be running DNS. This DNS server should be configured with Forwarders to your ISP for resolving names it doesn't have in its own zones. And your Windows clients should be pointing to this DNS server. (another note, if you're running AD and your Windows clients do not have DNS pointing to the DNS server running on your DC, that's why it's taking you 5+ minutes to logon to the domain)

To accomodate using the same URL for intranet and Internet access to your moodle, you can create a new zone with the domain your moodle is in on your DNS server. Create an A record for your moodle's internal IP address inside this zone. Since your internal clients are using this DNS server, they'll get the private IP address; and Internet clients will get your public IP address.

Caution: I'm no DNS expert (in other words, if you break it, don't blame me!), but it's working for me. I have very little Linux experience, so can't tell you how to create zones in Linux, but the concept of creating a new zone and adding an A record in it should be the same.