New user, exhausted options, and reaching out for assistance!

Re: New user, exhausted options, and reaching out for assistance!

by Visvanath Ratnaweera -
Number of replies: 15
Picture of Particularly helpful Moodlers Picture of Translators
I don't think your immediate problem is a "Windows issue". More likely an misunderstanding of networking between the VMs and the host in desktop virtualization. If 192.xxx.xxx.xxx is the IP address of your office computer, obviously there is no web server running in it. You need get the VM connected to the same LAN as your home network. Somewhere in the virtual networking editor in VMware you set it to "bridged" and either give it a free IP address in your home network or just let it configure its network from the DHCP server in your home network (if there is one). Then set that IP address in config.php and try calling http://192.yyy.yyy.yyy in any computer in your home LAN.

But there is a "Windows issue" as far as LAMP and Moodle are concerned. You can go further than the mere private Moodle on Linux, for the simple reason that the majority of the active community here use Linux.
In reply to Visvanath Ratnaweera

Re: New user, exhausted options, and reaching out for assistance!

by Michael P -
Hello Visvanath - thank you for the information.

I would have to 100% agree with you on the misunderstanding of networking! haha!

Note: I am placing random numbers in pace of the 'xxx' to make it visually easier for discussion.

Here is a breakdown of the setup.

Office machine IP: 192.168.150.72
Windows 10 VM IP on Office machine: 192.168.142.63

Yes, bridged is pulling an available IP address from my home network with DHCP (default setup). I am not setting any static IP addresses.  In the Config.php file, I removed the “localhost” and entered "http://192.168.142.63/moodle" which is the IP address of the Windows 10 VM.  Is this correct or am I missing something?

Here are a few screenshots of the Network settings in VMware and config.php.

vm1vm1
config
In reply to Michael P

Re: New user, exhausted options, and reaching out for assistance!

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
OK. Definitely not a Moodle issue. Did you check whether your host (office machine) can ping the VM? 192.168.150.72 and 192.168.142.63 are in two IP networks, if you are following the proposed https://en.wikipedia.org/wiki/IP_address#Private_addresses.

The VirtualBox and Ubuntu VM line was explained in detail in an old series of posts https://moodle.org/mod/forum/discuss.php?d=199542. They are still valid, including the networking part.
In reply to Visvanath Ratnaweera

Re: New user, exhausted options, and reaching out for assistance!

by Michael P -
I just check the pings. The Office machine (192.168.150.72) is able to ping the Windows 10 VM on Office machine (192.168.142.63). The Windows 10 VM on Office machine (192.168.142.63) is also able to ping the Office machine (192.168.150.72).

I will check out the links you just sent.
In reply to Michael P

Re: New user, exhausted options, and reaching out for assistance!

by Ken Task -
Picture of Particularly helpful Moodlers

A ping is not checking port 80 ... it just test the NIC's to see if the NIC's are responding to 'shouts' at it.   Are ya there?   Yes! kinda thing.

