1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Forward subdomains

Discussion in 'DD-WRT Firmware' started by karlgo, Mar 4, 2006.

  1. karlgo

    karlgo Network Guru Member

    Is there a way using DD-WRT to do the following?

    I would like to forward requests from the Internet to a different server based on subdomain.

    For example:
    Port 80 - www.domain.com -> is forwarded to serverA
    Port 80 - www.subdomain.domain.com -> is forwarded to serverB

    Is this possible? If so can you point me in the direction on how this can be accomplished.

    Thank you in advance,

    Karlg
     
  2. jlowery7

    jlowery7 Network Guru Member

    Im not a networking genious, so I can't say I know this for a fact, but I'm pretty sure that you cant forward the same port to more than one ip. You can however set up the two different servers to use different ports for the webserver service, then forward those ports. In fact, you only have to have one domain name, and if you set it up right, the person on the internet would only have to use www.domainname.com:[port#] to get to the appropriate server.
     
  3. karlgo

    karlgo Network Guru Member

    Thank you for the reply.

    I have been doing this for IIS to various virtual sites and other IP services and works great in DD-WRT.

    The issue I have is a device that has the web port, 80, hard coded and can't be changed. I would like to have a subdomain point to this device and continue to use my other services as is.

    device.domain.com:80 is directed to special device
    www.domain.com:80 is directed to existing IIS web server

    Hopefully that clarifies things more.
     
  4. jgutz20

    jgutz20 Network Guru Member

    yes you can do that forwarding, i do it with my personal address, i have them forward the subdomain to my own server i have setup.
     
  5. jlowery7

    jlowery7 Network Guru Member

    OK , i did a little more research. The only way that seems possible is to use a DDNS service that offers a forwarding service. Your users can type in domainname.com and it'll be forwarded to the domainname.com:port that you specify. Of course, you'll have to change the port # on your IIS server.
     
  6. karlgo

    karlgo Network Guru Member

    Thank you for the additional information.

    I tried configuring port forwarding on DD-WRT to the following:

    Port from IP Port to
    www 80,TCP 10.0.0.5 80
    OddDevice 88,TCP 10.0.0.6 80

    yes I have double checked that it is enabled

    Does not work.

    The OddDevice only works if port 80 externally is forwarded.

    Thank you again for the help

    Karl
     
  7. ionn

    ionn Network Guru Member

    It is not possible to do that kind of forwarding only on an IP level. The hostname is a part of the HTTP request, and you need something that can understand that protocol.

    The setup above should work, provided the example port forwarding setup is correct.
    Another solution is to set up a virtual host for the subdomain on server A, and have that fetch the data from server B and send it back to the client.
     

Share This Page