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

Hi to all,

I want to setup an own OSM Tile server for integration into my application. But I'm a little concerned that it's very easy to cause the OSM tile server to fail with a denial of service attack on the URL-instructions ...123.png/dirty or /statusinfo.

Now, of course, I could put an NGNX in front and filter out the URL-instructions via regex. Nevertheless I would like to ask here in the round whether the server has perhaps a simple option to disable these URL instructions?

I thank you in advance...

asked 20 Feb '23, 22:24

Ulrich%20Cech's gravatar image

Ulrich Cech
11112
accept rate: 0%


A typical tile server configuration would include something like

RedirectMatch 404 /tiles/.*/dirty
RedirectMatch 404 /tiles/.*/status

to disallow the "dirty" and "status" requests. (Replace "tiles" with whatever your tile URL is.) You could do the same with mod_tile's status request (/mod_tile) although this is not expensive to serve, it is just information that you might not want to publish. If you're using something that monitors your tile server, e.g. munin, you would not outright disallow /mod_tile but do something like

<Location "/mod_tile">
   Require local  
</Location>
permanent link

answered 20 Feb '23, 23:29

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Firstly, it's just Apache. Any filtering, throttling or other restrictions that work with Apache elsewhere will also work here.

Secondly, mod_tile supports throttling - see https://github.com/openstreetmap/mod_tile/search?q=throttling . If you change anything from the defaults you'll want to make sure that "normal" actions like just browsing around the map aren't throttled too.

permanent link

answered 20 Feb '23, 22:54

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

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:

×710
×204

question asked: 20 Feb '23, 22:24

question was seen: 844 times

last updated: 20 Feb '23, 23:29

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