LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Gateway problem (https://www.linuxquestions.org/questions/linux-networking-3/gateway-problem-84581/)

Xiat 08-22-2003 12:43 PM

Gateway problem
 
I've setup a box running an Apache server for web pages. I've gotten the box and server up as well as MySQL and PHP.

The box is setup on an intranet with a linux box acting as a gateway for all traffic. I've setup the gateway to forward all port 80 requests to the webserver box I've setup.

This allows everyone out on the internet to see the server but I can't see it from inside. I don't want to have use the local IP address to see it because that limits what I can install and do with the web (phpBB, etc.)

How do I make it so the machines on the intranet can see the server through the same gateway as everyone else sees it?

david_ross 08-22-2003 12:50 PM

The easiest way is to create a hosts entry on each pc in your lan that pionts you your internal ip address. eg - put this in the host files:
192.168.1.1 www.yourhost.com

Assuming that 192.168.1.1 is the internal IP of the server and your domain is www.yourhost.com

Xiat 08-22-2003 12:57 PM

Well therein lies he problem.

The web page is currently hosted externally. My intent with this was to change the external site to forward all requests to the gateway IP address and run the web page through here. So there is no domain associated with the internal server. All I have is the IP address of the gateway that is forwarding port 80 requests.

So basically the hosts would have to define the external IP to be the internal IP on the network computers. Is that possible?

david_ross 08-22-2003 03:19 PM

No it isn;t. If you only want to use the external ip with no hostnames then you will need to check if your router/firewall supports loopback natting.


All times are GMT -5. The time now is 07:52 AM.