Rate limit authorization requests
This commit is contained in:
parent
6b6ce258ed
commit
8b9486e565
|
@ -7,7 +7,7 @@ RUN useradd --create-home --groups sudo admin ; echo "admin:admin" | chpasswd ;
|
||||||
RUN useradd --create-home znc ; echo "znc:znc" | chpasswd
|
RUN useradd --create-home znc ; echo "znc:znc" | chpasswd
|
||||||
|
|
||||||
# Install sshd, znc, znc extras, nginx, pisg
|
# Install sshd, znc, znc extras, nginx, pisg
|
||||||
RUN mkdir /var/run/sshd ; apt-get update ; apt-get install -y supervisor vim openssh-server znc znc-python znc-dev dpkg-dev pisg nginx-light
|
RUN mkdir /var/run/sshd ; apt-get update ; apt-get install -y supervisor vim openssh-server znc znc-python znc-dev dpkg-dev pisg nginx-full
|
||||||
|
|
||||||
# Get ZNC source
|
# Get ZNC source
|
||||||
RUN su -c 'cd /home/znc ; apt-get source znc' znc
|
RUN su -c 'cd /home/znc ; apt-get source znc' znc
|
||||||
|
|
3
default
3
default
|
@ -1,3 +1,5 @@
|
||||||
|
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
listen [::]:80 default_server ipv6only=on;
|
listen [::]:80 default_server ipv6only=on;
|
||||||
|
@ -5,6 +7,7 @@ server {
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
location / {
|
location / {
|
||||||
|
limit_req zone=one;
|
||||||
autoindex on;
|
autoindex on;
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
auth_basic "Restricted";
|
auth_basic "Restricted";
|
||||||
|
|
Loading…
Reference in New Issue