Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

been working on this for past 1 week now, no break.

So I have this local network with IP range 192.168.1.1 to 192.168.1.255

I have a apache server running on 192.168.1.90 on port 80

So I set up a NAT Virtual host in my router. Router setting

Then I restarted the router (NOTE: the settings remained unaltered after restart) and then tried to access by typing in my external IP 122.174.*.170 which I took from whatismyip.com

but the router itself is responding to the call, and the request is not getting routed to the server on my LAN.

Router responds

So what have I done wrong, and how can i fix it, totally confuses me.

share|improve this question
    
Are you on the network when you try to use the external IP address? –  Edwin Jan 7 '13 at 20:47
    
yes i am in the same local network as the server –  blas Jan 8 '13 at 7:46

1 Answer 1

up vote 0 down vote accepted

The response to a request sent from a machine on the network to the DNATed public IP (122.174.*.170) of a server on the network is dropped, because it comes back addressed from the internal address (192.168.1.90), an address that the machine did not make a request to. Some routers have a setting that would allow you to send all such traffic through the router to avoid this problem. A cheap router would probably not do it.

A work-around:

  • Setup separate DNS servers - one external, and one internal. The internal dns would point your domain name to 192.168.1.90. You can also just modify the host file on each internal machine.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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