I am sure that this question has been asked over and over again throughout the internet, but I still need some advice on this issue, as I am not very familiar with all these networking thingy.
I am setting up a server using Apache running under Debian, and also a FTP service using ProFTPD under the same platform. Assuming that the internal IP of my server is 192.168.1.123, and is a static IP. As for the external IP, it is a dynamic IP, so I have set up a DDNS domain with all those updater working, and say www.example.com maps to my home IP.
So, what I want is, when I enter www.example.com in my web browser, it will show up the web page hosted in my server, can access my FTP using ftp://www.example.com.
My questions are:
1) Am I doing right to forward port 80 and 21 to 192.168.1.123? If not, what are the correct things to do?
2) If I am right, I get the following message after forwarding port 80 (I get the similar message when forwarding port 21):
Since port 80 is used, the DSL Modem Router WEB server port for your remote access will be moved to 8080.
When I enter www.example.com into my web browser, it leads me to my router set up page. When I enter www.example.com:8080, the browser complains that it could not connect to the server.
So I changed my server Apache setting to listen to port 8080, and forward port 8080. Again, when I try to access www.example.com:8080 from my home network, it complains that it could not connect to the server. However, when I access www.example.com:8080 from my friend's house, it shows the content of the web page in my server.
Anyway, my target is to achieve that www.example.com (port 80, not with :8080) shows the web page that is hosted in my server, and ftp://www.example.com let me access my files.
If it helps, the modem router I am using is TP-Link TD-W8960N (If you are trying to search TP-Link site, it is not the latest model. There is a newer model with the same name). The DDNS service that I am using is no-ip.com.