LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   access lan web server thru dual homed host / webserver from internet with one pub IP. (https://www.linuxquestions.org/questions/linux-networking-3/access-lan-web-server-thru-dual-homed-host-webserver-from-internet-with-one-pub-ip-469323/)

swilhelm 07-31-2006 05:54 AM

Route mysite.com/something Wan to Lan but Still have Wan answer mysite.com requests.
 
Hi, I want to route mysite.com/something from WAN apache sever to LAN apache server on windows xp box while mysite.com is still answered by wan server runing linux Cent os v4.3 (i.e. RHEL4).

i'm running a server on Cent os V4.3. with a single public ip address: 70.90.xxx.xx. This server acts as a Router, Firewall, Web Server, Mail Server, anything else you can think of server - you get the idea.

Here's what i'm trying to do:

1. you go to mywebsite.com and the cent os v4.3 server loads the Web Site on it's hard drive. This part works fine.

2. you go to mywebsite.com/something and the server loads a web site from an apache Web Server running on a lan windows xp client machine. This part does not work. let me explain:

Internal Client Machine is running windows xp with apache and mysql and php. it's address is 192.168.x.xxx. it gets it's address through the cent os v4.3 server which has two network cards one for public address (eth0 70.90.xxx.xx) and one for lan address 192.168.x.x. which then assigns ip address to client machine.

Thank you so much for any help,

Sammy

ps. sorry for bad english - trying to learn english and linux :study: :)

cs.cracker 07-31-2006 02:39 PM

I also want to do something similar. I currently have a free domain pointing to my internet IP, lets say subdomain.domain.net, and would like to make subomains of it or folders after it referring to other computers on my local network. For example:

subdomain.domain.net --> server
box1.subdomain.domain.net --> box 1
box2.subdomain.domain.net --> box 2

or

subdomain.domain.net --> server
subdomain.domain.net/box1 --> box 1
subdomain.domain.net/box2 --> box 2

My internal network is your typical private, routed network, like so:
Code:

                        Internet
                            |
                  (subdomain.domain.net)
                      Linksys Router
                      (192.168.x.1)
                            |
      ------------------------------------------------------
      |                |                |                |
(192.168.x.100)  (192.168.x.101)  (192.168.x.102)  (192.168.x.2)
    box1            box2              box3          server (DMZ)

Is this possible? My 'server' is currently running Trustix Secure Linux, and it is my DMZ host for my local network. I can install any server applications needed, be it DNS, routing, firewall, whatever.

swilhelm 08-02-2006 03:57 PM

Solved!
 
I just changed the port that apache is listening on and forward it through the router. So you just type in mydomain.com:1404 if you want to go to internal web server or just mydomain.com if you want to go to main web server.


Internet
----------
|
|
Server/firewall/web server port 80
---------------
|
|
\
\
\
Apache www port 1404


Thanks, For Your Help!

Sammy
-------------------------------------------------
I'd rather be judged by 12 than carried by 6


All times are GMT -5. The time now is 05:23 PM.