<?xml version="1.0" encoding="utf-8" ?>

<?xml-stylesheet type="text/xsl" href="/templates/2k11/rss.xsl" media="screen" ?>
<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Daniel Lange's blog (Entries tagged as sni)</title>
    <link>http://daniel-lange.com/</link>
    <description>agrep -pB IT /dev/life</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 2.6.0 - http://www.s9y.org/</generator>
    <pubDate>Sat, 03 Nov 2018 19:23:23 GMT</pubDate>

    <image>
    <url>//daniel-lange.com/uploads/Avatar_Blog_144_234.png</url>
    <title>RSS: Daniel Lange's blog - agrep -pB IT /dev/life</title>
    <link>http://daniel-lange.com/</link>
    <width>144</width>
    <height>234</height>
</image>

<item>
    <title>Ahh, the joy of Cloudflare SNI certificates</title>
    <link>http://daniel-lange.com/archives/124-Ahh,-the-joy-of-Cloudflare-SNI-certificates.html</link>
            <category>Internet</category>
    
    <comments>http://daniel-lange.com/archives/124-Ahh,-the-joy-of-Cloudflare-SNI-certificates.html#comments</comments>
    <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=124</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://daniel-lange.com/rss.php?version=2.0&amp;type=comments&amp;cid=124</wfw:commentRss>
    

    <author>nospam@example.com (Daniel Lange)</author>
    <content:encoded>
    &lt;p&gt;Nice neighbourhood, &lt;a href=&quot;https://www.amsterdam.nl&quot; title=&quot;Home page of the city of Amsterdam, The Netherlands&quot;&gt;https://www.amsterdam.nl&lt;/a&gt;...&lt;/p&gt;

&lt;p&gt;For your copy and paste pleasure:&lt;/p&gt;

&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;openssl s_client &lt;span style=&quot;color: #660033;&quot;&gt;-connect&lt;/span&gt; www.amsterdam.nl:&lt;span style=&quot;color: #000000;&quot;&gt;443&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;dev&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;null &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; openssl x509 &lt;span style=&quot;color: #660033;&quot;&gt;-noout&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-text&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;grep&lt;/span&gt; DNS:&lt;/div&gt;

&lt;p&gt;&lt;!-- s9ymdb:630 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;700&quot; height=&quot;463&quot;  src=&quot;http://daniel-lange.com/uploads/entries/161130_Cloudflare_Amsterdam_nl.png&quot; title=&quot;Screenshot of openssl s_client -connect www.amsterdam.nl:443&quot; alt=&quot;Screenshot of openssl s_client -connect www.amsterdam.nl:443&quot; /&gt;&lt;/p&gt;

&lt;h2&gt;Update&lt;/h2&gt;

&lt;p&gt;03.11.18: Cloudflare fixed this mess somewhat. They now look for SNI servernames and use customer-specific certs. See:&lt;/p&gt;

&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;openssl s_client &lt;span style=&quot;color: #660033;&quot;&gt;-servername&lt;/span&gt; www.amsterdam.nl &lt;span style=&quot;color: #660033;&quot;&gt;-connect&lt;/span&gt; www.amsterdam.nl:&lt;span style=&quot;color: #000000;&quot;&gt;443&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;dev&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;null &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; openssl x509 &lt;span style=&quot;color: #660033;&quot;&gt;-noout&lt;/span&gt; &lt;span style=&quot;color: #660033;&quot;&gt;-text&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;grep&lt;/span&gt; DNS:&lt;/div&gt;

&lt;p&gt;(notice the -servername in the above vs. the original command that will fail with something like
&lt;tt&gt;140246838507160:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:s23_clnt.c:769:&lt;/tt&gt; now)&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Wed, 30 Nov 2016 07:15:00 +0000</pubDate>
    <guid isPermaLink="false">http://daniel-lange.com/archives/124-guid.html</guid>
    <category>cloudflare</category>
<category>dns</category>
<category>sni</category>
<category>ssl</category>
<category>tls</category>

