If you don't have NAT Reflection I would suggest something like this provided your set up matches what I described below .
Assuming you have the following setup:
Public IP: 201.206.x.y
Private IP: 192.168.0.50
Port forwarding for all 80 (and 443 if you're doing SSL) on IP 201.206.x.y → 192.168.0.50
You then type the following in your browser, while you're in your internal network:
http://www.yourwebsite.com
and the error occurs. So, solution: hack your hosts file.
On Windows, go to C:\windows\system32\drivers\etc\hosts (notice, there's no extension on that file). On Linux, the file is located in /etc/hosts.
If you open that file up in Notepad, you can then see any entries that are used to override DNS. If you wish to update that file, you will need to open Notepad (or whatever program you're using to edit the file) with Administrator rights – otherwise you can't save the file.
Add this to your hosts file:
192.168.0.50 http://www.yourwebsite.com
Then restart your browser, enter the URL and violà! It's working. So this means, your browser doesn't rely on your DNS to resolve your domain to the IP. Instead, we're overriding this and saying: Browser, just go to my internal IP for that domain name, instead of asking DNS for the IP address.
If you're in an office, then you can get all the people who need to access this internal website, to hack their hosts file, or if you have an internal DNS, then you can add an entry into that.
Another idea is to have an internal proxy server (for all web surfing, etc) and then hack the hosts file on the proxy server. This means your browser will say, Proxy, can you please get me the resource http://www.mywebsite.com and the proxy says Sure, and because I've been told to ignore DNS for that domain, I'll just give the IP which has been hard-coded in my hosts file.
Assuming you have the following setup:
Public IP: 201.206.x.y
Private IP: 192.168.0.50
Port forwarding for all 80 (and 443 if you're doing SSL) on IP 201.206.x.y → 192.168.0.50
You then type the following in your browser, while you're in your internal network:
http://www.yourwebsite.com
and the error occurs. So, solution: hack your hosts file.
On Windows, go to C:\windows\system32\drivers\etc\hosts (notice, there's no extension on that file). On Linux, the file is located in /etc/hosts.
If you open that file up in Notepad, you can then see any entries that are used to override DNS. If you wish to update that file, you will need to open Notepad (or whatever program you're using to edit the file) with Administrator rights – otherwise you can't save the file.
Add this to your hosts file:
192.168.0.50 http://www.yourwebsite.com
Then restart your browser, enter the URL and violà! It's working. So this means, your browser doesn't rely on your DNS to resolve your domain to the IP. Instead, we're overriding this and saying: Browser, just go to my internal IP for that domain name, instead of asking DNS for the IP address.
If you're in an office, then you can get all the people who need to access this internal website, to hack their hosts file, or if you have an internal DNS, then you can add an entry into that.
Another idea is to have an internal proxy server (for all web surfing, etc) and then hack the hosts file on the proxy server. This means your browser will say, Proxy, can you please get me the resource http://www.mywebsite.com and the proxy says Sure, and because I've been told to ignore DNS for that domain, I'll just give the IP which has been hard-coded in my hosts file.