Jump to content

Recommended Posts

Posted

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,

Posted

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,

Posted

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.

Posted
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?!

Posted

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*

Posted
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?

Posted

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?

Posted
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.

Posted
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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...