</item>
<item>
    <title>Multiple Apache VHosts on the same IP and port</title>
    <link>http://daniel-lange.com/archives/2-Multiple-Apache-VHosts-on-the-same-IP-and-port.html</link>
            <category>Apache</category>
    
    <comments>http://daniel-lange.com/archives/2-Multiple-Apache-VHosts-on-the-same-IP-and-port.html#comments</comments>
    <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=2</wfw:comment>

    <slash:comments>7</slash:comments>
    <wfw:commentRss>http://daniel-lange.com/rss.php?version=2.0&amp;type=comments&amp;cid=2</wfw:commentRss>
    

    <author>nospam@example.com (Daniel Lange)</author>
    <content:encoded>
    &lt;p&gt;I just learned yesterday again, what I knew a few years ago, but since had forgotten:&lt;/p&gt;

&lt;p&gt;You cannot put multiple SSL-enabled virtual Apache hosts onto the same IP and port.&lt;/p&gt;

&lt;p&gt;Apache cannot identify which VirtualHost to serve a request from because the payload is encrypted in its entirety. So a&lt;/p&gt;

&lt;pre&gt;Host: servertwo.tld&lt;/pre&gt;

&lt;p&gt;header cannot be parsed until the encryption has been removed. Which requires the key, which is listed in the VHost section that could not be identified in the first place...
So a name-based VirtualHost-configuration like this won&#039;t work:&lt;/p&gt;

&lt;div class=&quot;apache geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #00007f;&quot;&gt;Listen&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;443&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #00007f;&quot;&gt;NameVirtualHost&lt;/span&gt; *:&lt;span style=&quot;color: #ff0000;&quot;&gt;443&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #000000; font-weight:bold;&quot;&gt;virtualhost&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLEngine&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;On&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;ServerName&lt;/span&gt; serverone.tld:&lt;span style=&quot;color: #ff0000;&quot;&gt;443&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLCertificateFile&lt;/span&gt; /etc/apache2/ssl/serverone.crt&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLCertificateKeyFile&lt;/span&gt; /etc/apache2/ssl/serverone.key&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;[...]&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #000000; font-weight:bold;&quot;&gt;virtualhost&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #000000; font-weight:bold;&quot;&gt;virtualhost&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLEngine&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;On&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;ServerName&lt;/span&gt; servertwo.tld:&lt;span style=&quot;color: #ff0000;&quot;&gt;443&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLCertificateFile&lt;/span&gt; /etc/apache2/ssl/servertwo.crt&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #00007f;&quot;&gt;SSLCertificateKeyFile&lt;/span&gt; /etc/apache2/ssl/servertwo.key&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;#160; &amp;#160;[...]&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #000000; font-weight:bold;&quot;&gt;virtualhost&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;

&lt;p&gt;It will just serve any request out of the first VirtualHost (serverone.tld) regardless of the hostname in the request headers.&lt;/p&gt;

&lt;p&gt;There is some light at the end of this tunnel though:
&lt;a target=&quot;_blank&quot; title=&quot;RFC 4366&quot; href=&quot;http://www.ietf.org/rfc/rfc4366.txt&quot;&gt;RFC4366&lt;/a&gt; describes an optional field to the TLS (&lt;a target=&quot;_blank&quot; title=&quot;Wikipedia:Transport Layer Security - TLS&quot; href=&quot;http://en.wikipedia.org/wiki/Transport_Layer_Security&quot;&gt;Transport Layer Security&lt;/a&gt;) client request called &amp;quot;Server Name Indication&amp;quot; (SNI). With this the client just includes a list of ServerNames (usually one) that it&#039;s trying to contact. Apache can easily match the supplied name from the client against a ServerName (or ServerAlias) directive from it&#039;s configuration files.&lt;/p&gt;

&lt;p&gt;SNI will be supported with &lt;a target=&quot;_blank&quot; title=&quot;OpenSSL Homepage&quot; href=&quot;http://openssl.org&quot;&gt;OpenSSL&lt;/a&gt; v0.9.9 in mod_ssl. Sometime in the future. There is a backport to v0.9.8 available from Steven Henson linked &lt;a target=&quot;_blank&quot; title=&quot;Blog Entry: Mozillazine - gerv&quot; href=&quot;http://weblogs.mozillazine.org/gerv/archives/2007/08/virtual_hosting_ssl_and_sni.html&quot;&gt;here&lt;/a&gt;. Or you can use mod_gnutls as described by George Notaras in a recent &lt;a target=&quot;_blank&quot; title=&quot;Blog entry: SSL-enabled Name-based Apache Virtual Hosts with mod_gnutls&quot; href=&quot;http://www.g-loaded.eu/2007/08/10/ssl-enabled-name-based-apache-virtual-hosts-with-mod_gnutls/&quot;&gt;blog entry&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In either cases the above configuration snippet will &amp;quot;just work&amp;quot; once SNI is understood by Apache.&lt;/p&gt;

