大网数据广告活动
服务器运维问答

How to bypass SSLVerifyClient for specific IP Address

· 52CE 我爱测

I'm fairly new to HTTPD so I need some insight from the pro's. The previous admins set up HTTPD on a Linux box. It is configured to read Certs by the user accessing a specific DNS (ex: https://cxg-now-test.abc ). A reverse proxy …

问题原文

原帖链接 · MCM · CC BY-SA 3.0

I'm fairly new to HTTPD so I need some insight from the pro's.

The previous admins set up HTTPD on a Linux box. It is configured to read Certs by the user accessing a specific DNS (ex: https://cxg-now-test.abc). A reverse proxy is then used to send the user to a the app server ,if their cert is valid, which resides on the same box. This works great.

In my HTTPD config, I have a section like this:

<VirtualHost>
...
SSLVerifyClient require
SSLVerifyDepth 3
SSLOptions +ExportCertData +StdEnvVars
SSLCACertificateFile <path to cert>
</VirtualHost>

Whenever someone accesses https://cxg-now-test.abc, their cert is read and are sent to the app. Again this works great.

What I'd like to do is bypass the SSLVerifyClient from a particular DNS or IP Address. Ex: 10.54.12.34

I know I can set SSLVerifyClient to 'optional' but that does not seem very secure to me.

I think the ultimate solution would be this:

  • All Users: SSLVerifyClient require
  • 10.54.12.34: SSLVerifyClient optional

BTW, we're running Apache 2.2

Is this doable?

Any help is greatly appreciated

已采纳解答

原帖链接 · Andrew Schulman · CC BY-SA 3.0

It seems the answer is no. SSLVerifyClient doesn't include any options for choosing its setting by environment variables, for example.

However, you can set SSLVerifyClient in a virtual host or directory context. So if you configure Apache to serve content to 10.54.12.34 from a different virtual host or directory, you can set a different value of SSLVerifyClient there. For example, using mod_rewrite in a VirtualHost:

SSLVerifyClient require

RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^10\.54\.12\.34$
RewriteRule ^(.*)$ /path/to/host-specific-dir/$1 [QSA]

<Directory /path/to/host-specific-dir>
  SSLVerifyClient optional
</Directory

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-01-31)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。