I am running an Apache 2.4 server in Ubuntu 14.04. MY DSL modem is connected to TP Link router. Thus, my system is connected to interent through wifi.
ifconfig provides the local ip aaa.aaa.a.aaa. The default gateway to login into the router's settings is 192.168.0.1 .
My aim is to send and receive files from an android device to the Apache server from a network outside the router's. Thus, following some tutorials, I set the port forwarding at port 80 with the ip as aaa.aaa.a.aaa.
The WAN ip displayed at the router settings page is bbb.bbb.b.b, while the public ip obtained by googling what is my ip is ccc.ccc.ccc.ccc .
I edited my /etc/hosts file to include the ip bbb.bbb.b.b with the site name along side. After this setting, I was able to access the server within my LAN sonnection, (i.e.) connecting my android device to the same router.
Now, I changed the ip in /etc/hosts file to ccc.ccc.ccc.ccc and when I try the same from a network outside the router's connection, it doesn't work. Can you please point me towards the right direction to make it work from network outside the LAN.?
My doubts lie along these lines:
- Is this a problem, because the modem and router are 2 different devices?
- Earlier, I had a Supernet Infocomm Modem, that served as the router as well, and when I tried the same with that, it worked for even networks outside the connection. Currently I have changed my work station and I want to set it up here as well, but am facing the issue as stated.