We help IT Professionals succeed at work.

resolve specific sub-domains to internal IP addresses

sfun28
sfun28 asked
on
270 Views
Last Modified: 2010-04-07
Hi Experts!  I have 2 dynamic dns host names that point to my router (dd-wrt).  Lets say:
sub1.domain.com  and sub2.domain.com
with port mapping, everything works fine with external calls to these hosts

internally, I'd like map these hosts to internal IP addresses.  so if a request goes out for a webservice that sits inside my firewall, I don't want the request to leave the router just to find out that it points back to the router.  I can think of a few ways to do this:
1. can i tell my router about sub1.domain.com... and tell it to always route those requests to the appropriate machines?
2. maybe I can tell each individual machine about sub1.domain.com... and specifcy which internal IPs to map each host to?

not sure what the right approach is nor even the right vocabulary about how to discuss this issue.
Comment
Watch Question

tigermattSite Reliability Engineer
CERTIFIED EXPERT
Most Valuable Expert 2011

Commented:
Much easier - if you have a DNS server in your network, just add the entries to that internal DNS server with the appropriate static IP addresses on the record. You may need to create a new DNS zone for domain.com if it does not yet exist.

Please post back if you need more information.

-tigermatt
Top Expert 2009
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Sorry...I failed to mention that I don't have a DNS server.  I just have a few computers behind a router/cable-modem.  The hosts file seems like a good solution.  Is there some config on the router (i'm using dd-wrt) that would accomplish the same task (so that I only have to update in one place)
Top Expert 2009

Commented:
Does it work as is, meaning, can you connect to the external IP via the router (U-Turn on the router)?  If that works, I would simply use that "feature" and not worry about it traversing the router.  The router won't be able to handle the hosts file configuration unfortunately so you will have to update it manually or push it to each PC via a script of some sort.

Author

Commented:
HI JFrederick29 - i'm not quite sure what you mean when you asked whether I can connect to the external IP via the router.  All of the machines behind the router can connect to sub1.domain.com, ...
With my webservices, i've noticed slow response time when using sub1.domain.com, but when I just use localhost, its super fast.  since I know, internally, that sub1, sub2, ... should point to specific internal IP addresses, I just want to configure that.  does this make sense?
Top Expert 2009

Commented:
Yeah, makes sense.  That is what I was asking.  I would go the hosts file route if you notice a performance difference.
tigermattSite Reliability Engineer
CERTIFIED EXPERT
Most Valuable Expert 2011
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Hi tigermatt,
That's a good observation...and its making wonder exactly what's causing the delays i'm seeing.  to be very specific, my web services are hosted as windows services using Windows Communication Foundation technology, part of the .net platform.  I've noticed that I get connection and data transfer timeouts when I use the full host name, but when i just localhost, everything runs smoothly.  so i'm not really sure where in the process things are getting held up.

in any case, i just wanted to throw that out there in case other people are experiencing the same thing and want to discuss.  otherwise, the hosts file seems like the way to go.
tigermattSite Reliability Engineer
CERTIFIED EXPERT
Most Valuable Expert 2011

Commented:
Hi sfun28, just wondered why I wasn't split some of the points?

Author

Commented:
oh...sorry, i didn't know you could do that.  the ultimate solution was the hosts file which JFrederick29 just proposed.  i'm happy to split points - how would I do that?  sorry for the trouble.

Author

Commented:
i mean to say "...which JFrederick29 first proposed"
tigermattSite Reliability Engineer
CERTIFIED EXPERT
Most Valuable Expert 2011

Commented:
It's up to you, but just thought that the info I posted on the routing side of it may have helped. If you like I can request this is reopened so you can reclose and split points?

Author

Commented:
yes please!

Author

Commented:
upping points, and splitting
tigermattSite Reliability Engineer
CERTIFIED EXPERT
Most Valuable Expert 2011

Commented:
sfun28, thanks a lot :-)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.