+ override any DNS names that actually exist out on the internet.
+ Further, we have found it most effective to have *only* the cakelampvm as
+ your DNS server, because a secondary DNS server can "take over" providing
+ the name lookups, and thus foul up DNS requests that should succeed for
+ your VM-hosted sites.</p>
+ <p>If your Host PC is running Windows, see the DNS configuration section
+ below that is tailored to that operating system.</p>
+ <p>Important Note: It behooves you to remember to switch back to a normal
+ DNS server configuration when you shut off the cakelampvm, or your machine
+ will not know the names of any sites on the internet any more! The
+ official Google DNS servers are 8.8.8.8 and 8.8.4.4.</p>
+ <p>Once the DNS server is properly set up (by whatever means necessary),
+ these ping commands should get answering responses (from 10.28.42.20) on
+ both the cakelampvm VM and on your host PC. Note: ping on Linux
+ keeps going forever, so hit control-C when you are tired of seeing the
+ pings:</p>
+ <pre><span style="font-weight: bold;">ping cakelampvm.com</span></pre>
+ <span style="font-weight: bold;"> </span>
+ <pre><span style="font-weight: bold;">ping www.cakelampvm.com</span></pre>
+ <p>Note that any other answer than 10.28.42.20 for the address is *bzzzt*
+ wrong, and means something needs to be fixed.</p>
+ <p>If these pings succeed (which hopefully they will!), then try accessing
+ the websites of each domain:</p>
+ <pre>(browse to) <a target="_blank" title="vm website if dns working" href="http://cakelampvm.com">http://cakelampvm.com</a></pre>
+ <pre>(browse to) <a target="_blank" title="mapsdemo app, hopefully functional"
+href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
+ <p>These should show local sites on the VM rather than sites on the
+ internet. If you instead get failures to find the domains, or if the
+ "real internet" site comes up for cakelampvm.com (the page covered with
+ red X marks and complaining), then the DNS is not hooked up properly yet.</p>
+ <h4>Setting up DNS on Windows<a id="#windoze-dns" name="#windoze-dns"></a></h4>
+ <p>The ipconfig tool will provide helpful information about your current
+ networking and DNS configuration:</p>
+ <pre>> ipconfig /all</pre>
+ <p>The DNS configuration on Windows is somewhat byzantine. The pipe
+ characters ('|') below are used to separate the menus or tabs or dialogs
+ to traverse. Follow this path to get to the DNS config:</p>
+ <pre>Control Panel | Network & Internet | Network & Sharing | click WiFI or Ethernet link near top right | click Adapter Settings button...<br> | click on the specific network device to modify | select Properties</pre>
+ <p>Once the properties dialog is displayed, find "internet protocol version
+ 4" in the list and double click it.</p>
+ <p>Change the DNS setting from "obtain...automatically" to "use the
+ following dns addresses".</p>
+ <p>Enter 10.28.42.20 as the first DNS address and clear the second address
+ (all blanks).</p>
+ <p>Hit okay, then okay, then close, etc to back out of adapter
+ configuration.</p>
+ <h4>Troubleshooting the DNS</h4>
+ <p>If your pings are getting the wrong answers and you're certain the DNS
+ settings on your Host PC are right, then you may need to flush your DNS
+ cache, and that might be sufficient to start getting the right IP
+ address. On Windows, the command for flushing DNS is:</p>
+ <pre>> ipconfig /flushdns</pre>
+ <p>and on Linux the flush DNS command can be many different things, but try
+ these two most common options:</p>
+ <pre><span style="font-weight: bold;"># restarts the client side DNS cache.<br>sudo service dns-clean restart</span></pre>
+ <p>or</p>
+ <pre><span style="font-weight: bold;"># restarts the nscd caching server.<br>sudo service nscd restart</span></pre>
+ After, this try the pings again. If they still fail, please go back
+ over your DNS configuration very carefully. The cakelampvm's DNS
+ feature *does* actually work, but operating systems sometimes do their best
+ to deny this.<br>
+ <h4>Host Key Issues for ssh</h4>
+ <p>There is one caveat to be aware of when connecting to the cakelampvm.com
+ domain. If you have accidentally added the "real" cakelampvm.com
+ domain from the internet to your ssh known_keys at some point, then ssh
+ will complain about connecting to the VM on the cakelampvm.com
+ domain. This complaint will look like:</p>
+ <pre>The authenticity of host 'cakelampvm.com (104.236.56.82)' can't be established.</pre>
+ <p>Note that the IP address shown is not our beloved 10.28.42.20 local IP
+ address.</p>
+ <p>To fix this, remove the entry pointing at the "real" site from the
+ known_hosts file (ssh will print out the line number of the offending
+ entry). The DNS configuration needs to be configured before you will
+ get the warning about the cakelampvm.com domain. Up until then, the
+ domain name is always referring to the site out on the internet with the
+ red X's and warnings. See the DNS configuration section below to
+ configure DNS the first time.</p>
+ <p>Once you connect to the VM and the ssh client records the VM's host key
+ in your known_hosts, then you're in good shape. This state also
+ gives you a "canary in a coal mine" warning system... Once the VM is
+ registered as a known host, then any attempt to connect back to the "real"
+ internet version of cakelampvm.com will garner a complaint from ssh.
+ This version of the ssh warning should be heeded; you do not want to
+ connect to the real internet site, and the warning indicates that the host
+ PC is no longer using the DNS on the VM (since it reached the real
+ internet site instead of the VM). That situation needs to be
+ corrected by running through the DNS configuration section again (and
+ testing the DNS until it is working).</p>
+ <h4>Troubleshooting the Apache Sites</h4>
+ <p>If your DNS pings and lookups are functioning properly, but you're just
+ not getting the right websites, then try clearing your browser's cache and
+ shutting the browser application down. Then, start the browser up
+ and try the address again. Often this cache dumping is enough to fix
+ the browser so that you start seeing the local website versions on
+ cakelampvm.com.</p>
+ <h2>Editing files on the guest VM from the host<a id="#editing-files-on-vm"
+ name="#editing-files-on-vm"></a></h2>