My computer is behind NAT so it uses 192.168.1.6 as its IP address.
I have apache2 installed and working.
While sitting at my computer, I can browse my local website by going to http://192.168.1.6.
I also have port forwarding setup and working on my router. So my friends can browse my website by going to my external IP address http://219.x.x.x (for example).
So we each need to use different IP addresses to browse the website. This is OK, however it makes it difficult to test functions like RSS feeds for example where I need to specify the full URL of the website, which is different for me and the external people.
What I would like to do is be able to browse my local website while sitting at my computer by using the external IP address.
Currently, if I try to browse using my external IP address http://219.x.x.x, I end up at my router's login page. It seems the router redirects the external IP to it's login page when it's accessed from inside the network.
I tried adding a forward from the external IP to the internal IP in /etc/hosts but that didn't work. (I guess because /etc/hosts only maps domain names to IP addresses - not IP addresses to other IP addresses)
Is there a way to forward/redirect/map an external IP address to localhost? Instead of actually sending traffic to the external IP address, I'd like to just redirect it to my localhost.
Bookmarks