LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DynDNS, Linksys WRT54G, & subdomains? (https://www.linuxquestions.org/questions/linux-networking-3/dyndns-linksys-wrt54g-and-subdomains-124802/)

datadriven 12-11-2003 12:53 AM

DynDNS, Linksys WRT54G, & subdomains?
 
I managed to get dynDNS working with my router to point to one of the machines on my network using port forwarding. I have several webservers on various machines in my office. Is there a way to set it up to use subdomains to point to all the machines on my network?

e.g.

ws.whatever.dyndns.com might point to my workstation and
laptop.whatever.dyndns.com would point to my laptop.

#note whatever.dyndns.com is NOT my address.

zaphodiv 12-11-2003 06:57 PM

>linksys WRT54G
Have you read this?

>Is there a way to set it up to use subdomains to point to all the machines on my network?

The router will only have one internet ip address

Either

1)get your ISP to give you more ip addresses so you can have the subdomains
pointed to different domains. Your ISP may not want to give you more addresses. I don't know if the linksys will support multiple ip's, setting static routing entrys to direct packet's in and out might or might not work.

2)Point all the subdomains at your internet ip. Forward port 80 to a webserver. Configure virtual hosts on the webserver and have it proxy the requests to the internal webservers. I think apache supports this.
The HTTP1.1 protocol allows multiple domains on one ip by sending the full URL including the domain in the request.

datadriven 12-11-2003 08:08 PM

I'm using slackware 9.1 on all my linux machines.

So I need to edit the httpd.conf on the server machine I have the router forwarding requests to. I will try that. I was wondering if there was something to be done in the routeradministration section.

zaphodiv 12-11-2003 08:20 PM

>So I need to edit the httpd.conf on the server machine
>I have the router forwarding requests to.

and get your DNS configred so that the subdomains exist.

datadriven 12-11-2003 08:24 PM

Is there a good resource on the web where I can read/learn how to do this correctly?

zaphodiv 12-11-2003 08:41 PM

To get the DNS configured, you are using dynDNS so their webpage would be a good place to start .

To configure apache, google or the apache homepage.

datadriven 12-11-2003 09:41 PM

I think I'm on the right track but now quite there. Names have been changed to protect the not so innocent. Wildcard is on at dyndns.org. Exerpts from httpd.conf files from both machines.

#httpd.conf machine router points to

# lots of stuff omitted above here
NameVirtualHost *

<VirtualHost *>
DocumentRoot /var/www/htdocs
ServerName whatever.dyndns.org
</VirtualHost>

<VirtualHost *>
ServerName machine2.whatever.dyndns.org
Redirect / http://192.168.1.104/
</VirtualHost>

#the machine with internal IP 192.168.0.4
NameVirtualHost *

<VirtualHost *>
DocumentRoot /var/www/htdocs
ServerName machine2.whatever.dyndns.org
</VirtualHost>

It will redirect machine2.whatever.dyndns.org to the right machine, but once I click a link then I will get a 192.168.1.104 url.


All times are GMT -5. The time now is 05:18 PM.