Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a FQDN let's say abc.com. with only one external IP and I use zoneedit.com ns servers.

I have configured www as a CNAME of abc.com. The web server is setup with IIS on local computer. What I want to do is to have a subdomain xyz of abc.com to be redirected to let's say 192.168.1.120 on local PC but to be accessible from web like http://xyz.abc.com/.

How do I make this work?

I tried to setup headers in IIS like for www.abc.com to port 80 192.168.104 (this is the IP for web server) and xyz.abc.com to port 80 192.168.120 (the other server which is NOT a web server).

share|improve this question
1  
I think you will need to configure IIS on the web server to forward requests for xyz.abc.com to the other computer: serverfault.com/q/47537/77238 –  William Jackson Oct 9 '12 at 14:30

3 Answers 3

Local addresses (like 192.168.*.*) aren't allowed on the Internet. They are managed by your local router and translated there.
If you only have one public IP then both subdomains will need to have that same IP. All traffic is not tagged as comming from a certain domain (HTTP-traffic almost always is though).

You can however use NAT forwarding. It is done by your router and forwards ports. You can forward traffic to port 80 to 192.168.1.104 and all other traffic to 192.168.1.120 but xyz.abc.com:80 and www.abc.com:80 will get resolved to your.public.IP.addresss:80 and your router won't be able to tell the difference.

share|improve this answer
    
Actually I've just made it work with the help of my router which has dd-wrt (v24sp2)on it. I added in DNSMasq following settings: address=/xyz.abc.com/192.168.1.122 ptr-record=122.1.168.192.in-addr.arpa,"xyz.abc.com" and I added '*' in CNAME on the DNS server(zoneedit.com) for the abc.com domain. For now it works on my local network but I needed to work from any public web browser. Remember I have only one public IP. Any suggestions? –  Misu DF Dec 28 '11 at 21:13
    
Yes, this works on the local network because you have a whole /16-subnet of IP addresses but on the other side of the NAT you have only one. –  micke Dec 28 '11 at 22:10
    
So the question is the same: how do I make it work? Do I need an internal DNS Server ? And if Yes how can I set it up? –  Misu DF Dec 29 '11 at 12:36

With Apache, you set up what are called Virtual Hosts. A web server will see the sub.domain being requested, and you can do with that request what you want at that point. A reverse proxy configuration can have that sub.domain request be sent to a different internal IP address.

I've only ever set this up on Apache, but I'm sure there is identical functionality in IIS. In any case Reverse Proxy is what you're looking for.

share|improve this answer

No, simply there is no way around it. You can do port redirect on to specific machines in your firewall but external DNS servers do not allow LAN IPs.

Why would you want to do it anyway?

Also, if you have no control over your WAN IP's PTR entries, there is nothing you can do.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.