I have successfully installed my own map tile server using the same guide as here on an Ubuntu desktop. I have reserved the IP of my server using its MAC address via DHCP in my router so now my server has always the same IP in the home network. I can serve tiles to any device (laptop, cell phone) that is connected to the home network using this IP, but I need some help regarding accessing the service from outside. I have followed some instructions and created a hostname on DDNS provider No-IP. After that, I have opened a port in my router (port forwarding) that “shows” at the stable internal IP (192.168.X.X) of my server. Is this correct? Then, I installed and configured ddclient on the desktop to use my account at No-IP and redirect the hits of the hostname at my server. When I change the first argument of L.tileLayer to “hostname:port” in leaflet files the map does not appear and finally times out. I used nmap for both hostname and 192.168.X.X and I received “Host is up”, “not shown: xxx closed ports”. I received the same for nmap localhost but with an additional open port shown for postgresql. Is there something wrong with the installation? Finally, when I nslookup the hostname from my Windows laptop I get as an address the gateway (router’s IP). Finally, is there a way to make the access to the service restrictive? Apologies for mentioning too many details but I am a beginner and just want to be surel. I searched for a guide on network configuration for own osm tile server but did not find any. Please for your help. asked 15 Apr '19, 15:49 yol_89 converted to question 15 Apr '19, 16:47 SomeoneElse ♦ |
It sounds like you've already set up port forwarding on your router between your external IP address and the internal machine where Apache is running. To check that this is working
If it gives "unable to connect" then either your haven't done the port forwarding properly or your ISP is blocking access to port 80 on your connection. We know you can serve tiles to other devices on your home LAN so it's unlikely (although not impossible) that a local firewall is blocking access on the tile server itself. If it can (i.e. you can an Apache "it worked" page), then we'd need to understand exactly how you are referencing the tile layer. What to do next depends on the answer to the previous paragraph... answered 15 Apr '19, 17:00 SomeoneElse ♦ I checked the port (24) I had declared at NO-IP and at my router for port forwarding at several online tools for open port checking and it always seemed close. I tried different ports and adjusted some settings on the router with my ISP but the result was the same for all. I finally tried to port forward the port 80 which appeared open in every tool only when my desktop was open. At this time I got the Apache "It works" when I browse to my public IP from my phone using mobile data. I then tried to use my hostname in leaflet file (I removed the ":24" from my IP at NO-IP site) but it did not load. Finally when I "ip a" command on desktop I get inet 192.168.X.X:24.
(16 Apr '19, 20:26)
yol_89
First things first - don't worry about dynamic DNS or your account at NO-IP - just try and get internet routing working first. What you'd normally do is:
It sounds like you've got port forwarding working on port 80 (you got the Apache "It works" when you browsed to your public IP from your phone using mobile data). The next bit is name resolution. Let's imagine that the name you've reserved with NO-IP is "example123.hopto.org". From a command line on a PC do "nslookup example123.hopto.org". If that returns your current IP address then you should be able to use "example123.hopto.org" in place of your current IP address, and the client that you can download from them is supposed to keep it updated when your IP address changes. I'm not sure why you'd declare a port with NO-IP (but I've never used their update client - maybe it is something to do with that?).
(19 Apr '19, 00:57)
SomeoneElse ♦
|