&lt;p&gt;Currently Internet Explorer 7 (on Vista only, wanna upgrade &lt;img src=&quot;http://daniel-lange.com/plugins/serendipity_event_emoticate/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; class=&quot;emoticon&quot; /&gt;), Mozilla Firefox 2+, Opera 7.6+, KDE Konqueror 3.5+ support sending the SNI. You can test your browser at Kaspar Brand&#039;s &lt;a target=&quot;_blank&quot; title=&quot;https://sni.velox.ch/&quot; href=&quot;https://sni.velox.ch/&quot;&gt;SNI testpage&lt;/a&gt;. He also has a patch available to make Apache 2.2 mod_ssl SNI capable when compiled against a CVS-version of OpenSSL.&lt;/p&gt;

&lt;p&gt;I&#039;m rather sure that spreading SNI capable hosts will also provide new hacking opportunities:
Let&#039;s assume a system serves both Intranet and Internet traffic. A client contacts the Internet IP with SSL but specifies the Intranet Hostname in it&#039;s TLS SNI entry. Guess what will happen? Yup.&lt;/p&gt;

&lt;h2&gt;Update&lt;/h2&gt;

&lt;p&gt;02.09.2009: Gee, after two years people still read this blog entry. So I&#039;ll point you to a few updates. 2009 is not 2007 &lt;img src=&quot;http://daniel-lange.com/plugins/serendipity_event_emoticate/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; class=&quot;emoticon&quot; /&gt; SNI has made some slow progress since the original article. But major steps forward only came this summer: Apache has official support for SNI since 2.2.12 (&lt;a href=&quot;https://issues.apache.org/bugzilla/show_bug.cgi?id=34607&quot; title=&quot;Apache bugtracker bug 34607 - Support for Server Name Indication&quot;&gt;tracking bug&lt;/a&gt;). Gentoo has been early to support SNI and &lt;a href=&quot;http://dev.gentoo.org/~dertobi123/&quot; title=&quot;Tobias&#039; Gentoo dev page&quot;&gt;Tobias Scheerbaum&lt;/a&gt; has written a blog entry on &lt;a href=&quot;http://blog.scherbaum.info/2008/07/20/apache-ssl-und-sni/&quot; title=&quot;Tobias Scheerbaum&#039;s blog entry (in GERMAN)&quot;&gt;Apache, SSL und SNI in Gentoo (in German)&lt;/a&gt; summarizing how it works out of the box. Support for SNI has also been added to Debian (&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461917&quot; title=&quot;Debian bugtracker bug 461917 - Apache 2.2 TLS-SNI support,Package: apache2&quot;&gt;tracking bug&lt;/a&gt;) but for now the default config files don&#039;t reflect SNI capability yet. Ubuntu will see SNI in Karmic Koala, the release scheduled for next month i.e. &quot;9.10&quot; (&lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/184131&quot; title=&quot;Ubuntu bugtracker bug 184131 - Apache 2.2 SNI support&quot;&gt;tracking bug&lt;/a&gt;). Fedora has a SNI enabled Apache from httpd-2.2.13-1.fc11 onwards (&lt;a href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=443513&quot; title=&quot;Red Hat bugtracker bug 443513 - SNI support for mod_ssl&quot;&gt;tracking bug&lt;/a&gt;). Tobias also states that SP3 for Windows XP enables IE6 to send the SNI (SP2 is not sufficient).&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 13 Oct 2007 12:00:00 +0000</pubDate>
    <guid isPermaLink="false">http://daniel-lange.com/archives/2-guid.html</guid>
    <category>apache</category>
<category>sni</category>
<category>ssl</category>
<category>updated</category>
<category>virtualhost</category>

</item>

</channel>
</rss>
