nginx geo ip 모듈 설치 확인: --with-http_geoip_module=dynamic
$ /usr/sbin/nginx -V
geoip 데이터베이스 패키지 설치 $ sudo apt install geoip-database설정파일에 국가 추가하기: /etc/nginx/nginx.conf<syntaxhighlight lang="nginx"> #특정국가 IP 차단하기 geoip_country /usr/share/GeoIP/GeoIP.dat; map $geoip_country_code $allowed_country { default yes; RU no; CN no; }</syntaxhighlight>server블록에 추가<syntaxhighlight lang="nginx">if ($allowed_country = no) { return 444;}</syntaxhighlight><br />
==에러==