+ Post New Thread
Results 1 to 13 of 13
Internet Related/Filtering/Firewall Thread, Moodle Help (Again!) in Technical; I posted about this before (a few months ago) but wasn't too clear in what I wanted to do. Basically, ...
  1. #1

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241

    Moodle Help (Again!)

    I posted about this before (a few months ago) but wasn't too clear in what I wanted to do.

    Basically, we have a domain which is hosted by company X and they provide management tools through the form of CPanel.

    A sub-domain, moodle.tanfieldschool.co.uk, is forwarded (setup using CPanel) to 217.23.224.4 - the IP used to access Moodle externally. Obviously Moodle is setup with the BASE DOMAIN NAME as 217.23.224.4 - our external IP.

    Now internally, when somebody browses to moodle.tanfieldschool.co.uk they are sent out to the server hosting the domain, which then forwards them to 217.23.224.4 - basically they access Moodle through our external interface.

    This is not a real problem, apart from the obvious reduction in speed because the users are going out and then back in through our internet, instead of just accessing it on the LAN.

    As I said, we can deal with this, but the big problem is when our net goes down, we lose Moodle - this shouldn't be the case as the box is hosted internally.

    I think it could be solved by adding an entry in DNS for moodle.tanfieldschool.co.uk, and changing the BASE DOMAIN NAME for Moodle to moodle.tanfieldschool.co.uk instead of 217.23.224.4, but this would then break the external forwarding domain, not allowing external access.

    Sorry if I'm not being clear - having a hard time trying to put what I mean into words.

    Thanks,

  2. #2

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241
    OK, I've had a thought.

    Let's say my internal IP for the Moodle server is I, and the external interface on our firewall (the one that points to our internal IP) is X.

    I have an A Host record in our DNS entries (locally) that links the domain name to I. This works great internally, but to hook it up to work outside of school I need to somehow link the domain name (which is held with a hosting company) to our external IP X, in a similar way (DNS I hope) as I did with the internal I.

    Is this possible? I've contacted the support team that host my domain name, and they say it will cause RECURSIVE DNS - is this true, and if so how should I go about working this?

    Thanks,

  3. #3

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,879
    Thank Post
    518
    Thanked 2,486 Times in 1,928 Posts
    Blog Entries
    24
    Rep Power
    838
    The way we do it for our school website is by spoofing our domain internally. ie. we have a root zone for our domain in our DNS server, and the various A host records point to the internal IP address of the web server (or, for example, our mail subdomain points to easymail). This way, outside users are dealing with the DNS server that directs them to the public IP and internal users use the internal DNS server to point to internal servers.

    It is seemless to users.

  4. #4

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241
    Quote Originally Posted by localzuk View Post
    The way we do it for our school website is by spoofing our domain internally. ie. we have a root zone for our domain in our DNS server, and the various A host records point to the internal IP address of the web server (or, for example, our mail subdomain points to easymail). This way, outside users are dealing with the DNS server that directs them to the public IP and internal users use the internal DNS server to point to internal servers.

    It is seemless to users.
    I think (as far as I can understand) that's what I'm trying to do. I asked the company to set up this in their DNS entries and they said it would cause recursive DNS?!

  5. #5


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,692
    Thank Post
    352
    Thanked 797 Times in 716 Posts
    Rep Power
    347
    I'd do it localzuk's way.

    Leave moodle.tanfieldschool.co.uk pointing to 217.23.224.4 on the cpanel dns.
    Knock up a zone on your internal DNS and point moodle.tanfieldschool.co.uk to the internal ip 1.2.3.4.

    I'd then check that the webserver vhost/servername is set to expect requests on moodle.tanfieldschool.co.uk which will be irrelevant of the IP used internally or externally.

    *Be aware though if you have anythingelse.tanfieldschool.co.uk you'll need to add them to this zone or they may fail*

  6. #6

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,879
    Thank Post
    518
    Thanked 2,486 Times in 1,928 Posts
    Blog Entries
    24
    Rep Power
    838
    Quote Originally Posted by Hightower View Post
    I think (as far as I can understand) that's what I'm trying to do. I asked the company to set up this in their DNS entries and they said it would cause recursive DNS?!
    DNS works by recursion so I don't get what they mean?

  7. #7

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241
    They've sorted it now, and it works fine - on a slightly different note though:

    I changed the www_root value in config to show the new value, but our images are still trying to load from the old address and therefore not loading at all.

    I think these are kept in the MySQL db - is there anyway to quickly go through the database and change any references to old_address into the new_address value?

  8. #8


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,692
    Thank Post
    352
    Thanked 797 Times in 716 Posts
    Rep Power
    347
    Was this the wwwroot in moodle's config.php?

    Is it all images? (even the moodle ones)

  9. #9

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241
    Quote Originally Posted by kmount View Post
    Was this the wwwroot in moodle's config.php?

    Is it all images? (even the moodle ones)

    Yes - the wwwroot used to be 217.23.224.4, but since making these latest changes it is now moodle . tanfieldschool . co . uk

    It's not the Moodle images or anything to do with the theme - just the images in forum items or news items etc.

  10. #10


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,692
    Thank Post
    352
    Thanked 797 Times in 716 Posts
    Rep Power
    347
    Ah, er, I'll have a quick nose through sql, hang on.

  11. #11

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,406
    Thank Post
    640
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    324
    This is exactly how we set things up here. Use proper resolvable hostnames for everything; configure the external record & IP appropriately, and give the internal IP to people on the LAN.

  12. #12


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,692
    Thank Post
    352
    Thanked 797 Times in 716 Posts
    Rep Power
    347
    It's possible, have a nose here.

  13. Thanks to kmount from:

    Hightower (15th September 2009)

  14. #13

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241
    That was exactly what I was looking for! Thanks Kim!

    My Moodle setup is complete (until the next time hehe)

SHARE:
+ Post New Thread

Similar Threads

  1. Moodle & Google Apps integration by Moodle Rooms - anyone using it?
    By morganw in forum Virtual Learning Platforms
    Replies: 4
    Last Post: 1st April 2011, 12:51 PM
  2. Moodle - Word template to create Moodle XML Quiz
    By lasercat in forum Virtual Learning Platforms
    Replies: 4
    Last Post: 25th October 2010, 12:19 PM
  3. Moodle Help!! :(
    By mmoseley in forum Virtual Learning Platforms
    Replies: 7
    Last Post: 15th June 2009, 04:03 PM
  4. Moodle
    By ticker in forum CLEO
    Replies: 3
    Last Post: 18th May 2009, 06:28 PM
  5. Moodle again
    By wesleyw in forum Virtual Learning Platforms
    Replies: 6
    Last Post: 24th May 2007, 03:31 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •