Skip to content

Commit 1dfa673

Browse files
committed
make SSL PCI compliance until July 2018
1 parent 4550bd5 commit 1dfa673

File tree

2 files changed

+83
-21
lines changed

2 files changed

+83
-21
lines changed

files/etc/nginx/cdn-ips.conf

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Local cache/proxy
2+
set_real_ip_from 127.0.0.1/32;
3+
4+
# Incapsula
5+
set_real_ip_from 199.83.128.0/21;
6+
set_real_ip_from 198.143.32.0/19;
7+
set_real_ip_from 149.126.72.0/21;
8+
set_real_ip_from 103.28.248.0/22;
9+
set_real_ip_from 185.11.124.0/22;
10+
set_real_ip_from 192.230.64.0/18;
11+
set_real_ip_from 45.64.64.0/22;
12+
13+
# Cloudflare
14+
set_real_ip_from 103.21.244.0/22;
15+
set_real_ip_from 103.22.200.0/22;
16+
set_real_ip_from 103.31.4.0/22;
17+
set_real_ip_from 104.16.0.0/12;
18+
set_real_ip_from 108.162.192.0/18;
19+
set_real_ip_from 141.101.64.0/18;
20+
set_real_ip_from 162.158.0.0/15;
21+
set_real_ip_from 172.64.0.0/13;
22+
set_real_ip_from 173.245.48.0/20;
23+
set_real_ip_from 188.114.96.0/20;
24+
set_real_ip_from 190.93.240.0/20;
25+
set_real_ip_from 197.234.240.0/22;
26+
set_real_ip_from 198.41.128.0/17;
27+
set_real_ip_from 199.27.128.0/21;
28+
29+
# stackpath https://support.stackpath.com/hc/en-us/articles/224785167-IP-Blocks
30+
set_real_ip_from 108.161.176.0/20;
31+
set_real_ip_from 94.46.144.0/20;
32+
set_real_ip_from 146.88.128.0/20;
33+
set_real_ip_from 198.232.124.0/22;
34+
set_real_ip_from 23.111.8.0/22;
35+
set_real_ip_from 217.22.28.0/22;
36+
set_real_ip_from 64.125.76.64/27;
37+
set_real_ip_from 64.125.76.96/27;
38+
set_real_ip_from 64.125.78.96/27;
39+
set_real_ip_from 64.125.78.192/27;
40+
set_real_ip_from 151.139.0.0/19;
41+
set_real_ip_from 64.125.78.224/27;
42+
set_real_ip_from 64.125.102.32/27;
43+
set_real_ip_from 64.125.102.64/27;
44+
set_real_ip_from 64.125.102.96/27;
45+
set_real_ip_from 94.31.27.64/27;
46+
set_real_ip_from 94.31.33.128/27;
47+
set_real_ip_from 94.31.33.160/27;
48+
set_real_ip_from 94.31.33.192/27;
49+
set_real_ip_from 94.31.56.160/27;
50+
set_real_ip_from 177.54.148.0/24;
51+
set_real_ip_from 94.46.144.0/21;
52+
set_real_ip_from 185.18.207.64/26;
53+
set_real_ip_from 50.31.249.224/27;
54+
set_real_ip_from 50.31.251.32/28;
55+
set_real_ip_from 119.81.42.192/27;
56+
set_real_ip_from 119.81.104.96/28;
57+
set_real_ip_from 119.81.67.8/29;
58+
set_real_ip_from 119.81.0.104/30;
59+
set_real_ip_from 119.81.1.144/30;
60+
set_real_ip_from 27.50.77.226/32;
61+
set_real_ip_from 27.50.79.130/32;
62+
set_real_ip_from 103.66.28.0/22;
63+
set_real_ip_from 119.81.131.130/32;
64+
set_real_ip_from 119.81.131.131/32;
65+
set_real_ip_from 216.12.211.59/32;
66+
set_real_ip_from 216.12.211.60/32;
67+
set_real_ip_from 37.58.110.67/32;
68+
set_real_ip_from 37.58.110.68/32;
69+
set_real_ip_from 158.85.206.228/32;
70+
set_real_ip_from 158.85.206.231/32;
71+
set_real_ip_from 174.36.204.195/32;
72+
set_real_ip_from 174.36.204.196/32;
73+
set_real_ip_from 103.228.104.0/22;
74+
75+
real_ip_header X-Forwarded-For;
76+

files/etc/nginx/nginx.new

+7-21
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ http {
3737
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
3838
'$status $body_bytes_sent "$http_referer" '
3939
'"$http_user_agent" "$http_x_forwarded_for"';
40-
log_format simple '-= ngx: $status $request_uri $request_time $remote_addr';
40+
log_format better '-= ngx: $status $request_method $scheme://$host$request_uri $request_time '
41+
'$remote_addr $body_bytes_sent "$http_referer" '
42+
'"$http_user_agent" "$http_x_forwarded_for"';
4143

42-
access_log /var/log/nginx/access.log simple;
44+
access_log /var/log/nginx/access.log better;
4345

4446
# Mime settings
4547
include /etc/nginx/mime.types;
@@ -55,27 +57,9 @@ http {
5557
gzip_disable "MSIE [1-6]\.";
5658

5759

58-
# Cloudflare https://www.cloudflare.com/ips
59-
set_real_ip_from 199.27.128.0/21;
60-
set_real_ip_from 173.245.48.0/20;
61-
set_real_ip_from 103.21.244.0/22;
62-
set_real_ip_from 103.22.200.0/22;
63-
set_real_ip_from 103.31.4.0/22;
64-
set_real_ip_from 141.101.64.0/18;
65-
set_real_ip_from 108.162.192.0/18;
66-
set_real_ip_from 190.93.240.0/20;
67-
set_real_ip_from 188.114.96.0/20;
68-
set_real_ip_from 197.234.240.0/22;
69-
set_real_ip_from 198.41.128.0/17;
70-
set_real_ip_from 162.158.0.0/15;
71-
set_real_ip_from 104.16.0.0/12;
72-
set_real_ip_from 172.64.0.0/13;
73-
real_ip_header CF-Connecting-IP;
74-
75-
7660
# SSL PCI Compliance
7761
ssl_session_cache shared:SSL:10m;
78-
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # remove TLSv1 for PCI-DSS compliance
62+
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
7963
ssl_prefer_server_ciphers on;
8064
ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK";
8165

@@ -103,6 +87,8 @@ http {
10387
log_subrequest on;
10488
rewrite_log on;
10589

90+
include /etc/nginx/cdn-ips.conf;
91+
10692
# Wildcard include
10793
include /etc/nginx/conf.d/*.conf;
10894
include /etc/nginx/sites-enabled/*.conf;

0 commit comments

Comments
 (0)