N
N
NewSantaClaus2021-08-26 11:59:57
linux
NewSantaClaus, 2021-08-26 11:59:57

How to deny access to the site to CIS countries in the NGINX settings?

How to deny access to the site using nginx?

I tried to do it according to this,
but when executed, it sudo apt-get install nginx-module-geoipwrites

Unable to locate package nginx-module-geoip


After the help of @Lynn
I 'm doing it nginx -Vappeared --with-http_geoip_module=dynamic

But I can't complete because I can't connect the GeoIP base
# Нету даже папок таки не то что файлов
mv /usr/share/GeoIP/GeoIP.dat /usr/share/GeoIP/GeoIP.dat_bak
cd /usr/share/GeoIP/

# Сервер не отвечает. Видимо устаревшая информация
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz


Suitable bases found here
nginx/1.14.0 (Ubuntu)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Barbolin, 2021-08-26
@dronmaxman

/usr/share/GeoIP/GeoIP.dat
In fact, the base is not included with the module and it is paid, you need to say it yourself.
or try this
https://github.com/sherpya/geolite2legacy
Did this article.
https://faun.pub/total-nginx-monitoring-with-appli...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question