File tree Expand file tree Collapse file tree 4 files changed +56
-3
lines changed Expand file tree Collapse file tree 4 files changed +56
-3
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,6 @@ LABEL org.label-schema.schema-version="1.0" \
58
58
org.label-schema.license="MIT" \
59
59
org.label-schema.name="nginx-proxy-manager" \
60
60
org.label-schema.description="Docker container for managing Nginx proxy hosts with a simple, powerful interface " \
61
- org.label-schema.url="https://github.com/jc21 /nginx-proxy-manager" \
62
- org.label-schema.vcs-url="https://github.com/jc21 /nginx-proxy-manager.git" \
63
- org.label-schema.cmd="docker run --rm -ti jc21 /nginx-proxy-manager:latest"
61
+ org.label-schema.url="https://github.com/Raffi /nginx-proxy-manager" \
62
+ org.label-schema.vcs-url="https://github.com/Raffi /nginx-proxy-manager.git" \
63
+ org.label-schema.cmd="docker run --rm -ti Raffi /nginx-proxy-manager:latest"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ CLOUDFLARE_FILE_PATH=${1:-/ etc/ nginx/ cloudflare}
4
+
5
+ echo " #Cloudflare" > $CLOUDFLARE_FILE_PATH ;
6
+ echo " " >> $CLOUDFLARE_FILE_PATH ;
7
+
8
+ echo " # - IPv4" >> $CLOUDFLARE_FILE_PATH ;
9
+ for i in ` curl -s -L https://www.cloudflare.com/ips-v4` ; do
10
+ echo " set_real_ip_from $i ;" >> $CLOUDFLARE_FILE_PATH ;
11
+ done
12
+
13
+ echo " " >> $CLOUDFLARE_FILE_PATH ;
14
+ echo " # - IPv6" >> $CLOUDFLARE_FILE_PATH ;
15
+ for i in ` curl -s -L https://www.cloudflare.com/ips-v6` ; do
16
+ echo " set_real_ip_from $i ;" >> $CLOUDFLARE_FILE_PATH ;
17
+ done
18
+
19
+ echo " " >> $CLOUDFLARE_FILE_PATH ;
20
+ echo " real_ip_header CF-Connecting-IP;" >> $CLOUDFLARE_FILE_PATH ;
21
+
22
+ # test configuration and reload nginx
23
+ nginx -t && systemctl reload nginx
Original file line number Diff line number Diff line change
1
+ #Cloudflare
2
+
3
+ # - IPv4
4
+ set_real_ip_from 173.245.48.0/20;
5
+ set_real_ip_from 103.21.244.0/22;
6
+ set_real_ip_from 103.22.200.0/22;
7
+ set_real_ip_from 103.31.4.0/22;
8
+ set_real_ip_from 141.101.64.0/18;
9
+ set_real_ip_from 108.162.192.0/18;
10
+ set_real_ip_from 190.93.240.0/20;
11
+ set_real_ip_from 188.114.96.0/20;
12
+ set_real_ip_from 197.234.240.0/22;
13
+ set_real_ip_from 198.41.128.0/17;
14
+ set_real_ip_from 162.158.0.0/15;
15
+ set_real_ip_from 104.16.0.0/13;
16
+ set_real_ip_from 104.24.0.0/14;
17
+ set_real_ip_from 172.64.0.0/13;
18
+ set_real_ip_from 131.0.72.0/22;
19
+
20
+ # - IPv6
21
+ set_real_ip_from 2400:cb00::/32;
22
+ set_real_ip_from 2606:4700::/32;
23
+ set_real_ip_from 2803:f800::/32;
24
+ set_real_ip_from 2405:b500::/32;
25
+ set_real_ip_from 2405:8100::/32;
26
+ set_real_ip_from 2a06:98c0::/29;
27
+ set_real_ip_from 2c0f:f248::/32;
28
+
29
+ real_ip_header CF-Connecting-IP;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ events {
19
19
}
20
20
21
21
http {
22
+ include /etc/nginx/cloudflare;
22
23
include /etc/nginx/mime.types;
23
24
default_type application/octet-stream;
24
25
sendfile on ;
You can’t perform that action at this time.
0 commit comments