linux – nginx和cloudlfare ip混淆?

我在使用Cloudflare加速服务时使用我的nginx.conf的http块中的以下配置来获取真正的ip:
## Cloudflare settings to get Real IP's
    set_real_ip_from   204.93.240.0/24;
    set_real_ip_from   204.93.177.0/24;
    set_real_ip_from   199.27.128.0/21;
    set_real_ip_from   173.245.48.0/20;
    set_real_ip_from   103.21.244.0/22;
    set_real_ip_from   103.22.200.0/22;
    set_real_ip_from   103.31.4.0/22;
    set_real_ip_from   141.101.64.0/18;
    set_real_ip_from   108.162.192.0/18;
    set_real_ip_from   190.93.240.0/20;
    set_real_ip_from   188.114.96.0/20;   
    set_real_ip_from   197.234.240.0/22;
    set_real_ip_from   198.41.128.0/17;
    set_real_ip_from   162.158.0.0/15;
    set_real_ip_from   2400:cb00::/32;
    set_real_ip_from   2606:4700::/32;
    set_real_ip_from   2803:f800::/32;
    set_real_ip_from   2405:b500::/32;
    set_real_ip_from   2405:8100::/32;
    real_ip_header     CF-Connecting-IP;

我也使用上面配置下面定义的nginx速率限制功能:

limit_conn_zone $binary_remote_addr zone=two:30m;

这是由limit_conn强制执行的16; php位置块中的指令在/ etc / nginx / sites-enabled的’default’文件中.

我的问题是,这是正确的,它不会限制和阻止Cloudflare IP?

解决方法

根据我自己的经验(我也使用Nginx和CloudFlare)和 documentation的引用我可以说它确实是正确的,CloudFlare IP不会被限制或阻止.

The ngx_http_realip_module module is used to change the client address

相关文章

/etc/sysctl.conf这个目录主要是配置一些系统信息,/etc/sys...
1.作用 useradd或adduser命令用来建立用户帐号和创建用户的起...
它们都是多模式编辑器,不同的是vim 是vi的升级版本,它不仅...
不管是我们在安装软件还是监测软件的使用性能,我们都要随时...
装好Tomcat7后,发现除了本机能访问外界访问不了,岂有此理。...
修改防火墙配置需要修改 /etc/sysconfig/iptables 这个文件,...