I have an ip like username.dyndns.org, this is the external IP of my router. On my lan, I have several machine (m1, m2, ...) , each running a dedicated web server. Is it possible to reach each machine from the outside with something like: http://m1.username.dyndns.org http://m2.username.dyndns.org ? Do you know what needs to be configured in my router for NAT ? Also, is there a special directive in Apache to do so ? Thanks a lot, Regards, Luc
Yes, it's possible. Just add a ruleset to the NAT table on your router that points to the IP of webserver using port 80. There is also a section on the router which you can define your dyndns redirection to refresh your IP every 30 mins.
Syuuske has the networking right.
To make many domains answer on one ip address you'll need to setup a proxy for your other machines.
If you were to use apache for this, create a name based virtual host for each domain you want apache to answer for and use mod_proxy to forward requests on to the correct machine.
http://httpd.apache.org/docs/2.1/vhosts/name-based.html
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
Some residential hosting companies in the states (suddenlink and time warner) block inbound traffic on port 80, so if you can't get it working on 80, try another port.
Good luck.
Here is what you need to do to get what you want:
Setup dyndns to create a wildcard (*) CNAME for your domain. I beleive this requires their pro version. This will cause dyndns to resolve anything.username.dyndns.org to your router's public IP. Since my Comcast IP rarely changes, I don't use dyndns, but rather directly edit the DNS entries via my domain registrar (godaddy) which is free with domain name purchase.
Setup your router to forward ALL port 80 traffic to a single machine/VM running Apache. This is where all of your virtual hosts are defined. Within each virtualhost section, set up a proxy to the actual machine that handles that subdomain