Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Servers, One IP

Status
Not open for further replies.

illdill

IS-IT--Management
Jul 13, 2005
31
US
I have a win2003 and a Redhat linux ES box, but ony one WAN IP address. This is not a multiple host issue, I drudged through that months ago. What I need to do is somehow have the windows box ( :80 ) forward dns requests to the Linux box ( :81 ) for certain domain names. Anyone got any ideas?

It would be nice also if the :81 didn't show up in the address bar.

Belive me, I would much rather just have another WAN IP, but in this case, it is just not possible.
 
Confused - what does the :80 and :81 mean? Are we talking port numbers, and if so, did you mean to say DNS, or HTTP?
 
Yes, :80 and :81 are the different server ports, not sure about the dns / http
 
Right now, register.com (or whoever) forwards it to my WAN IP, from there I need to redirect it to the right server.
 
So what you are saying is you have http (port80) requests going to your WAN address form the internet (Windows Box), and you want the request to actually end up using a web server running on port 81 on the Linux box?

What you do have between your LAN and the WAN? Is the Windows Box sitting directly on the internet or is there a Router in between?

Cheers,

Matt
 
Yes, Cable modem - Router configured to allow requests for http at ports 80 and 81
 
Does your router do port forwarding? If it doesn, you could have any request to hit the router forweard port 80 or 81 to the Linux box? Then any request that hits the port you forwarded will be passed throught the router to the chosen box.
 
Or if your router supports virtual servers any traffic on port 81 can be redirected to the Linux box, but :81 would have to show in the address bar.
 
I don't beleive my router supports virtual servers, and I havn't had any luck using host headers...
 
Yes, My router supports port forwarding, but the settings are very general, not speific enough to destinguish what goes where, only that port 80 and 81 are accesible to http requests.

It wants an IP, a port, and a service type (http), thats it...
 
My router is a netgear hardwired being fed by a netgear wireless G being fed by the cable modem.

The wireless G is simply acting as a switch with wireless access...

There are no connection issues here, both and will serve...
 
So... Register.com sends the request to my IP address, my router allows http on both ports :80 & :81, http requests automatiacly go to port :80 so my windows machine gets the request. From there I need to push the request to the linux machine running and configured to serve on port :81.
 
I found the answer.


It required be to change ports for the two servers so that the linux box served port :80

Then using <virtual host> tags

<VirtualHost 192.168.1.12>
UseCanonicalName off
ServerName ServerAlias example.com
DocumentRoot /usr/local/ </VirtualHost>

I was able to pass the request on to the windows box. Unfortunately it shows the :81 at the end of the url, but it is no longer required to get to the site. Hope this will help others with the same dilemma. Thanks for all your suggestions!
 
Any sites on the windows box with links to say will not resolve to because only the default will get forwarded to :81. What this means is that I cannot include the domain name in any links unless I also include the port :81. This realy isn't a big deal from this point on, but as far as all the links that do reference the domain, I had to go through and manualy change either by removing the domain reference in the link (defaults to current domain), or adding the :81 to the links for every site I am hosting. This wasn't too bad because FrontPage has a hyperlink utility that lets me change several links at once.

Also, the :81 does end up included in the address bar. And in order to get to any other page besides the default index, I would have to type in the :81 before the rest of the location.

I am wondering if I can use the all switch (*.*) in the Virtual Host header?

i.e.

<VirtualHost 192.168.0.12:80>
UseCanonicalName off
ServerName ServerAlias illdill.org/*.*
Redirect / <VirtualHost>
 
So, as far as I have gotten, there is no workaround for this so far. What I have come up with is just not good enough for a dependable system. I still say get another WAN IP, but for me, this is what I have to suffer with until I come up with something better, or afford the expensive NAT boxes that they sell to put in front of your network and resolve just about anything but string theory...

Peace and Good Luck!

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top