<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>關閉 TLSv1 &#8211; 記下來</title>
	<atom:link href="https://noter.tw/tag/%E9%97%9C%E9%96%89-tlsv1/feed/" rel="self" type="application/rss+xml" />
	<link>https://noter.tw</link>
	<description>一路上踩到的坑、遇到的問題，一點一滴記下來，希望能幫助到需要的人~</description>
	<lastBuildDate>Tue, 24 Oct 2023 00:32:39 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.3</generator>

<image>
	<url>https://noter.tw/wp-content/uploads/cropped-old-1130742_1920-1-32x32.jpg</url>
	<title>關閉 TLSv1 &#8211; 記下來</title>
	<link>https://noter.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Ubuntu 取消 Apache 2.4 的 TLSv1.0 教學</title>
		<link>https://noter.tw/4812/ubuntu-18-04-%e7%92%b0%e5%a2%83%e4%b8%8b%e5%8f%96%e6%b6%88-apache-2-4-%e7%9a%84-tlsv1-0-%e6%95%99%e5%ad%b8/</link>
					<comments>https://noter.tw/4812/ubuntu-18-04-%e7%92%b0%e5%a2%83%e4%b8%8b%e5%8f%96%e6%b6%88-apache-2-4-%e7%9a%84-tlsv1-0-%e6%95%99%e5%ad%b8/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Fri, 03 May 2019 16:35:48 +0000</pubDate>
				<category><![CDATA[Web Server]]></category>
		<category><![CDATA[關閉 SSLv3]]></category>
		<category><![CDATA[只允許 TLSv1.2]]></category>
		<category><![CDATA[SSLProtocol 設定]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[TLSv1.0]]></category>
		<category><![CDATA[LetsEncrypt]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[關閉 TLSv1]]></category>
		<guid isPermaLink="false">https://noter.tw/?p=4812</guid>

					<description><![CDATA[<p>突然接到一個求救，資安掃描的時候掃出 TLSv1.0 應該要關閉的漏洞，就開始 Google 要怎麼設定，Apache 小蛙不熟，通常都是問題來一個找一個解一個，來兩個找兩個解一雙 ~ 這篇記錄留給有&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/4812/ubuntu-18-04-%e7%92%b0%e5%a2%83%e4%b8%8b%e5%8f%96%e6%b6%88-apache-2-4-%e7%9a%84-tlsv1-0-%e6%95%99%e5%ad%b8/" data-wpel-link="internal">Ubuntu 取消 Apache 2.4 的 TLSv1.0 教學</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>突然接到一個求救，資安掃描的時候掃出 TLSv1.0 應該要關閉的漏洞，就開始 Google 要怎麼設定，Apache 小蛙不熟，通常都是問題來一個找一個解一個，來兩個找兩個解一雙 ~ 這篇記錄留給有需要的人。</p>



<span id="more-4812"></span>



<p>這問題直接丟 Google 會有很多很多一拖拉庫的解法，不過有些應該是 CentOS 或是其他版本的，小蛙看 Ubuntu 18.04 + Apache 2.4 的路徑在 /etc/apache2/，跟網路上很多教學裡提到的 /etc/httpd/ 不一樣，就 ~ 都試試看吧。</p>



<p>終於看到一篇好像不錯 <a href="https://www.cloudibee.com/disabling-tls-apache/" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">Disabling TLS 1.0 on Apache web servers<span class="wpel-icon wpel-image wpel-icon-6"></span></a>，嗯嗯，路徑不同，不過既然知道要修改的屬性名稱叫做「SSLProtocol」，那就到小蛙的目錄 /etc/apache2/ 來搜尋一下</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">$ cd /etc/apache2/
$ grep -ir "SSLProtocol" *
mods-available/ssl.conf:        SSLProtocol all -SSLv3</pre>



<p>Bingo! 找到在模組資料夾中的 ssl.conf，動手改掉他吧！小蛙收到的需求是把 1.0 跟 1.1 關閉，保留 1.2 即可，因此把上面的 <code>SSLProtocol all -SSLv3</code> 改成 <code>SSLProtocol TLSv1.2</code>，改好之後 sudo service apache2 restart，立馬到 <a href="https://www.sslshopper.com/ssl-checker.html" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">SSL Checker<span class="wpel-icon wpel-image wpel-icon-6"></span></a> 測試看看，結果 &#8230; 竟然沒生效 @@</p>



<p>左查右查，會不會是上面的網站 cache 呢？下指令查查看</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">$ nmap --script ssl-enum-ciphers -p 443 ip或domain | grep TLSv
|   TLSv1.0:
|   TLSv1.1:
|   TLSv1.2:</pre>



<p>我的天啊 ~ 真的沒生效 &#8230; (如果沒有安裝的話可以先 apt-get install nmap 來安裝這個套件)，查了很多 stackoverflow 終於找到這篇 <a href="https://stackoverflow.com/a/55282453/1227342" target="_blank" rel="noreferrer noopener nofollow external" data-wpel-link="external" class="wpel-icon-right">Disabling TLS 1.0 in Apache 2.4<span class="wpel-icon wpel-image wpel-icon-6"></span></a>，原來設定有成功，只是因為小蛙使用了 letsencrypt 的免費 SSL，造成 Apache 載入 SSL 設定的時候，會被較後面載入的 letsencrypt 設定檔蓋掉，因此前面的 ssl.conf 才會設定了但沒有效果。把剛剛上面的設定檔設定到 /etc/letsencrypt/options-ssl-apache.conf 看看吧！</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">$ nmap --script ssl-enum-ciphers -p 443 ip或domain | grep TLSv
|   TLSv1.2:</pre>



<p>打完收工，太感謝 stackoverflow 的那個答案了，真的好想幫他按讚，可惜小蛙的積分不夠 &gt;..&lt;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/4812/ubuntu-18-04-%e7%92%b0%e5%a2%83%e4%b8%8b%e5%8f%96%e6%b6%88-apache-2-4-%e7%9a%84-tlsv1-0-%e6%95%99%e5%ad%b8/" data-wpel-link="internal">Ubuntu 取消 Apache 2.4 的 TLSv1.0 教學</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/4812/ubuntu-18-04-%e7%92%b0%e5%a2%83%e4%b8%8b%e5%8f%96%e6%b6%88-apache-2-4-%e7%9a%84-tlsv1-0-%e6%95%99%e5%ad%b8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
