<?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>deny | SDT 攻城獅區</title>
	<atom:link href="https://sdt.hameba.tw/tag/deny/feed/" rel="self" type="application/rss+xml" />
	<link>https://sdt.hameba.tw</link>
	<description>由Steven, Der, Ted 三位高級打字員所組成，是三位工程師(攻城獅)所維護的技術分享平台，或許偶爾會分享一些日常，有任何問題或是錯誤的部分，歡迎留言告訴我們！</description>
	<lastBuildDate>Sun, 08 Dec 2019 05:08:11 +0800</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.3</generator>

<image>
	<url>https://sdt.hameba.tw/wp-content/uploads/2020/02/hameba_favicon-150x150.png</url>
	<title>deny | SDT 攻城獅區</title>
	<link>https://sdt.hameba.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Nginx 訪問控制 allow、deny</title>
		<link>https://sdt.hameba.tw/165/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nginx-%25e8%25a8%25aa%25e5%2595%258f%25e6%258e%25a7%25e5%2588%25b6-allow%25e3%2580%2581deny</link>
				<comments>https://sdt.hameba.tw/165/#respond</comments>
				<pubDate>Wed, 04 Dec 2019 03:16:43 +0000</pubDate>
		<dc:creator><![CDATA[Hsu Steven]]></dc:creator>
				<category><![CDATA[System]]></category>
		<category><![CDATA[allow]]></category>
		<category><![CDATA[deny]]></category>
		<category><![CDATA[Nginx]]></category>

		<guid isPermaLink="false">http://192.168.100.203/?p=165</guid>
				<description><![CDATA[<p>除了透過防火牆控制網頁的訪問方式外 進階可以再加入使用Nginx來管控 因為有些網址有url path的管控機 &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/165/" class="more-link">閱讀全文<span class="screen-reader-text">〈Nginx 訪問控制 allow、deny〉</span></a></p>
The post <a href="https://sdt.hameba.tw/165/">Nginx 訪問控制 allow、deny</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>除了透過防火牆控制網頁的訪問方式外</p>
<p>進階可以再加入使用Nginx來管控</p>
<p><span id="more-165"></span></p>
<p>因為有些網址有url path的管控機制跟ip網域有關</p>
<p>以此為例</p><pre class="crayon-plain-tag">location / {
  deny  192.168.1.1;
  allow 192.168.1.0/24;
  allow 10.1.1.0/16;
  allow 2001:0db8::/32;
  deny  all;
}</pre><p>從上到下的順序，類似iptables。是否符合我們訂製的規範。如上的例子先禁止了192.16.1.1，接下來允許了3個網段，其中包含了一個ipv6，最後未匹配的IP全部禁止訪問.</p>
<p>deny all; 很重要如果沒有加上，上方所寫的allow 大致也不會有用。</p>
<p>Reference</p>
<p><a href="http://www.ttlsa.com/linux/nginx-modules-ngx_http_access_module/">http://www.ttlsa.com/linux/nginx-modules-ngx_http_access_module/</a></p>
<p>&nbsp;</p>
<div id="gtx-trans">
<div class="gtx-trans-icon"></div>
</div>The post <a href="https://sdt.hameba.tw/165/">Nginx 訪問控制 allow、deny</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/165/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
	</channel>
</rss>
