I see there are many related questions to this one, however the answers given seem to be a little vague for a novice like me.
I've got a dedicated LAMP stack running Fedora 16 locally on my home network. Everything works fine internally. I can access the Apache server from other machines on the network using the internal IP in a browser. I'm using the stack for a local file server as well as a development environment for websites. There are a couple of reasons why I would like the development sites hosted on the machine to be available publicly.
1.) I use a CMS that has paid add-ons which allows you to assign the paid license to a domain. I can't develop with paid add-ons on the closed dev server.
2.) I would occasionally like for clients to be able to view the site dev at late stages before it goes live.
I have a domain (foo.com, and I want to point a ***sub***domain (dev.foo.com) to the local server. I know this is best accomplished with a Static IP, however my IP from my ISP is Dynamic and I don't think there is any way to change that.
From what I have read, services like ZoneEdit & DynDNS are supposed to be able to accomplish this, but I have tried both and found it very confusing.
Also the server is behind a router and I have also read that you need to set up DDNS(?) in your router, that many routers have presets for these services, and I've found that DynDNS is the only one my router seems to support.
Your idea is correct. What you can do is make dev.example.com a CNAME that points to your home network. You need to figure out how to use DynDNS (it's really trivial, sign up then enter the information into your router). After which you make the CNAME point to your DynDNS domain. Make sure to redirect port 80 and 443 if your web server is behind NAT.