diff options
Diffstat (limited to 'docs/admin/filtron.rst')
| -rw-r--r-- | docs/admin/filtron.rst | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/docs/admin/filtron.rst b/docs/admin/filtron.rst index 9e55d5968..07dcb9bc5 100644 --- a/docs/admin/filtron.rst +++ b/docs/admin/filtron.rst @@ -1,25 +1,26 @@ +========================== How to protect an instance ========================== -Searx depens on external search services. To avoid the abuse of these services it is advised to limit the number of requests processed by searx. - -An application firewall, ``filtron`` solves exactly this problem. Information on how to install it can be found at the `project page of filtron <https://github.com/asciimoo/filtron>`__. - -Sample configuration of filtron -------------------------------- +Searx depens on external search services. To avoid the abuse of these services +it is advised to limit the number of requests processed by searx. -An example configuration can be find below. This configuration limits the access of +An application firewall, ``filtron`` solves exactly this problem. Information +on how to install it can be found at the `project page of filtron +<https://github.com/asciimoo/filtron>`__. - * scripts or applications (roboagent limit) - * webcrawlers (botlimit) - - * IPs which send too many requests (IP limit) - - * too many json, csv, etc. requests (rss/json limit) +Sample configuration of filtron +=============================== - * the same UserAgent of if too many requests (useragent limit) +An example configuration can be find below. This configuration limits the access +of: +- scripts or applications (roboagent limit) +- webcrawlers (botlimit) +- IPs which send too many requests (IP limit) +- too many json, csv, etc. requests (rss/json limit) +- the same UserAgent of if too many requests (useragent limit) .. code:: json @@ -120,26 +121,28 @@ An example configuration can be find below. This configuration limits the access Route request through filtron ------------------------------ +============================= Filtron can be started using the following command: -.. code:: bash +.. code:: sh - $ filtron -rules rules.json + $ filtron -rules rules.json -It listens on 127.0.0.1:4004 and forwards filtered requests to 127.0.0.1:8888 by default. +It listens on ``127.0.0.1:4004`` and forwards filtered requests to +``127.0.0.1:8888`` by default. Use it along with ``nginx`` with the following example configuration. .. code:: nginx - location / { - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Scheme $scheme; - proxy_pass http://127.0.0.1:4004/; - } + location / { + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Scheme $scheme; + proxy_pass http://127.0.0.1:4004/; + } -Requests are coming from port 4004 going through filtron and then forwarded to port 8888 where a searx is being run. +Requests are coming from port 4004 going through filtron and then forwarded to +port 8888 where a searx is being run. |