Browse Source

Merge pull request #1732 from jaapmarcus/fix/cf-ips

Changes to CF ips for live servers
Kristan Kenney 5 years ago
parent
commit
c0a3af0ea1
1 changed files with 5 additions and 0 deletions
  1. 5 0
      install/upgrade/versions/1.4.0.sh

+ 5 - 0
install/upgrade/versions/1.4.0.sh

@@ -15,6 +15,11 @@ if [ -e "/etc/nginx/nginx.conf" ]; then
     fi
 fi
 
+if [ -e "/etc/nginx/nginx.conf" ]; then
+    echo "[ * ] Update Nginx.conf with changes to Cloudflare IP addresses"
+    sed  -i 's/    set_real_ip_from 104.16.0.0\/12;/    set_real_ip_from 104.16.0.0\/13;\n    set_real_ip_from 104.24.0.0\/14;/g' /etc/nginx/nginx.conf
+fi
+
 # Populating HELO/SMTP Banner for existing IPs
 if [ "$MAIL_SYSTEM" == "exim4" ]; then