So, I recently found out that my ISP has this free feature, so I decided that I want to build a small server back home, to run a few stuff as a FTP, HTTP, SSH, few databases, you got the idea.
Maybe I should start by shortly describing my local network. I have a router and a main PC, the PC will run all the servers.
I configured DHCP to keep 192.168.0.2
for main PC's MAC address, and created a virtual server (Forwarding -> Virtual servers -> Add new) that maps port 80 to 80 on 192.168.0.2
, both TCP and UDP. I'm also running apache2, on ubuntu 16.04, and obviously can access localhost and see apache main page (on the main PC).
After many unnecessary reboots (I thought it will work!) I found out the from my laptop connected to the same router (lets say 192.168.0.3
) I cannot connect to my main PC by typing the external ip or the sudomain, only by the internal IP address 192.168.0.2
. If I connect to another network with my laptop (hotspot) and try to access the subdomain, it works.
I want to be able to access my subdomain from inside my local network, but apparently I can't, only from the outside.
Now I think that it's definitely from my router configuration, maybe I should set some kind of default gateway, to stop searching for the subdomain, because it's hosted right here. Anyone has a clue of what I should do?