Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
What is your question in one sentence? –  Hello71 Nov 8 '10 at 22:26
    
How can I configure my router to forward to my internal web server when accessed from within the network using the external IP address? –  Laramie Nov 9 '10 at 0:51

3 Answers 3

up vote 1 down vote accepted

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.

share|improve this answer
    
I'm tapped. I appreciate you saving me the time to try and achieve the impossible. –  Laramie Nov 9 '10 at 10:56

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.

share|improve this answer
    
I've picked through the settings of my NetGear WGT634U and can't find anywhere to configure NAT settings. Any ideas? –  Laramie Nov 9 '10 at 0:11
    
The simplest thing would be to add a second port on the router. Forward, say, 8080 or a regularly unused port to 80 on the internal server, then connect using that new port. It's a bit of trouble, but might work until you can figure out why the router isn't translating requests out and back in properly. I'd check with Google to see if there are any known issues with that model, use NAT as a keyword and see what comes up. I avoid NetGear in general, so I'm not entirely sure at the moment, but if you can't find anything, I can check around. :) –  ssube Nov 9 '10 at 4:31
    
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 Nov 9 '10 at 19:03

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|improve this answer
    
Not sure why I didn't do that first. +1 though I marked another answer as correct already. –  Laramie Nov 9 '10 at 19:04
    
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. –  Matt H Nov 9 '10 at 23:47

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.