确认CloudFlare和源服务器之间的流量已加密

时间:2016-11-15 23:12:32

标签: ssl encryption https cloudflare

我正在寻找一种方法来确认原始服务器之间的流量,而CloudFlare CDN则使用HTTPS加密。

我在原始服务器和CloudFlare CDN上安装了Let's Encrypt SSL证书,我安装了CloudFlare的通用免费生成SSL证书。

激活缓存后,浏览器会看到CloudFlare SSL证书。在停用缓存后,浏览器会看到Let的加密SSL证书。所以这两个证书都运行良好。但是通过激活缓存,我实际上无法看到原点和CDN之间发生了什么。

在CloudFlare中,我已激活完整(严格)SSL。表面上这意味着traffic is encrypted between the origin and CDN但有没有办法独立确认这一点?

cloudflare crypto

我知道的一种方法是在原点使用Netstat来检查哪个端口正在占用流量。 Netstat已安装,但我没有root SSH访问权限。未安装ss。我安装了Python并且能够执行Hello World python脚本。我没有安装Java。 wget有效,可以下载文件。 还有其他方法吗?

1 个答案:

答案 0 :(得分:0)

假设Apache,修改您的VirtualHost,添加一个条目来检查和修改您的日志。

以下是答案,https://serverfault.com/a/359482/266552

选项2,记录端口

以下是同一主题https://serverfault.com/a/665620/266552

的答案

选项3,将所有HTTP请求重定向到HTTPS。

选项3a,您可以使用mod_rewrite:

RewriteEngine On
# This will enable the Rewrite capabilities

RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS

RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
# This rule will redirect users from their original location, to the same location but using HTTPS.
# i.e.  http://www.example.com/foo/ to https://www.example.com/foo/
# The leading slash is made optional so that this will work either in httpd.conf
# or .htaccess context

https://wiki.apache.org/httpd/RewriteHTTPToHTTPS

选项3b,没有mod_rewrite的替代方案:

<VirtualHost *:80>
   ServerName mysite.example.com
   DocumentRoot /usr/local/apache2/htdocs
   Redirect permanent / https://example.com/
</VirtualHost>
<VirtualHost _default_:443>
   ServerName mysite.example.com
   DocumentRoot /usr/local/apache2/htdocs
   SSLEngine On
   # etc...
</VirtualHost>

#etc...替换为您的其他配置。

https://wiki.apache.org/httpd/RedirectSSL

相关问题