PDA

View Full Version : Vhosts and NAT


hanta
2007-09-28, 05:17 PM CDT
I have my home "network" behind the NAT, router/adsl modem is Zyxel 660HW-D1.

Linux box is set with apache and multiple virtual hosts (name based). Now when I enter virtual host adress to browser, I get my router login page (when im inside my home network)...

Everythin works fine if I try this vhost adress outside from my home network. What is the problem, I have set router to forward all requests from port 80 to my server local ip.

I think this is more NAT/my router based problme than linux box because, everythig is working well if im outside my home network.

Any help, ideas??? :confused:

PilotJLR
2007-09-28, 08:02 PM CDT
Your router does not support loopback, which is why requests for the WAN ip address is instead being sent to the LAN interface of the router... hence the router login page.

The solution would be to either get a router that supports loopback, or make an entry in /etc/hosts for the domain name (to resolve to local address).

hanta
2007-09-29, 02:38 AM CDT
I find the way to set NAT loopback on... In telnet console type "ip nat loopback on"

In case if someone have similar problmes :)