NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

yol_89
11112
accept rate: 0%

converted to question 15 Apr '19, 16:47

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866


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

  • Use a "show my ip address" service such as this one (others are available) to show your current IPV4 address.

  • Turn off wifi access on your phone and browse using mobile data to that address - just type the numbers into the address bar and tap return to try and make an http:// connection to that address.

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...

permanent link

answered 15 Apr '19, 17:00

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 15 Apr '19, 17:01

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:

  • Run a web server on port 80 on your LAN
  • Forward port 80 on your router to port 80 on the web server o your LAN
  • Have users access port 80 on the external address of your router, which gets forwarded to port 80 on your web server

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 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×8
×1

question asked: 15 Apr '19, 15:49

question was seen: 2,848 times

last updated: 19 Apr '19, 00:57

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum