This forum is no longer active. Please post your questions to our new community site

Forums Moodle

Access Moodle from external public machine

Subscribe to Access Moodle from external public machine 10 post(s), 2 voice(s)

Avatar q-prof 9 post(s)

(Beltrán), our last conversation from…
It has been a while, as I have had to put this aside, but now back on it.

I tried what you suggested:
Go to the virtual machine console and run the following command “sudo /opt/bitnami/updatip —machine_hostname your_domain_name”

As you know, I am running this under Vmware 4.01 and Moodle (Bitnami Virtual Machine install)is running fine and accessible from with-in my network. I understand that I need to put my domain name into Moodle somehow, and I tried the command you suggested above with:
“sudo /opt/bitnami/updatip MoodleV2”
- MoodleV2 as named in Vmware… or should this be the actual local ip address?
- setup through as a hostname with mail server and web server selected as what it will be used for, added onto my main domain (is this sound alright?)
anyway after it asks me for my bitnami password, I get:
“sudo /opt/bitnami/updatip: command not found”

As I am new with this could you give me some more details or is there something else I need to do. Can I not just make these settings logging into Moodle locally in one of the administration setting links and do it there also?

I have setup with, also takes me to the welcome bitnami page. I have forwarded my port on my firewall and that works or I would not be getting the Bitnami page from an external/public machine.

Avatar Beltrán Rueda Administrator 3,714 post(s)


I would add the following in your “/etc/hosts” file:


Where 192.168.1.XXX is the machine IP address in your LAN. This is to be accesssible from your local network.

Then change the application IP:

$ sudo /opt/bitnami/updateip

This command only changes the hostname in the “/opt/bitnami/apps/moodle/htdocs/config.php”. If it does not work, replace the IP with your DynDNS name in this file manually. Then move the “updateip” tool to another folder to not ot change the IP once you reboot the machine.

Please post if you find any issue and I’ll be glad to help you.

Avatar q-prof 9 post(s)

Ok, host file edited with 192.168.1.XXX with XXX being the local static IP address as assigned by my Firewall as it is outside of my normal dynamic addressing and is confirmed by the mac address assigned by Vmware for this virtual machine when it was created.

I entered your suggested command:
bitnami@linux:~$ sudo /opt/bitnami/updateip (this is what followed, below)
[sudo] password for bitnami: (entered it)
There has been an error.
Expected optionbut got “”. Options start with a leading “—” prefix
Use —help to get a list of valid options

So does this mean it worked, but was looking for an option entered with the command?

At this point I can still enter in my local browser and it takes me to Moodle where I can then log-in.
I then tried it from an online proxy server and through a remote controlled external computer and got the following error text:

Skip to main content
Incorrect access detected, this server may be accessed only through “http://192.168.1.XXX:80/moodle” address, sorry.
Please notify server administrator.

So I guess it did not work. :-(
Meaning I should try to manually replace the IP with my DynDNS name in the “/opt/bitnami/apps/moodle/htdocs/config.php” as you mentioned and then move the updateip tool to another folder…..

Sorry, I am not sure how to manually rename, nor move updateip tool in the virtual console – I am not a linux line command guy, although I have done some dos commands in the past… suggestions on how this is done would help.
Also, not sure what “…folder to not ot change the IP…” from your last paragraph? Was it a typo “ot” as this sounded important.. not sure what exactly you meant there?

Avatar q-prof 9 post(s)

Accidentally posted my address in my last message… can you edit that out, probably not a good idea to leave in the post, as I don’t have any editing ability. Thanks in advance.

Avatar Beltrán Rueda Administrator 3,714 post(s)

Sorry, the correct command is:

$ sudo updateip —machine_hostname YOUR_DOMAIN

To move the “updateip” tool you can use the following

$ sudo mv /opt/bitnami/updateip /home/bitnami

Avatar q-prof 9 post(s)

Ok, I realized that I had to add the directory of where the updateip tool is to the command, so the command actually should be:
sudo /opt/bitnami/updateip —192.168.1.XXX
but I get an error message:

There has been an error.
Unknown option: —192.168.1.XXX
Use —help to get a list of valid options

(where XXX is the local address of the Moodle server)
So I must be putting in the wrong info in for “machine_hostname” or is it something else?

Avatar q-prof 9 post(s)

Oh, I also tried accessing the —help, but I get a lot of info all at once seeing only the last screen and not sure what the option/switch command is used to view a screen/page at a time – as this might have helped me.

Avatar Beltrán Rueda Administrator 3,714 post(s)

The exact commands that you should run is the following:

$ sudo updateip —machine_hostname
$ sudo mv updateip /home/bitnami/

I hope it helps.

Avatar q-prof 9 post(s)

That helped big time :-)
Because of the directory structure of the bitnami install and the location of updateip file/tool, what worked for me was:
$ sudo /opt/bitnami/updateip —machine_hostname
$ sudo mv /opt/bitnami/updateip /home/bitnami/

Now I can log-in from external/public machines, and I can now start using this with my classes. I assume that if I were to use another computer with-in my LAN, that I will have to modify the host file also.

I take it that there is nothing else that needs to be done on the console, and the rest of the configurations, settings, and set-up are all on the web interface right?

Thanks for your support, patience, and expertise Beltran

Avatar Beltrán Rueda Administrator 3,714 post(s)

I’m glad to hear this! Enjoy!

Forums Moodle