Public IP address answered by router, not internal web server with Port Forwarding

8,003

Solution 1

Here's Netgear's page for your router: WGT634U 108 Mbps Wireless Storage Router.

You can click on the Documentation tab to download the manual. Unfortunately, the manual suggests LAN computers can't use the WAN IP address to access the LAN computer web server. See page 90:

Local PCs must access the local server using the PC's local LAN address. Attempts by local PCs to access the server using the external IP address will fail.

From the same product page, under the KB/FAQs tab, I found I am unable to access my web server via host name which explains a possible work around: Use the hosts file on your computer to map the external domain name to the LAN IP address.

Solution 2

This may, depending on your router, be related to NAT settings. I ran a server from behind a WRT54G for some time, and had to set up the NAT options so that connections would come into to the server instead of the router itself.

You may be able to use the dynamic DNS name, once the other settings are correct. I was able to, but it would time out on requests via the dynamic DNS before I enabled the NAT settings. Also, make sure your router's interface is closed to external requests and the port are set to always forward external requests.

Solution 3

Thats a very common problem actually. One option is to add a entry into your local hosts file for your "dynamic dns hostname". I assume your using a service like dyndns for that.

The hosts entry will look like

192.168.1.200 external_dns_name

That way your machine will resolve using the internal address. If it's a laptop and you might use it on another network and access your website you will want to remove that entry.

Alternatively, some routers (not many) have inbuilt DNS servers where you can specify an address for the internal name. That would be even better.

One other alternative is to use a static route in the router. But I haven't had too much success with these and it may end up disabling access to your router's web page.

Share:
8,003
Laramie
Author by

Laramie

Updated on September 17, 2022

Comments

  • Laramie
    Laramie over 1 year

    I have a WGT634U wireless router on my home network with a webserver at address 192.168.1.200. I have set up port forwarding so that calls to http://xxx.xxx.xxx.xxx (my public IP address) are answered by the web server internally at 192.168.1.200.

    The issue is that when I attempt a call to the public IP address from inside the 192.168.x.x network, the request is being answered by the web server on the router (192.168.1.1) so that I can log into it and manage it instead of forwarding me to 192.168.1.200.

    If I use the address of the web server directly at http://192.168.1.200, there's no problem, but I am testing a Web Application that calls to a public server then redirects the browser back to my public IP address (technically a dynamic dns hostname).

    I can use IP masking with a tool like Tor, but it is painfully slow and maintaining a session is error prone. I may only complete 1 of 5 requests, the whole process taking upwards of 20 minutes each time.

    • JJ_Australia
      JJ_Australia over 13 years
      What is your question in one sentence?
  • Laramie
    Laramie over 13 years
    I've picked through the settings of my NetGear WGT634U and can't find anywhere to configure NAT settings. Any ideas?
  • Laramie
    Laramie over 13 years
    I'm tapped. I appreciate you saving me the time to try and achieve the impossible.
  • Laramie
    Laramie over 13 years
    I had the same thought, but despite an upgrade to the router's firmware, it has a problem where it no longer saves its port forwarding settings anymore. I bet it would have worked with a functioning router though.
  • Laramie
    Laramie over 13 years
    Not sure why I didn't do that first. +1 though I marked another answer as correct already.
  • hookenz
    hookenz over 13 years
    You can always change what you feel the correct answer. You should probably do that if you feel mine is more appropriate so that others who read this use the best answer.
  • dashesy
    dashesy over 9 years
    I recently faced same issue on a Comcast router, my explanation is that this is a loopback and I guess routers are not smart enough to consider that traffic as both inbound and outbound so the rules will not kick in. Do you know of any other technical reason?