Taek's blog


  • Home

  • Archives

  • Tags

  • About

Blocking or allowing IP-addresses in Nginx

Posted on 2018-03-16

Nginx Config

1
2
3
4
5
6
7
8
9
10
11
12
13
14
server {
listen 80;
server_name kimtaek.github.io;
charset utf-8;
client_max_body_size 75M;

location / {
deny 192.168.1.1; # Blocking specific IP
allow 192.168.1.0/24; # Your specific IP
allow 10.1.1.0/16;
allow 2001:0db8::/32;
deny all;
}
}
# Nginx
Use Certbot Let's Encrypt SSL Certificates
Go dependency management tool - Dep
  • Table of Contents
  • Overview
Kim Taek

Kim Taek

7 posts
11 tags
  1. 1. Nginx Config
© 2018 Kim Taek
Powered by Hexo
Theme - NexT.Pisces