I was playing with the settings on my modem/router (Motorola NVG510) last night and it seems I screwed something up. I was trying to make my local server available to the outside world. That is easy.Just go to the admin page of the device, then Firewall->NAT/Gaming and associate the HTTP service to the server.
The problem is that once online, the server can’t be access from within the network. That is, you cannot access the public IP from behind the NVG501. If you try to access it from anywhere else it will work, but not from behind the modem/router. It turns out the NVG501 doesn’t support NAT loopback, so you cannot access your own public IP. You can access the server from any device in the network via the private IP, but not via the public one.
Why is this a problem? Suppose you associate a domain name with your public IP. When you try to access that domain from within your network you will be unable to do that. In my case I was trying to make a wordpress site available to the whole world. This presented a problem because the site was set up using localhost/site/ as it’s URL, so somewhere in the wp database, that domain was set as the domain of the site. You cannot have two domain names on the same site, so the only option is to change the database value. This is easy. The problem comes when you want to continue working on the site.
Since the NVG510 does not support NAT loopback, you cannot access the site. If you cannot access the site, then you cannot work.
If you were hopping to find a solution to this problem on this post, sorry to disappoint you, but the only one I have for you is: buy a new, better router that supports NAT loopback. You might be able to get another one from your ISP, just give them a call and see if they are kind enough.
I was foolish enough to think there could be a way around this problem, so I started playing around with the settings. Most of what I did was just change settings here and there. I really know nothing about most of what I did, but I’m never afraid of fooling around with settings.
At some point I got the stupid idea of changing the settings for the public subnet. At around 3 am I decided to go to sleep. As far as I remember, the Internet connection was still working, but today when I woke up, it wasn’t. At some point it stopped working and I had no idea why.
I was able to connect to the NVG510, but there was no Internet service, although the status page said there was no problem with it. I went to check the settings that I had fooled around with last night. At first it asked me for the device password, which I input and got back an error. I verified the password, input it again, and got another error. This happened about 5 times. I decided to reset the device.
After restarting, I was able to input the password and get to the restricted parts of the device’s admin interface. The settings for the public subnet were all there, so I guessed that was the problem, and I decided to set them back as they initially where. When I tried to save the settings, the modem would just not respond. It was “loading”, and it would not submit the settings.
After much trying, I decided to reset the device again. This time I held the reset button for 10 seconds to make sure it would reset it’s settings. After this I was able to connect to the modem and the Internet service was once again working.
A few things worth noting: When I reset the device for the last time, the SSID has been reset to it’s original name, rather than the name I’d given it, so trying to connect to the usual network would not work. After some time the pc figured that out and connected to the original network on the device. Fortunatelly, the computer remembers all the networks it connects to, when one is not available, it tries the next one if in range. So the computer tried until it finally connected to the original network from when I first set the modem up. Also, in the public subnet, the option that says Primary DHCP Pool would remain marked as public. I think this was the reason for the problem.
My thoughts are that since the Primary DHCP Pool was set as public, the device tried to assigned the computer and other devices attached to it (the modem), a public ip from the range specified. This would prevent the router from properly redirecting traffic to the right device. This is just a guess, since I currently have really no idea what happened in reality.
If, unlike me, you do know something about this things, it would be nice if you could explain more about what you think happened.