Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I port forward two TLD's to two separate nodes on my network. I've seem to have forgotten how to accomplish this.

share|improve this question

closed as not a real question by mailq, John Gardeniers, Ward, RobM, Iain Nov 2 '11 at 9:00

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Your question doesn't make sense. It doesn't mean anything to "forward" a "TLD". Are you talking about HTTP requests? Are you talking about DNS? It's really hard to figure out what you're asking. Do the machines you are forwarding to have public IP addresses? Are you doing the forwarding on a UNIX machine? – David Schwartz Nov 1 '11 at 23:56
Let me reword this. I have TLD's pointing to my public IP. I need to point each one of those TLD's to two private IP's on my network. It matters not which one points to which. I just need to be able access both computers over the spectrum. How do I accomplish this on a Windows machine or a D-Link router? – Michael Grigsby Nov 2 '11 at 0:07
Are you talking about forwarding HTTP traffic? If so, you need a reverse proxy. – David Schwartz Nov 2 '11 at 0:12
You can't. The router doing the NAT doesn't care what DNS resolution process took place on a client for that client to start sending data to the public IP, so would have no way of knowing which private IP to send it to. What protocol are you talking about forwarding? Which port? edit if it's HTTP, David's right - a reverse proxy would accomplish this. – growse Nov 2 '11 at 0:14
@David Put that in an answer – TheLQ Nov 2 '11 at 0:20

If you're talking about forwarding HTTP traffic (web requests), you need to run a reverse proxy. If you're talking about almost any other protocol, there's no way to do it.

For most protocols, the client uses the domain name to figure out what IP address to connect to and doesn't do anything else with it. So unless the two domain names point to different IP addresses, there is no way to tell which one the client was asking about. HTTP is an exception, because it has a 'Host' header that tells you what name the client originally attempted to connect to.

share|improve this answer
Yep, it's HTTP. I've got an Apache server on each node. So how would I accomplish this? – Michael Grigsby Nov 2 '11 at 1:26
Apache can do it with the ProxyPass option. Use it inside a Location directive. – David Schwartz Nov 2 '11 at 1:28
Okay cool thanks man! – Michael Grigsby Nov 2 '11 at 1:30

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