Think what you might need to do is check the configuration of your home router and overall network setup.   Home router (should also be the gateway IP address of workstations on the private network.  BTW, there is no reason to obscure the IP addresses ... 192.168.x.x is a private IP class B block of IP addresses and are none routeable.   So show exactly what IP's you see.

How large is your office network?  How many printers/workstations/tablets/smartphones do you have on the office network? 

The ip addresses shared here indicate a range of IP addresses ... 192.168.142.x (which goes up to 254) and the other you've shared 192.168.150.x means there are 143.x, 144.x, 145.x, 146.x,147.x,148.x,149.x,and lastly a 150.x networks.    Subnetmask ... come into play.

In your home router ... which is not only the gateway, but the DHCP server for the private network ... there should be config of DHCP ... range of IP addresses to be used to dole out to any device that want's an IP address.  From what you've shared that range would have to be at least 192.168.142.0 -> 192.168.150.255 - that's 254 devices per block (so roughly X 8 ...ya got more IP addresses than you'll ever use!  

The thing about that is also the lease set in DHCP ... if lease is set forever ... never refresh ... a cell phone that connected to your private office network years ago could still have an entry in leased IP address ... which is done by matching the unique MAC address of the NIC of the device with an IP address DHCP server leased at the time.

Subnet mask changes things for IP addresses that can be used .... a 255.255.255.0 is a flat subnet mask ... where as a subnet mask of 255.255.254.0 means some IP addresses are used as gateway IP's and internal routing ... workstations/devices cannot use those gatway ip's.

So check your home router to get a true networking picture of your Office private net.

Definitely not a Moodle issue - but a network one for sure! smile

'SoS', Ken

In reply to Ken Task

Re: New user, exhausted options, and reaching out for assistance!

by Michael P -

@Visvanath – I tried the port forwarding that he did in the video and it didn’t work for me.

Greeting Ken! Thanks for hopping in to help. I really appreciate the in-depth response around networking.  I don’t know much about networking, so I had to look up the “classes” you mentioned.  I see there is Class A-E and we would be Class C of 192-223 with a subnet mask of 24.

I was always under the impression to never share my IP so that is why I obscured it!  I wasn’t aware it was not publically routable.

I would say my home network is medium?! I have multiple computers, smartphones, tablets, couple smart tvs, and smart players (like apple tv, roku, firestick, etc.). 

The way the house is setup and whatnot I encounter difficulties connecting to my network wirelessly from certain points. So, I setup a second router to help improve network performance and keep me connected from anywhere in my home.  My office and specific devices in it are connected to the second router.  To be clear, I followed guides on online in order to setup and configure my second router properly to make sure there were no interference!  😀

Please let me know if the below information helps to identify what the issue is. I really appreciate everyone’s help and would like to get this resolved!

Here is a break down with my real IP’s, subnet, and gateway:

Office Computer
IP: 192.168.1.3
Subnet: 255.255.255.0
Gateway: 192.168.1.1

Windows 10 VM
IP: 192.168.1.36
Subnet: 255.255.255.0
Gateway: 192.168.1.1

Below are some screenshots:

HOST IPCONFIG /ALL

hostipconfig


VM IPCONFIG /ALL

vmipconfig


VM VIRTUAL NETWORK EDITOR BRIDGE

vmvnebridge


VM VIRTUAL NETWORK EDITOR NAT

vmvnenat


In reply to Michael P

Re: New user, exhausted options, and reaching out for assistance!

by Ken Task -
Picture of Particularly helpful Moodlers

"I would say my home network is medium?" ... 'I have multiple ...

A Class C private IP (192.168.1 in your case) has 254 ip addresses that can be used.

Do you have 254 devices that can/will use TCP/IP?

Company that makes your router ... do they have a manual that came with it?  Can you download from internet a manual for it?    Do so.

From what you've shared ... looks like your home network is using 192.168.1. and all devices that pull an IP from your DHCP server will be in that range ... 192.168.1.2 through 192.168.1.254.

Office Computer - this is a workstation?
IP: 192.168.1.3
Subnet: 255.255.255.0
Gateway: 192.168.1.1

On the above computer install a network scanner.

https://nmap.org/download.html

Scan all of the 192.168.1.x network ... skipping 192.168.1.1 cause that's your router/dhcp server.

You probably will see that apple TV and know you will see roku devices.

Windows 10 VM -
IP: 192.168.1.36
Subnet: 255.255.255.0
Gateway: 192.168.1.1

command prompt screen shot
shows IPv4 to be 192.168.1.36
Is this the Ubuntu Guest OS on VM?

Dunno why/what the following is nor what it's purpose.
VM Virtual Network Bridge editor
shows 2 networks
192.168.18.0
192.168.119.0 (nat)

'SoS', Ken

In reply to Ken Task

Re: New user, exhausted options, and reaching out for assistance!

by Michael P -
No, I don’t have 254 devices. I do have a copy of the manual for the Linksys router in my office. Was there something in particular you wanted me to look for in it?

Correct – my network is using 192.168.1 (some wired and wireless connections). The office computer (IP: 192.168.1.3) is my main desktop computer or workstation. The guest OS (which is Windows 10 running on VMWARE) is IPv4: 192.168.1.36.

Thanks for the info on nmap. I downloaded the scanner (which has a GUI called Zenmap). I ran an intensive scan on my network and I do see the apple tv, roku, among other devices on my network. Is there something specific you want me to find in the results for you?

I’m not too show what the VM Virtual Network Bridge editor is, but since it had IPs, I figured I would include the screenshot!

Thanks again for your continued help. I really appreciate it.
In reply to Michael P

Re: New user, exhausted options, and reaching out for assistance!

by Ken Task -
Picture of Particularly helpful Moodlers

Linksys ... yes download the manual.   No I'm not looking for anything in the manual ... that was for you.   It's your home network.   It's your router, etc.

Be a good idea to check that your Linksys is a model that is still secure ... older models shouldn't be used any more.   Use internet ... don't ask me.

The scanner is also for your use ... and network understanding.

Focus is moodle ... where to put the moodle so you can access it from any device on your private network ... which is 192.168.1.0 -> 192.168.1.255.

The guest OS (which is Windows 10 running on VMWARE) is IPv4: 192.168.1.36.

Think you might mean Windows 10 (host) which has VMWare installed and it's ip ... the Windows 10 ... is 192.168.1.36.

VMWare or VirtualBox?

And in VMWare/VirtualBox you have a guest OS Ubuntu?  That's where your moodle will go.

'SoS', Ken



In reply to Ken Task

Re: New user, exhausted options, and reaching out for assistance!

by Michael P -

I think I may have used some wrong terminology which might have caused some confusion.

To make sure we are on the same page, my office computer/workstation is Windows 10.  I have VMware Workstation Pro 15.5 installed on it.  I spun up a guest virtual machine of Windows 10, which I then installed Moodle. 

 For the purpose of Moodle, I do not have any Linux OS (Ubuntu, CentOS, etc) associated with it.  If the problem was/is running Moodle on a Windows 10 virtual machine, then I have no problem spinning up a Ubuntu virtual machine.

Office PC
OS:
Windows 10
IP: 192.168.1.3
Subnet: 255.255.255.0
Gateway: 192.168.1.1

Virtual Machine with Moodle Installed
OS:
Windows 10
IP: 192.168.1.36
Subnet: 255.255.255.0
Gateway: 192.168.1.1

I hope this helps clears up any miscommunication I may have caused!

Below is a screenshot of Moodle running in a Windows 10 virtual machine.

vmware os
In reply to Michael P

Re: New user, exhausted options, and reaching out for assistance!

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Change the line $CFG->wwwroot = 'http://localhost' in your moodle/config.php to 'http://192.168.1.36'.
In reply to Visvanath Ratnaweera

Re: New user, exhausted options, and reaching out for assistance!

by Michael P -
That worked! Thank you very much! I swear, it feels like I did that before, but it didn't work. Anyways, it is fixed!
In reply to Michael P

Re: New user, exhausted options, and reaching out for assistance!

by Ken Task -
Picture of Particularly helpful Moodlers

Now run search and replace .... everything you've done/developed so far in the moodle has internal links held in the tables of the db for localhost.   Search for 'http://localhost/ replace with 'http://ipaddress/'.

Be fore warned ... if ip address isn't static and dhcp recycles ... server might get a different IP upon recycle ... depending upon the time of the lease settings in dhcp.

Ya got plenty of IP addresses one could use ... consider setting in guest OS a static IP ... a high one .... like 192.168.1.250 ... way above any IP in the scope of the dhcp leasing.

My 2 cents, of course.

'SoS', Ken

Average of ratings: Useful (1)
In reply to Michael P

Re: New user, exhausted options, and reaching out for assistance!

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You are deep in a networking issue.

If your purpose is to have a Moodle installation for you alone to access from various devices, all these complications are unnecessary. On top of that, keep you desktop computer running for this purpose is also a waste of energy. Get yourself a Raspberry Pi and stick a MoodleBox SD card into it. You'll have a Moodle on its own Wi-Fi - and portable one! And as a side-product you'll be exposed to (if you want to) Linux, which you seem to be avoiding.
In reply to Visvanath Ratnaweera

Re: New user, exhausted options, and reaching out for assistance!

by Michael P -
Thank you for the information - I will have to look into Raspberry Pi and MoodleBox! I would like to get this networking issue resolved just so I know what I am doing wrong. But you might be right, that it is too deep into a networking issue that it might not be worth it. I will give this another day or two. If I end up using MoodleBox in a Paspberry Pi, is there an easy way to transfer any content or quizzes I created from Windows Moodle to Linux Moodle?

I am not avoiding Linux, I already had the Windows virtual machine installed to play around with VMware and figured I would use it to help my studies with Moodle.
In reply to Michael P

Re: New user, exhausted options, and reaching out for assistance!

by Ken Task -
Picture of Particularly helpful Moodlers

I, for one, do not think knowing how the home network is set up is a waist of time ... quite the opposite depending upon proximity to 'neighbors' and 'streets'. 

From time to time hackers publish routers (models) with known (still active) default logins/passwords for such home equipment like old Linksys.   It was/might be possible a hacker could access the router remotely, set up hacker access to the home network, and work on hacking internal devices or at least sniffing traffic to acquire login/password or hijack traffic to things like banks, etc.  

Home networks are notorious for ops setting up shares, etc. wide open (ease of use).

Quick story ... where I live now, years ago a wireless scanner found only one neighbor with wireless that my network could see.  Today there are at least 15.  It is not unusual for someone in a car to stop along the street for a while ... hmmm, checking their driving directions to a location ... or scanning to see what they can get into.

Goal/Choice is OPS, of course.

'SoS', Ken