<?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>Sam的筆記本</title>
	<atom:link href="http://samwu.tw/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://samwu.tw/blog</link>
	<description>Sam&#039;s Notebook</description>
	<lastBuildDate>Fri, 03 Feb 2012 07:12:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>linux 紓解 DDoS 造成系統緩慢</title>
		<link>http://samwu.tw/blog/?p=33</link>
		<comments>http://samwu.tw/blog/?p=33#comments</comments>
		<pubDate>Sat, 05 Feb 2011 09:00:53 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[ddos]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://samwu.tw/blog/?p=33</guid>
		<description><![CDATA[說在前面 : 我只用這方式對付了 百M 的 DDoS 流量。在我認為，使用頻寬來壓制這件事情無解；也就是說，如果對方的水管比你粗，請不要浪費時間使用下面的方法。 另外，這只是我個人經驗，不代表一定有用。如果你不確定這樣做會發生什麼事，請找顧問公司&#8230; orz 1. 利用 sysctl，調整對於packet處理需要的等待時間：例如減少 tcp three way handshake 的 SYN ACK 等待時間、SYN backlog &#8230;. etc (詳細內容網路上有很多可以抄，請用Google 找 iptables+DDoS) 2. 減少濫用 iptables Logging，但Logging 是必要的：我看過很多人下了這樣的東西&#8230; iptables -A INPUT -p udp &#8211;dport XX -j LOG，然後只要一被打，iptables &#8230; <a href="http://samwu.tw/blog/?p=33">繼續閱讀 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>說在前面 : 我只用這方式對付了 百M 的 DDoS 流量。在我認為，使用頻寬來壓制這件事情無解；也就是說，如果對方的水管比你粗，請不要浪費時間使用下面的方法。<br />
另外，這只是我個人經驗，不代表一定有用。如果你不確定這樣做會發生什麼事，請找顧問公司&#8230; orz</p>
<p>1. 利用 sysctl，調整對於packet處理需要的等待時間：例如減少 tcp three way handshake 的 SYN ACK 等待時間、SYN backlog &#8230;. etc (詳細內容網路上有很多可以抄，請用Google 找 iptables+DDoS)<br />
2. 減少濫用 iptables Logging，但Logging 是必要的：我看過很多人下了這樣的東西&#8230; iptables -A INPUT -p udp &#8211;dport XX -j LOG，然後只要一被打，iptables 的 LOG 就開始狂操硬碟。但是如果不做Logging又不能瞭解發生了什麼事。建議加上 limit 會好一點。<br />
3. 參考上面的 log，先 DROP 掉不正常的 packet。(通常會有些奇怪的 pattern ,比方說會用 src port 80 來連我的 port 80 &#8230; )<br />
4.把網卡driver  更新 ， compile 進 kernel 裡。<br />
5. 如果是 Web Server 被打，請在 Web Server 前面擋其他的工具。</p>
]]></content:encoded>
			<wfw:commentRss>http://samwu.tw/blog/?feed=rss2&#038;p=33</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cisco 2960G 跟 Extreme Summit X350-24t 跑 LACP</title>
		<link>http://samwu.tw/blog/?p=31</link>
		<comments>http://samwu.tw/blog/?p=31#comments</comments>
		<pubDate>Thu, 16 Sep 2010 06:15:43 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[switch (L2)]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[extreme]]></category>
		<category><![CDATA[LACP]]></category>
		<category><![CDATA[trunk]]></category>

		<guid isPermaLink="false">http://samwu.tw/blog/?p=31</guid>
		<description><![CDATA[這是很久之前的筆記了 , 我對 switch 不是很熟 . 所以在這寫一份 . 重點 : Cisco 有 Native VLAN 的概念 , 如果 vlan1 要跑 Trunk 時帶 Tag , 需要先在 Trunk Port 上面把 Native VLAN 指向別的 VLAN . cisco 2960 : conf t !configuration mode int port &#8230; <a href="http://samwu.tw/blog/?p=31">繼續閱讀 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>這是很久之前的筆記了 , 我對 switch 不是很熟 . 所以在這寫一份 .</p>
<p>重點 : Cisco 有 Native VLAN 的概念 , 如果 <strong>vlan1</strong> 要跑 Trunk 時帶 Tag , <strong>需要先在 Trunk Port 上面把 Native VLAN 指向別的 VLAN</strong> .</p>
<pre>cisco 2960 : 

conf t
!configuration mode 

int port 1
!create port channel 1 

switchport mode trunk
!設定 Port 為 Trunk Port ( 跑出去時要帶 Tag , 收到封包要解 Tag )

switchport trunk native vlan 500
!把 Native Vlan 設到其他 vlan 上 ( 此例為修改 native vlan 為 vlan 500 ) 

int ran gi 0/23-24
!設定 port 23 及 24

switchport trunk native vlan 500
switchport mode trunk
!上面兩條其實是從 port channel 1 繼承下來的 , 如果沒有就再設一次

channel-group 1 mode on
!設定這兩個 port 屬於 channel 1</pre>
<pre>extreme summit x350t-24 :

enable sharing 23 grouping 23-24 algorithm address-based L3_L4
!開啟 port sharing ( 在 cisco 叫 ehterchannel , 在 extreme 叫 port sharing )於 port 23 及 24 . 代表號是 port 23

configure vlan Default add ports 23 tagged
! 設定 port 23 存取 Default 這個 Vlan , 且要帶 Tag</pre>
<p>剩下就是 vlan interface 要綁 ip , 在這就不說明啦 ..</p>
]]></content:encoded>
			<wfw:commentRss>http://samwu.tw/blog/?feed=rss2&#038;p=31</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nginx 修改 server header</title>
		<link>http://samwu.tw/blog/?p=27</link>
		<comments>http://samwu.tw/blog/?p=27#comments</comments>
		<pubDate>Sat, 11 Sep 2010 01:05:22 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://samwu.tw/blog/?p=27</guid>
		<description><![CDATA[nginx 是個高效能的 reverseproxy &#38; webserver . 修改 src/http/ngx_http_header_filter_module.c 找到 static char ngx_http_server_string[] = "Server: nginx" CRLF; 把他改成你要的 . 還有 src/core/nginx.h 修改 #define NGINX_VER "nginx/" NGINX_VERSION src/http/ngx_http_special_response.c u_char ngx_http_error_tail 重新 compile 就搞定了 .]]></description>
			<content:encoded><![CDATA[<p><a href="http://nginx.org/">nginx </a>是個高效能的 reverseproxy &amp; webserver .</p>
<p>修改<br />
src/http/ngx_http_header_filter_module.c<br />
找到<br />
static char ngx_http_server_string[] = "Server: nginx" CRLF;<br />
把他改成你要的 .</p>
<p>還有<br />
src/core/nginx.h<br />
修改<br />
#define NGINX_VER          "nginx/" NGINX_VERSION</p>
<p>src/http/ngx_http_special_response.c<br />
u_char ngx_http_error_tail</p>
<p>重新 compile 就搞定了 .</p>
]]></content:encoded>
			<wfw:commentRss>http://samwu.tw/blog/?feed=rss2&#038;p=27</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CEH考試心得</title>
		<link>http://samwu.tw/blog/?p=14</link>
		<comments>http://samwu.tw/blog/?p=14#comments</comments>
		<pubDate>Sun, 27 Jun 2010 04:40:25 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://samwu.tw/blog/?p=14</guid>
		<description><![CDATA[我的 CEH 在6/23 Pass 了 &#8230;. 很早之前就先訂好了考試日期, 強迫自己收起玩心用功念書. 只是因為平常太多瑣事要處理, 加上考試當天上午還有朋友的機器掛了,傳MSN向我求救 &#8230;. 所以書都沒有念. 考古題只看了十分鐘 &#8230; 還好前一天睡得好, 硬著頭皮去考試. 到達考場, 考官(工讀生???)說明考試方式之後 , 按下 Begin Test 開始四個小時的疲勞轟炸. 心得是 &#8230; 1. 考試題目太多情境題 , 考題有一堆是超過六行的 , 英文不好的我倍感吃力. 2. 我容意分心又怕吵 , 只是考場後面就是 翊利得資訊 的辦公室 , 旁邊感覺好像是茶水間,作答真的很痛苦. 3. &#8230; <a href="http://samwu.tw/blog/?p=14">繼續閱讀 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>我的 <a href="http://www.eccouncil.org/certification/certified_ethical_hacker.aspx">CEH</a> 在6/23 Pass 了 &#8230;.</p>
<p>很早之前就先訂好了考試日期, 強迫自己收起玩心用功念書.<br />
只是因為平常太多瑣事要處理, 加上考試當天上午還有朋友的機器掛了,傳MSN向我求救 &#8230;.<br />
所以書都沒有念. 考古題只看了十分鐘 &#8230; 還好前一天睡得好, 硬著頭皮去考試.</p>
<p>到達考場, 考官(工讀生???)說明考試方式之後 , 按下 Begin Test 開始四個小時的疲勞轟炸.<br />
心得是 &#8230;<br />
1. 考試題目太多情境題 , 考題有一堆是超過六行的 , 英文不好的我倍感吃力.<br />
2. 我容意分心又怕吵 , 只是考場後面就是 翊利得資訊 的辦公室 , 旁邊感覺好像是茶水間,作答真的很痛苦.<br />
3. 不要太相信考古題, 練習閱讀能力就好.<br />
4. 考試前一餐吃好不要吃飽, 跑廁所會浪費很多時間 .<br />
5. 充足睡眠很重要<br />
6. 上完課之後一個月內就要去考 , 過太久要 review 很花時間 .<br />
7. 有些題目的選項看起來都是對的,要選最佳解. 所以要把選項都看完再作答 .</p>
<p>最後 , 考試本身不難 , 如果平常有些資訊安全的常識, 英文能力還算不錯 , 基本上都會考過 ..</p>
]]></content:encoded>
			<wfw:commentRss>http://samwu.tw/blog/?feed=rss2&#038;p=14</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

