<?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>MEMOBALL.info &#187; Networking</title>
	<atom:link href="http://www.memoball.info/category/networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.memoball.info</link>
	<description>All of my Memories</description>
	<lastBuildDate>Thu, 22 Jul 2010 06:17:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>http proxy สำหรับ apt-get</title>
		<link>http://www.memoball.info/07/http-proxy-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-apt-get/</link>
		<comments>http://www.memoball.info/07/http-proxy-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-apt-get/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 03:27:20 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=474</guid>
		<description><![CDATA[ในกรณีที่เครื่องของเราอยู่หลังเครื่อง proxy เช่น เครื่องใน office ทั่วไป จะไม่สามารถใช้งาน apt-get ได้เนื่องจาก apt-get ต้องไปดึง file ผ่าน http ซึ่งไม่สามารวิ่งทะลุผ่าน gateway ได้โดยตรง
apt-get จึงต้องวิ่งผ่าน proxy โดยสามารถทำได้โดยเติม ใน file .bashrc ใน home directory

# apt-get proxy
export http_proxy=http://[proxy ID or domain]:[port]/
export ftp_proxy=ftp://[proxy ID or domain]:[port]/

อย่าลืม log in ใหม่
แต่ในกรณีจากการทดสอบ จะไม่สามารถใช้ sudo ได้ เพราะมันจะไม่โหลด environment ของ user ของเราไปด้วย ดังนั้นจึงต้องเข้าด้วย sudo -s เพื่อไปเป็น root ก่อน
เมื่อเข้าไปแล้วลอง export environment [...]]]></description>
			<content:encoded><![CDATA[<p>ในกรณีที่เครื่องของเราอยู่หลังเครื่อง proxy เช่น เครื่องใน office ทั่วไป จะไม่สามารถใช้งาน apt-get ได้เนื่องจาก apt-get ต้องไปดึง file ผ่าน http ซึ่งไม่สามารวิ่งทะลุผ่าน gateway ได้โดยตรง<br />
apt-get จึงต้องวิ่งผ่าน proxy โดยสามารถทำได้โดยเติม ใน file <strong>.bashrc </strong>ใน home directory<span id="more-474"></span></p>
<pre>
# apt-get proxy
export http_proxy=http://[proxy ID or domain]:[port]/
export ftp_proxy=ftp://[proxy ID or domain]:[port]/
</pre>
<p>อย่าลืม log in ใหม่<br />
แต่ในกรณีจากการทดสอบ จะไม่สามารถใช้ sudo ได้ เพราะมันจะไม่โหลด environment ของ user ของเราไปด้วย ดังนั้นจึงต้องเข้าด้วย sudo -s เพื่อไปเป็น root ก่อน<br />
เมื่อเข้าไปแล้วลอง export environment ออกมาดู จะเป็น http_proxy เป็นค่าที่เราใส่เข้าไป</p>
<pre>
user# export
</pre>
<p>จะสังเกตว่าปลายทางที่เราไปดึงข้อมูลจะเป็น ip หรือ domain ของ proxy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/07/http-proxy-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-apt-get/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ssh tunnels proxy ใน putty</title>
		<link>http://www.memoball.info/08/ssh-tunnels-proxy-%e0%b9%83%e0%b8%99-putty/</link>
		<comments>http://www.memoball.info/08/ssh-tunnels-proxy-%e0%b9%83%e0%b8%99-putty/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 14:48:03 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=363</guid>
		<description><![CDATA[วันนี้จำเป็นต้องใช้ ssh tunneling ผ่าน server ของที่ทำงานโดยใช้เครื่อง desktop ซึ่งตามปกติแล้ว จะใช้เครือ่ง laptop เป็นตัวเปิดมากกว่า จึงได้หาวิธิทำ tunneling ผ่าน putty กับ FF ดังนี้


จาก WikiBall


			




เนื้อหา


1 Putty
2 Browser

2.1 Firefox 3.xx


3 อื่นๆ




 if (window.showTocToggle) { var tocShowText = "แสดง"; var tocHideText = "ซ่อน"; showTocToggle(); } 

 Putty

 เปิด putty

 ใ่ส่ Host name





 เข้าไปที่ connect -&#62; tunnel จะได้หน้าตาดังรูป

 ใส่ source port ตามต้องการ และ Destination [...]]]></description>
			<content:encoded><![CDATA[<p>วันนี้จำเป็นต้องใช้ ssh tunneling ผ่าน server ของที่ทำงานโดยใช้เครื่อง desktop ซึ่งตามปกติแล้ว จะใช้เครือ่ง laptop เป็นตัวเปิดมากกว่า จึงได้หาวิธิทำ tunneling ผ่าน putty กับ FF ดังนี้<br />
<span id="more-363"></span></p>
<div id="bodyContent">
<h3 id="siteSub"><a href="http://wiki.memoball.info/index.php/Ssh_tunnel_proxy_%E0%B9%83%E0%B8%99_putty">จาก WikiBall</a></h3>
<div id="contentSub"></div>
<div id="jump-to-nav"></div>
<p>			<!-- start content --></p>
<table id="toc" class="toc" summary="เนื้อหา">
<tr>
<td>
<div id="toctitle">
<h2>เนื้อหา</h2>
</div>
<ul>
<li class="toclevel-1"><a href="./#Putty" ref="toc"><span class="tocnumber">1</span> <span class="toctext">Putty</span></a></li>
<li class="toclevel-1"><a href="./#Browser" ref="toc"><span class="tocnumber">2</span> <span class="toctext">Browser</span></a>
<ul>
<li class="toclevel-2"><a href="./#Firefox_3.xx" ref="toc"><span class="tocnumber">2.1</span> <span class="toctext">Firefox 3.xx</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="./#.E0.B8.AD.E0.B8.B7.E0.B9.88.E0.B8.99.E0.B9.86" ref="toc"><span class="tocnumber">3</span> <span class="toctext">อื่นๆ</span></a></li>
</ul>
</td>
</tr>
</table>
<p><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "แสดง"; var tocHideText = "ซ่อน"; showTocToggle(); } </script><br />
<a name="Putty" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline">Putty</span></h2>
<ul>
<li> เปิด putty
</li>
<li> ใ่ส่ Host name
</li>
</ul>
<p><a href="http://wiki.memoball.info//index.php/%E0%B8%A0%E0%B8%B2%E0%B8%9E:Ssh_tunnel1.jpg" class="image" title="ภาพ:ssh_tunnel1.jpg"><img alt="ภาพ:ssh_tunnel1.jpg" src="http://wiki.memoball.info//images/a/a6/Ssh_tunnel1.jpg" width="456" height="442" border="0" /></a>
</p>
<ul>
<li> เข้าไปที่ connect -&gt; tunnel จะได้หน้าตาดังรูป
</li>
<li> ใส่ source port ตามต้องการ และ Destination เป็น localhost
</li>
<li> กด Add จะปรากฏ <b>D12345</b> ในช่อง หรือตาม port ที่เลือก
</li>
<li> เลือกไปที่ <b>D12345</b> กด open
</li>
</ul>
<p><a href="http://wiki.memoball.info//index.php/%E0%B8%A0%E0%B8%B2%E0%B8%9E:Ssh_tunnel2.jpg" class="image" title="ภาพ:ssh_tunnel2.jpg"><img alt="ภาพ:ssh_tunnel2.jpg" src="http://wiki.memoball.info//images/7/7d/Ssh_tunnel2.jpg" width="456" height="442" border="0" /></a>
</p>
<ul>
<li> ใส่ username &amp; password
</li>
</ul>
<p><a name="Browser" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline">Browser</span></h2>
<p><a name="Firefox_3.xx" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline">Firefox 3.xx</span></h3>
<p>แก้ไขใน firefox ดังนี้
</p>
<pre>  1. เข้าไปที่ Tool-&gt;option
  2. เข้าไปที่ Advance -&gt; Tab-networking
  3. กดปุ่ม setting จะปรากฎหน้าต่างดังรูป
  4. แก้ไข SOCKS Host เป็น localhost และ port ตามที่เราใส่ไว้แล้วด้านบน
</pre>
<p><a href="http://wiki.memoball.info//index.php/%E0%B8%A0%E0%B8%B2%E0%B8%9E:Ssh_tunnel3.jpg" class="image" title="ภาพ:ssh_tunnel3.jpg"><img alt="ภาพ:ssh_tunnel3.jpg" src="http://wiki.memoball.info//images/c/cd/Ssh_tunnel3.jpg" width="600" height="550" border="0" /></a><br />
ส่วน browser ตังอื่นต้องหาเอาเองครับ ใช้ไม่เป็นเหมือนกัน&nbsp;:)
</p>
<p><a name=".E0.B8.AD.E0.B8.B7.E0.B9.88.E0.B8.99.E0.B9.86" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline">อื่นๆ</span></h2>
<p><a href="http://wiki.memoball.info//index.php/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B3_proxy_%E0%B9%82%E0%B8%94%E0%B8%A2%E0%B8%9C%E0%B9%88%E0%B8%B2%E0%B8%99_ssh_%E0%B9%83%E0%B8%99_ubuntu" title="การทำ proxy โดยผ่าน ssh ใน ubuntu">การทำ proxy โดยผ่าน ssh ใน ubuntu</a>
</p>
<p><!--<br />
NewPP limit report<br />
Preprocessor node count: 5/1000000<br />
Post-expand include size: 0/2097152 bytes<br />
Template argument size: 0/2097152 bytes<br />
Expensive parser function count: 0/100<br />
--></p>
<p><!-- Saved in parser cache with key memoball_wiki:pcache:idhash:64-0!1!0!!th!2!edit=0 and timestamp 20090825091055 --></p>
<div class="printfooter">
<h5>รับข้อมูลจาก (Reference) : </h5>
<p>จาก WikiBall : <a href="http://wiki.memoball.info/index.php/Ssh_tunnel_proxy_%E0%B9%83%E0%B8%99_putty">http://wiki.memoball.info/index.php/Ssh_tunnel_proxy_ใน_putty</a></div>
<div id='catlinks' class='catlinks'>
<div id="mw-normal-catlinks"><a href="http://wiki.memoball.info//index.php/%E0%B8%9E%E0%B8%B4%E0%B9%80%E0%B8%A8%E0%B8%A9:Categories" title="พิเศษ:Categories">หมวดหมู่</a>:&#32;<span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:SSH&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:SSH (ยังไม่ได้สร้าง)">SSH</a></span> | <span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:Putty&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:Putty (ยังไม่ได้สร้าง)">Putty</a></span> | <span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:Tunnel&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:Tunnel (ยังไม่ได้สร้าง)">Tunnel</a></span></div>
</div>
<p>			<!-- end content --></p>
<div class="visualClear"></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/08/ssh-tunnels-proxy-%e0%b9%83%e0%b8%99-putty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การทำ proxy tunnel โดยผ่าน ssh ใน ubuntu</title>
		<link>http://www.memoball.info/08/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-proxy-tunnel-%e0%b9%82%e0%b8%94%e0%b8%a2%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99-ssh-%e0%b9%83%e0%b8%99-ubuntu/</link>
		<comments>http://www.memoball.info/08/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-proxy-tunnel-%e0%b9%82%e0%b8%94%e0%b8%a2%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99-ssh-%e0%b9%83%e0%b8%99-ubuntu/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 14:34:27 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=360</guid>
		<description><![CDATA[อันนี้เขียนไว้ตั้งนานแล้ว แต่ยังไม่มีโอกาสให้เอาขึ้นมาบน memoball ซักที อยู่ใน wiki มานานมากแล้ว


จาก WikiBall


			




เนื้อหา


1 SSH
2 Browser

2.1 Firefox 3.x


3 อื่นๆ




 if (window.showTocToggle) { var tocShowText = "แสดง"; var tocHideText = "ซ่อน"; showTocToggle(); } 

  SSH
รันคำสั่งใน terminal


ssh -D port -fCqN user@XXX.XXX.XXX.XXX


 Browser

 Firefox 3.x
แก้ไขใน firefox ดังนี้


เข้าไปที่ Edit -&#62; Preference

เข้าไปที่ Advance -&#62; Tab-networking

กดปุ่ม setting จะปรากฎหน้าต่างดังรูป

แก้ไข SOCKS Host เป็น localhost และ port ตามที่เราใส่ไว้แล้วด้านบน





 อื่นๆ
Ssh [...]]]></description>
			<content:encoded><![CDATA[<p>อันนี้เขียนไว้ตั้งนานแล้ว แต่ยังไม่มีโอกาสให้เอาขึ้นมาบน memoball ซักที อยู่ใน wiki มานานมากแล้ว<br />
<span id="more-360"></span></p>
<div id="bodyContent">
<h3 id="siteSub"><a href="http://wiki.memoball.info/index.php/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B3_proxy_%E0%B9%82%E0%B8%94%E0%B8%A2%E0%B8%9C%E0%B9%88%E0%B8%B2%E0%B8%99_ssh_%E0%B9%83%E0%B8%99_ubuntu">จาก WikiBall</a></h3>
<div id="contentSub"></div>
<div id="jump-to-nav"></div>
<p>			<!-- start content --></p>
<table id="toc" class="toc" summary="เนื้อหา">
<tr>
<td>
<div id="toctitle">
<h2>เนื้อหา</h2>
</div>
<ul>
<li class="toclevel-1"><a href="./#SSH" ref="toc"><span class="tocnumber">1</span> <span class="toctext">SSH</span></a></li>
<li class="toclevel-1"><a href="./#Browser" ref="toc"><span class="tocnumber">2</span> <span class="toctext">Browser</span></a>
<ul>
<li class="toclevel-2"><a href="./#Firefox_3.x" ref="toc"><span class="tocnumber">2.1</span> <span class="toctext">Firefox 3.x</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="./#.E0.B8.AD.E0.B8.B7.E0.B9.88.E0.B8.99.E0.B9.86" ref="toc"><span class="tocnumber">3</span> <span class="toctext">อื่นๆ</span></a></li>
</ul>
</td>
</tr>
</table>
<p><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "แสดง"; var tocHideText = "ซ่อน"; showTocToggle(); } </script><br />
<a name="SSH" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> SSH</span></h2>
<p>รันคำสั่งใน terminal
</p>
<pre>
ssh -D port -fCqN user@XXX.XXX.XXX.XXX
</pre>
<p><a name="Browser" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline">Browser</span></h2>
<p><a name="Firefox_3.x" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline">Firefox 3.x</span></h3>
<p>แก้ไขใน firefox ดังนี้
</p>
<ol>
<li>เข้าไปที่ Edit -&gt; Preference
</li>
<li>เข้าไปที่ Advance -&gt; Tab-networking
</li>
<li>กดปุ่ม setting จะปรากฎหน้าต่างดังรูป
</li>
<li>แก้ไข SOCKS Host เป็น localhost และ port ตามที่เราใส่ไว้แล้วด้านบน
</li>
</ol>
<p><a href="http://wiki.memoball.info//index.php/%E0%B8%A0%E0%B8%B2%E0%B8%9E:Firefox-proxy.jpg" class="image" title="ภาพ:firefox-proxy.jpg"><img alt="ภาพ:firefox-proxy.jpg" src="http://wiki.memoball.info//images/d/dc/Firefox-proxy.jpg" width="506" height="548" border="0" /></a>
</p>
<p><a name=".E0.B8.AD.E0.B8.B7.E0.B9.88.E0.B8.99.E0.B9.86" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline">อื่นๆ</span></h2>
<p><a href="http://wiki.memoball.info//index.php/Ssh_tunnel_proxy_%E0%B9%83%E0%B8%99_putty" title="Ssh tunnel proxy ใน putty">Ssh tunnel proxy ใน putty</a>
</p>
<p><!--<br />
NewPP limit report<br />
Preprocessor node count: 8/1000000<br />
Post-expand include size: 0/2097152 bytes<br />
Template argument size: 0/2097152 bytes<br />
Expensive parser function count: 0/100<br />
--></p>
<p><!-- Saved in parser cache with key memoball_wiki:pcache:idhash:14-0!1!0!!th!2!edit=0 and timestamp 20090825091056 --></p>
<div class="printfooter">
<h5>รับข้อมูลจาก (Reference) : </h5>
<p>จาก WikiBall : <a href="http://wiki.memoball.info/index.php/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B3_proxy_%E0%B9%82%E0%B8%94%E0%B8%A2%E0%B8%9C%E0%B9%88%E0%B8%B2%E0%B8%99_ssh_%E0%B9%83%E0%B8%99_ubuntu">http://wiki.memoball.info/index.php/การทำ_proxy_โดยผ่าน_ssh_ใน_ubuntu</a></div>
<div id='catlinks' class='catlinks'>
<div id="mw-normal-catlinks"><a href="http://wiki.memoball.info//index.php/%E0%B8%9E%E0%B8%B4%E0%B9%80%E0%B8%A8%E0%B8%A9:Categories" title="พิเศษ:Categories">หมวดหมู่</a>:&#32;<span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:Linux&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:Linux (ยังไม่ได้สร้าง)">Linux</a></span> | <span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:SSH&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:SSH (ยังไม่ได้สร้าง)">SSH</a></span> | <span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:Tunnel&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:Tunnel (ยังไม่ได้สร้าง)">Tunnel</a></span> | <span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:Ubuntu&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:Ubuntu (ยังไม่ได้สร้าง)">Ubuntu</a></span></div>
</div>
<p>			<!-- end content --></p>
<div class="visualClear"></div>
</p></div>
<p>อันนี้เป็นของบน window โดยใช้ putty ครับ<br />
<a href="http://www.memoball.info/08/ssh-tunnels-proxy-%e0%b9%83%e0%b8%99-putty/">http://www.memoball.info/08/ssh-tunnels-proxy-ใน-puttyssh-tunnels-proxy-ใน-putty/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/08/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-proxy-tunnel-%e0%b9%82%e0%b8%94%e0%b8%a2%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99-ssh-%e0%b9%83%e0%b8%99-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การ block torrent อย่างง่าย</title>
		<link>http://www.memoball.info/03/%e0%b8%81%e0%b8%b2%e0%b8%a3-block-torrent-%e0%b8%ad%e0%b8%a2%e0%b9%88%e0%b8%b2%e0%b8%87%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2/</link>
		<comments>http://www.memoball.info/03/%e0%b8%81%e0%b8%b2%e0%b8%a3-block-torrent-%e0%b8%ad%e0%b8%a2%e0%b9%88%e0%b8%b2%e0%b8%87%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 14:53:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[block torrent]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://memoball.nabzer.com/?p=183</guid>
		<description><![CDATA[พอดีวันนี้ว่างๆ เลยเอาของที่มีอยู่แล้วมาใส่ไว้ใน wiki เพื่อจะได้เป็นความรู้ไว้ใช้ต่อไปในอนาคต วันนี้จึงมานำเสนอการ block torrent เพราะ มีอยู่ช่วงนึงที่บ้านแชร์ไฟล์กันกระจาย ไม่มีระเบียบ บางช่วงจึงทำงานไม่ได้เพราะเนตช้า ก็เลยหาทางวิธีทำการบล็อกโดยไม่ต้องลงทุนอะไร ถึงแม้จะมีช่องโหว่อยู่ก็ตาม แต่ก็ยังดีกว่าไม่ได้จัดการอะไรเลย
ที่ว่าไม่ต้องลงทุนเพราะใช้ตัวจัดการเป็น computer PC ธรรมดา ที่ปกติก็เปิดไว้สำหรับ share file อยู่แล้วก็เลยเอามาทำเป็น routing server (ไม่รู้เรียกถูกหรือเปล่า) ซะเลย โดยทำตามลิงค์ข้างล่างนี้ครับ

จาก WikiBall


			




เนื้อหา


1 Network Infrastructor
2 Program Installation and Configuration

2.1 Routing Server

2.1.1 Network Interface configuration
2.1.2 Network Firewall
2.1.3 Bash script
2.1.4 DHCP




3 ข้อดี ข้อเสีย

3.1 ข้อดี
3.2 ข้อเสีย






 if (window.showTocToggle) { var tocShowText = "แสดง"; var [...]]]></description>
			<content:encoded><![CDATA[<p>พอดีวันนี้ว่างๆ เลยเอาของที่มีอยู่แล้วมาใส่ไว้ใน wiki เพื่อจะได้เป็นความรู้ไว้ใช้ต่อไปในอนาคต วันนี้จึงมานำเสนอการ block torrent เพราะ มีอยู่ช่วงนึงที่บ้านแชร์ไฟล์กันกระจาย ไม่มีระเบียบ บางช่วงจึงทำงานไม่ได้เพราะเนตช้า ก็เลยหาทางวิธีทำการบล็อกโดยไม่ต้องลงทุนอะไร ถึงแม้จะมีช่องโหว่อยู่ก็ตาม แต่ก็ยังดีกว่าไม่ได้จัดการอะไรเลย<span id="more-183"></span><br />
ที่ว่าไม่ต้องลงทุนเพราะใช้ตัวจัดการเป็น computer PC ธรรมดา ที่ปกติก็เปิดไว้สำหรับ share file อยู่แล้วก็เลยเอามาทำเป็น routing server (ไม่รู้เรียกถูกหรือเปล่า) ซะเลย โดยทำตามลิงค์ข้างล่างนี้ครับ</p>
<div id="bodyContent">
<h3 id="siteSub"><a href="http://wiki.memoball.info/index.php/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B8%A5%E0%B9%87%E0%B8%AD%E0%B8%84_torrent_%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2">จาก WikiBall</a></h3>
<div id="contentSub"></div>
<div id="jump-to-nav"></div>
<p>			<!-- start content --></p>
<table id="toc" class="toc" summary="เนื้อหา">
<tr>
<td>
<div id="toctitle">
<h2>เนื้อหา</h2>
</div>
<ul>
<li class="toclevel-1"><a href="./#Network_Infrastructor" ref="toc"><span class="tocnumber">1</span> <span class="toctext">Network Infrastructor</span></a></li>
<li class="toclevel-1"><a href="./#Program_Installation_and_Configuration" ref="toc"><span class="tocnumber">2</span> <span class="toctext">Program Installation and Configuration</span></a>
<ul>
<li class="toclevel-2"><a href="./#Routing_Server" ref="toc"><span class="tocnumber">2.1</span> <span class="toctext">Routing Server</span></a>
<ul>
<li class="toclevel-3"><a href="./#Network_Interface_configuration" ref="toc"><span class="tocnumber">2.1.1</span> <span class="toctext">Network Interface configuration</span></a></li>
<li class="toclevel-3"><a href="./#Network_Firewall" ref="toc"><span class="tocnumber">2.1.2</span> <span class="toctext">Network Firewall</span></a></li>
<li class="toclevel-3"><a href="./#Bash_script" ref="toc"><span class="tocnumber">2.1.3</span> <span class="toctext">Bash script</span></a></li>
<li class="toclevel-3"><a href="./#DHCP" ref="toc"><span class="tocnumber">2.1.4</span> <span class="toctext">DHCP</span></a></li>
</ul>
</li>
</ul>
</li>
<li class="toclevel-1"><a href="./#.E0.B8.82.E0.B9.89.E0.B8.AD.E0.B8.94.E0.B8.B5_.E0.B8.82.E0.B9.89.E0.B8.AD.E0.B9.80.E0.B8.AA.E0.B8.B5.E0.B8.A2" ref="toc"><span class="tocnumber">3</span> <span class="toctext">ข้อดี ข้อเสีย</span></a>
<ul>
<li class="toclevel-2"><a href="./#.E0.B8.82.E0.B9.89.E0.B8.AD.E0.B8.94.E0.B8.B5" ref="toc"><span class="tocnumber">3.1</span> <span class="toctext">ข้อดี</span></a></li>
<li class="toclevel-2"><a href="./#.E0.B8.82.E0.B9.89.E0.B8.AD.E0.B9.80.E0.B8.AA.E0.B8.B5.E0.B8.A2" ref="toc"><span class="tocnumber">3.2</span> <span class="toctext">ข้อเสีย</span></a></li>
</ul>
</li>
</ul>
</td>
</tr>
</table>
<p><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "แสดง"; var tocHideText = "ซ่อน"; showTocToggle(); } </script><br />
<a name="Network_Infrastructor" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> Network Infrastructor </span></h2>
<ol>
<li> Gateway router&nbsp;: adsl เราเตอร์ทั่วไป กำหนด ip เป็น 192.168.0.2 (เป็นอย่างอื่นได้ 192.168.0.X แต่ต้องตั้งค่าอื่นให้ตรงตามนี้ด้วย) ซึ่ง adsl router แต่ละรุ่นจะมีวิธีตั่งค่า gateway ที่แตกต่างกัน
</li>
<li> Routing server&nbsp;: เนื่องจากคุณสมบัติของ Gateway ถึงแม้จะมันเรียกกันว่า router ก็ตาม แต่ไม่มีคุณสมบัติในการ route หาเส้นทางแต่อย่างใด ดังนั้นจึงจำเป็นต้องใช้ PC หรือเครื่องคอมพิวเตอร์อื่นในการทำการหาเส้นทางแทน ไม่จำเป็นต้องแรง เพราะของผมที่ใช้งานอยู่ก็ PIII ram 128MB ก็ใช้ได้ แต่ควรมี UPS ซักหน่อยเพื่อความเสถียร
</li>
<li> Client&nbsp;: เครื่อง PC หรือ Notebook ของผู้ใช้งาน
</li>
</ol>
<p><a name="Program_Installation_and_Configuration" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> Program Installation and Configuration </span></h2>
<p><a name="Routing_Server" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> Routing Server </span></h3>
<p>ติดตั้งโปรแกรมสำคัญในเรื่อง Routing server ซึ่งในที่นี้จะใช้ OS เป็น Ubunutu(Linux) ซึ่งจะใช้ Linux ตัวอื่นก็ไม่ผิด แต่อาจมี configuration file ของบางโปรแกรมอยู่ไม่ตรงกัน
</p>
<p><a name="Network_Interface_configuration" href="http://wiki.memoball.info/"></a><br />
<h4> <span class="mw-headline"> Network Interface configuration </span></h4>
<pre>$ sudo vim /etc/network/interfaces</pre>
<p>ตั้งค่าเป็น
</p>
<pre>
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static
        address 192.168.0.1
        netmask 255.255.255.0
        network 192.168.0.0
        gateway 192.168.0.2

auto eth0:1
iface eth0:1 inet static
        address 192.168.1.1
        netmask 255.255.255.0
        network 192.168.1.0
        #firewall configuration
        pre-up sh /etc/network/firewall/firewall.sh
</pre>
<p><a name="Network_Firewall" href="http://wiki.memoball.info/"></a><br />
<h4> <span class="mw-headline"> Network Firewall </span></h4>
<p>สร้าง diretory ชื่อ firewall ใน /etc/network/ หรือที่ไหนก็ได้แต่อย่าลืมเปลี่ยนบรรทัดสุดท้านใน interfaces ให้ตรงด้วย
</p>
<pre>
/etc/network$ sudo mkdir firewall
/etc/network$ cd firewall
/etc/network/firewall$ sudo vim torrent-block.iptables
</pre>
<pre>
# Generated by iptables-save v1.4.0 on Sat Jan 10 23:19:36 2009
*filter
:INPUT ACCEPT [1148:92586]
:FORWARD DROP [1106:549432]
:OUTPUT ACCEPT [835:103625]

# open icmp packet
-A FORWARD -i eth0 -p icmp -j ACCEPT
-A FORWARD -i eth0:1 -p icmp -j ACCEPT 

# open forward tcp port
-A FORWARD -p tcp --dport 20 -j ACCEPT
-A FORWARD -p tcp --sport 20 -j ACCEPT
-A FORWARD -p tcp --dport 21 -j ACCEPT
-A FORWARD -p tcp --sport 21 -j ACCEPT
-A FORWARD -p tcp --dport 22 -j ACCEPT
-A FORWARD -p tcp --sport 22 -j ACCEPT
-A FORWARD -p tcp --dport 23 -j ACCEPT
-A FORWARD -p tcp --sport 23 -j ACCEPT
-A FORWARD -p tcp --dport 25 -j ACCEPT
-A FORWARD -p tcp --sport 25 -j ACCEPT
-A FORWARD -p udp --dport 53 -j ACCEPT
-A FORWARD -p udp --sport 53 -j ACCEPT
-A FORWARD -p tcp --dport 53 -j ACCEPT
-A FORWARD -p tcp --sport 53 -j ACCEPT
-A FORWARD -p tcp --dport 80 -j ACCEPT
-A FORWARD -p tcp --sport 80 -j ACCEPT
-A FORWARD -p tcp --dport 443 -j ACCEPT
-A FORWARD -p tcp --sport 443 -j ACCEPT
-A FORWARD -p tcp --dport 88 -j ACCEPT
-A FORWARD -p tcp --sport 88 -j ACCEPT
-A FORWARD -p tcp --dport 135:139 -j ACCEPT
-A FORWARD -p tcp --sport 135:139 -j ACCEPT
-A FORWARD -p tcp --dport 445 -j ACCEPT
-A FORWARD -p tcp --sport 445 -j ACCEPT
-A FORWARD -p tcp -s 192.168.0.0/24 -j ACCEPT
-A FORWARD -p tcp -d 192.168.0.0/24 -j ACCEPT
COMMIT
# Completed on Sat Jan 10 23:19:36 2009

# Generated by iptables-save v1.4.0 on Sat Jan 10 23:19:36 2009
*nat <img src='http://www.memoball.info/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> REROUTING ACCEPT [166:14287] <img src='http://www.memoball.info/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> OSTROUTING ACCEPT [3:337]
:OUTPUT ACCEPT [3:337]
-A POSTROUTING -s 192.168.1.0/24 -o eth0 -j SNAT --to-source 192.168.0.1
COMMIT
# Completed on Sat Jan 10 23:19:36 2009
</pre>
<p><a name="Bash_script" href="http://wiki.memoball.info/"></a><br />
<h4> <span class="mw-headline"> Bash script </span></h4>
<p>สร้าง Bash script อย่างง่ายเพื่อ run command หรือจะเรียกใน shell ตามคำสั่งต่อไปนี้ได้เลย
</p>
<pre>
# Add static static route
# if-UP
route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1 dev eth0
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth0:1
iptables-restore /etc/network/firewall/torrent-block.iptables
</pre>
<p><a name="DHCP" href="http://wiki.memoball.info/"></a><br />
<h4> <span class="mw-headline"> DHCP </span></h4>
<p>เพื่อจะให้เครื่อง server ของเราแจก ip ได้โดยอัตโนมัติ<br />
ติดตั้ง dhcpd3
</p>
<pre>
$ sudo apt-get install dhcp3-server
$ sudo vim /etc/dhcp3/dhcpd.conf
</pre>
<p>ตั้งค่า
</p>
<pre>
# Sample configuration file for ISC dhcpd for Debian
#
# Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as
# configuration file instead of this file.
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name &quot;example.org&quot;;
option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.

#subnet 10.152.187.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

# A slightly different configuration for an internal subnet.
subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.50 192.168.1.130;
  option domain-name-servers 58.64.124.150;
# option domain-name &quot;internal.example.org&quot;;
  option routers 192.168.1.1;
  option broadcast-address 192.168.1.255;
  default-lease-time 600;
  max-lease-time 7200;
}
</pre>
<pre>
$ sudo /etc/init.d/dhcp3-server start
</pre>
<p><a name=".E0.B8.82.E0.B9.89.E0.B8.AD.E0.B8.94.E0.B8.B5_.E0.B8.82.E0.B9.89.E0.B8.AD.E0.B9.80.E0.B8.AA.E0.B8.B5.E0.B8.A2" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> ข้อดี ข้อเสีย </span></h2>
<p><a name=".E0.B8.82.E0.B9.89.E0.B8.AD.E0.B8.94.E0.B8.B5" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> ข้อดี </span></h3>
<ol>
<li> สร้างง่าย
</li>
<li> ต้นทุนต่ำ เพราะไม่ต้องลงทุนมาก มีเครื่องเก่าก็เอามาประยุกต์ใช้ได้
</li>
</ol>
<p><a name=".E0.B8.82.E0.B9.89.E0.B8.AD.E0.B9.80.E0.B8.AA.E0.B8.B5.E0.B8.A2" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> ข้อเสีย </span></h3>
<ol>
<li> ถ้าผู้ใช้มีความรู้มากหน่อย ก็จะสามารถหาช่องทางออกช่องอื่นได้ง่าย เพราะยังดีช่องโหว่อยู่มีเยอะให้ออก
</li>
</ol>
<p><!--<br />
NewPP limit report<br />
Preprocessor node count: 35/1000000<br />
Post-expand include size: 0/2097152 bytes<br />
Template argument size: 0/2097152 bytes<br />
Expensive parser function count: 0/100<br />
--></p>
<p><!-- Saved in parser cache with key memoball_wiki:pcache:idhash:36-0!1!0!!th!2!edit=0 and timestamp 20090825115815 --></p>
<div class="printfooter">
<h5>รับข้อมูลจาก (Reference) : </h5>
<p>จาก WikiBall : <a href="http://wiki.memoball.info/index.php/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B8%A5%E0%B9%87%E0%B8%AD%E0%B8%84_torrent_%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2">http://wiki.memoball.info/index.php/การบล็อค_torrent_อย่างง่าย</a></div>
<div id='catlinks' class='catlinks'>
<div id="mw-normal-catlinks"><a href="http://wiki.memoball.info//index.php/%E0%B8%9E%E0%B8%B4%E0%B9%80%E0%B8%A8%E0%B8%A9:Categories" title="พิเศษ:Categories">หมวดหมู่</a>:&#32;<span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:Network&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:Network (ยังไม่ได้สร้าง)">Network</a></span></div>
</div>
<p>			<!-- end content --></p>
<div class="visualClear"></div>
</p></div>
<p>ส่วนใครจะตั้งเวลาปิดเปิด torrent ก็ใช้ crontab รัน script เอาครับ</p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/03/%e0%b8%81%e0%b8%b2%e0%b8%a3-block-torrent-%e0%b8%ad%e0%b8%a2%e0%b9%88%e0%b8%b2%e0%b8%87%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การติดตั้ง subversion เพื่อใช้กับ trac</title>
		<link>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-subversion-%e0%b9%80%e0%b8%9e%e0%b8%b7%e0%b9%88%e0%b8%ad%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%81%e0%b8%b1/</link>
		<comments>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-subversion-%e0%b9%80%e0%b8%9e%e0%b8%b7%e0%b9%88%e0%b8%ad%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%81%e0%b8%b1/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 07:34:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Trac & SVN]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://memoball.nabzer.com/?p=165</guid>
		<description><![CDATA[เนื่องจากเมื่อลง trac แล้วกลับยังใช้ browse source ไม่ได้ จึงได้หาข้อมูลในส่วนนี้ จึงทำให้รู้ว่า trac นั้น จะ run ตรงส่วนของ browse source เป็นเพียงหน้ากากเท่านั้น แต่จะเพิ่มบางส่วนเท่านั้นคือ mileston และ ticket ซึ่งตัวที่รันจริงๆ จะเป็นตัวจัดการโค้ด Subversion (จะเป็นตัวอื่นก็ได้ ไม่จำกัด) ซึ่งการติดตั้ง Subversion จะอยู่ใน


จาก WikiBall


			
Subversion เป็นโปรแกรมที่ใชัสร้าง และจัดการ version ของ source code ของเรา





เนื้อหา


1 การติดตั้ง

1.1 การใช้งานร่วมกับ apache2


2 การใช้งาน

2.1 สร้าง repository
2.2 นำเข้า (import) project
2.3 การเข้าผ่าน apache
2.4 คู่มือการใช้งาน
2.5 การ config svnserve
2.6 SVN Client


3 svn service [...]]]></description>
			<content:encoded><![CDATA[<p>เนื่องจากเมื่อลง trac แล้วกลับยังใช้ browse source ไม่ได้ จึงได้หาข้อมูลในส่วนนี้ จึงทำให้รู้ว่า trac นั้น จะ run ตรงส่วนของ browse source เป็นเพียงหน้ากากเท่านั้น แต่จะเพิ่มบางส่วนเท่านั้นคือ mileston และ ticket ซึ่งตัวที่รันจริงๆ จะเป็นตัวจัดการโค้ด Subversion (จะเป็นตัวอื่นก็ได้ ไม่จำกัด) ซึ่งการติดตั้ง Subversion จะอยู่ใน<br />
<span id="more-165"></span></p>
<div id="bodyContent">
<h3 id="siteSub"><a href="http://wiki.memoball.info/index.php/Subversion">จาก WikiBall</a></h3>
<div id="contentSub"></div>
<div id="jump-to-nav"></div>
<p>			<!-- start content --></p>
<p>Subversion เป็นโปรแกรมที่ใชัสร้าง และจัดการ version ของ source code ของเรา
</p>
<table id="toc" class="toc" summary="เนื้อหา">
<tr>
<td>
<div id="toctitle">
<h2>เนื้อหา</h2>
</div>
<ul>
<li class="toclevel-1"><a href="./#.E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B8.95.E0.B8.B4.E0.B8.94.E0.B8.95.E0.B8.B1.E0.B9.89.E0.B8.87" ref="toc"><span class="tocnumber">1</span> <span class="toctext">การติดตั้ง</span></a>
<ul>
<li class="toclevel-2"><a href="./#.E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B9.83.E0.B8.8A.E0.B9.89.E0.B8.87.E0.B8.B2.E0.B8.99.E0.B8.A3.E0.B9.88.E0.B8.A7.E0.B8.A1.E0.B8.81.E0.B8.B1.E0.B8.9A_apache2" ref="toc"><span class="tocnumber">1.1</span> <span class="toctext">การใช้งานร่วมกับ apache2</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="./#.E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B9.83.E0.B8.8A.E0.B9.89.E0.B8.87.E0.B8.B2.E0.B8.99" ref="toc"><span class="tocnumber">2</span> <span class="toctext">การใช้งาน</span></a>
<ul>
<li class="toclevel-2"><a href="./#.E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_repository" ref="toc"><span class="tocnumber">2.1</span> <span class="toctext">สร้าง repository</span></a></li>
<li class="toclevel-2"><a href="./#.E0.B8.99.E0.B8.B3.E0.B9.80.E0.B8.82.E0.B9.89.E0.B8.B2_.28import.29_project" ref="toc"><span class="tocnumber">2.2</span> <span class="toctext">นำเข้า (import) project</span></a></li>
<li class="toclevel-2"><a href="./#.E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B9.80.E0.B8.82.E0.B9.89.E0.B8.B2.E0.B8.9C.E0.B9.88.E0.B8.B2.E0.B8.99_apache" ref="toc"><span class="tocnumber">2.3</span> <span class="toctext">การเข้าผ่าน apache</span></a></li>
<li class="toclevel-2"><a href="./#.E0.B8.84.E0.B8.B9.E0.B9.88.E0.B8.A1.E0.B8.B7.E0.B8.AD.E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B9.83.E0.B8.8A.E0.B9.89.E0.B8.87.E0.B8.B2.E0.B8.99" ref="toc"><span class="tocnumber">2.4</span> <span class="toctext">คู่มือการใช้งาน</span></a></li>
<li class="toclevel-2"><a href="./#.E0.B8.81.E0.B8.B2.E0.B8.A3_config_svnserve" ref="toc"><span class="tocnumber">2.5</span> <span class="toctext">การ config svnserve</span></a></li>
<li class="toclevel-2"><a href="./#SVN_Client" ref="toc"><span class="tocnumber">2.6</span> <span class="toctext">SVN Client</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="./#svn_service_file" ref="toc"><span class="tocnumber">3</span> <span class="toctext">svn service file</span></a></li>
<li class="toclevel-1"><a href="./#Troubleshooting" ref="toc"><span class="tocnumber">4</span> <span class="toctext">Troubleshooting</span></a></li>
<li class="toclevel-1"><a href="./#.E0.B8.AD.E0.B8.B7.E0.B9.88.E0.B8.99.E0.B9.86_.E0.B8.97.E0.B8.B5.E0.B9.88.E0.B9.80.E0.B8.81.E0.B8.B5.E0.B9.88.E0.B8.A2.E0.B8.A7.E0.B8.82.E0.B9.89.E0.B8.AD.E0.B8.87" ref="toc"><span class="tocnumber">5</span> <span class="toctext">อื่นๆ ที่เกี่ยวข้อง</span></a></li>
</ul>
</td>
</tr>
</table>
<p><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "แสดง"; var tocHideText = "ซ่อน"; showTocToggle(); } </script><br />
<a name=".E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B8.95.E0.B8.B4.E0.B8.94.E0.B8.95.E0.B8.B1.E0.B9.89.E0.B8.87" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> การติดตั้ง </span></h2>
<p>สำหรับ Ubuntu
</p>
<pre>$ sudo apt-get install apt-get install subversion</pre>
<p><a name=".E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B9.83.E0.B8.8A.E0.B9.89.E0.B8.87.E0.B8.B2.E0.B8.99.E0.B8.A3.E0.B9.88.E0.B8.A7.E0.B8.A1.E0.B8.81.E0.B8.B1.E0.B8.9A_apache2" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> การใช้งานร่วมกับ apache2 </span></h3>
<p>ติดตั้ง apache module
</p>
<pre>$ sudo apt-get install libapache2-svn</pre>
<p>สร้าง diretory ดังตัวอย่าง หรืออย่างอื่นก็ได้
</p>
<pre>
mkdir /var/svn
mkdir /var/svn/repository
</pre>
<p>แก้ไขค่า permission
</p>
<pre>
chown www-data:www-data -R /var/svn/repository
chmod 770 -R /var/svn/repository
</pre>
<p>แก้ไข apache svn module configuration file&nbsp;: <b>/etc/apache2/mods-available/dav_svn.conf</b>
</p>
<pre>
...
SVNParentPath /var/svn/repository
#SVNPath /var/svn/repository
.....
AuthType Basic
AuthName &quot;Subversion Repository&quot;
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
...
</pre>
<p>สร้าง htaccess
</p>
<pre>
htpasswd2 -c /etc/apache2/dav_svn.passwd tester
</pre>
<p>ref&nbsp;: <a href="http://www.debuntu.org/2006/05/20/54-how-to-subversion-svn-with-apache2-and-dav" class="external free" title="http://www.debuntu.org/2006/05/20/54-how-to-subversion-svn-with-apache2-and-dav" rel="nofollow">http://www.debuntu.org/2006/05/20/54-how-to-subversion-svn-with-apache2-and-dav</a>
</p>
<p><a name=".E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B9.83.E0.B8.8A.E0.B9.89.E0.B8.87.E0.B8.B2.E0.B8.99" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> การใช้งาน </span></h2>
<p><a name=".E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_repository" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> สร้าง repository </span></h3>
<p>ตัวอย่างการสร้าง
</p>
<pre>$ svnadmin create /var/svn/repository/example</pre>
<p><a name=".E0.B8.99.E0.B8.B3.E0.B9.80.E0.B8.82.E0.B9.89.E0.B8.B2_.28import.29_project" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> นำเข้า (import) project </span></h3>
<pre>$ svn import /path/to/projectexample file:///var/svn/repository/example/examplev1 -m&quot;initial import&quot; </pre>
<p><a name=".E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B9.80.E0.B8.82.E0.B9.89.E0.B8.B2.E0.B8.9C.E0.B9.88.E0.B8.B2.E0.B8.99_apache" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> การเข้าผ่าน apache </span></h3>
<pre>http://servername/svn/project</pre>
<p><a name=".E0.B8.84.E0.B8.B9.E0.B9.88.E0.B8.A1.E0.B8.B7.E0.B8.AD.E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B9.83.E0.B8.8A.E0.B9.89.E0.B8.87.E0.B8.B2.E0.B8.99" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> คู่มือการใช้งาน </span></h3>
<ol>
<li><a href="http://svnbook.red-bean.com/" class="external text" title="http://svnbook.red-bean.com/" rel="nofollow">SVN Command line 1</a>
</li>
<li><a href="http://www.yolinux.com/TUTORIALS/Subversion.html#COMMAND" class="external text" title="http://www.yolinux.com/TUTORIALS/Subversion.html#COMMAND" rel="nofollow">SVN Command line 2</a>
</li>
<li><a href="http://home.thep.lu.se/~jari/documents/subversion_guidelines/subversion_guidelines.pdf" class="external text" title="http://home.thep.lu.se/~jari/documents/subversion_guidelines/subversion_guidelines.pdf" rel="nofollow">คู่มือการใช้งาน Subversion</a>
</li>
<li><a href="http://www.rapidsvn.org/index.php/Documentation#Linux.2FUnix" class="external text" title="http://www.rapidsvn.org/index.php/Documentation#Linux.2FUnix" rel="nofollow">คู่มือการใช้งาน RapidSVN</a>
</li>
</ol>
<p><a name=".E0.B8.81.E0.B8.B2.E0.B8.A3_config_svnserve" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> การ config svnserve </span></h3>
<p>svnserve คือ daemon สำหรับ svn โดยที่เราสามารถ login ผ่านทาง <a href="http://wiki.memoball.info//index.php/Subversion#SVN_Client" title="Subversion">SVN client</a> ต่างๆ โดยผ่านโปรโตคอล svn
</p>
<pre>
svn://hostname:port/repos
</pre>
<p>ทดสอบรับ daemon แบบ forground โดยใช้คำสั่ง
</p>
<pre>
$ sudo svnserve -d --listen-port=port --foreground -r  root/path
</pre>
<p>เรียกเป็น http ใน browser ถ้าขึ้นในลักษณะนี้แสดงว่ารันได้แล้ว
</p>
<pre>
( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline svndiff1 absent-entries ) ) )
</pre>
<p>ตัว svnserve นี้จะไม่มี file ใน init.d มาให้เราจะต้องสร้างเองดังนี้<br />
<a href="http://wiki.memoball.info//images/8/88/Svnserve.tar.gz" class="internal" title="Svnserve.tar.gz">สื่อ:svnserve.tar.gz</a>
</p>
<p>อย่าลืมตั้งค่า authentication ใน <i>/path/to/repository/conf</i>
</p>
<p><a name="SVN_Client" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> SVN Client </span></h3>
<p>สำหรับที่ผู้ที่ไม่อยากใช้ SVN แบบ command line ใช้แบบ command line ไม่เป็น(เช่นเดียวกับผม) จะมี GUI กระต่ายกับเต่า ให้เลือกใช้ได้ดังนี้
</p>
<ol>
<li><a href="http://tortoisesvn.tigris.org/" class="external text" title="http://tortoisesvn.tigris.org/" rel="nofollow">TortoiseSVN-(Windows)</a>
</li>
<li><a href="http://rapidsvn.tigris.org/" class="external text" title="http://rapidsvn.tigris.org/" rel="nofollow">RapidSVN-(Ubuntu+Mac+Windows)</a>
</li>
</ol>
<p>ref&nbsp;: <a href="http://agaricdesign.com/note/subversion-client-ubuntu-anything-tortoisesvn" class="external free" title="http://agaricdesign.com/note/subversion-client-ubuntu-anything-tortoisesvn" rel="nofollow">http://agaricdesign.com/note/subversion-client-ubuntu-anything-tortoisesvn</a>
</p>
<p><a name="svn_service_file" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> svn service file </span></h2>
<pre>
#!/bin/sh -e
#
# svnserve - brings up the svn server so anonymous users
# can access svn
#

# Get LSB functions
. /lib/lsb/init-functions
. /etc/default/rcS

SVNSERVE=/usr/bin/svnserve
SVN_USER=svn
SVN_GROUP=svn
SVN_REPO_PATH=/var/svn/repository/
SVN_PORT=8000

# Check that the package is still installed
[ -x $SVNSERVE ] || exit 0;

case &quot;$1&quot; in
	start)
		log_begin_msg &quot;Starting svnserve...&quot;
		umask 002
		if start-stop-daemon --start \
		--chuid $SVN_USER:$SVN_GROUP \
		--exec $SVNSERVE \
		-- -d --listen-port=$SVN_PORT -r $SVN_REPO_PATH; then
			log_end_msg 0
		else
			log_end_msg $?
		fi
	;;

	stop)
		log_begin_msg &quot;Stopping svnserve...&quot;
		if start-stop-daemon --stop --exec $SVNSERVE; then
		log_end_msg 0
		else
		log_end_msg $?
		fi
	;;

	restart|force-reload)
		&quot;$0&quot; stop &amp;&amp; &quot;$0&quot; start
	;;

	*)
	echo &quot;Usage: /etc/init.d/svnserve {start|stop|restart|force-reload}&quot;
		exit 1
	;;
esac

exit 0
</pre>
<p><a name="Troubleshooting" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> Troubleshooting </span></h2>
<ul>
<li>import ไม่ได้
</li>
</ul>
<pre>
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///Development/subversion/foo'
</pre>
<p>เหตุการณ์ดังกล่าวเกิดขึ้นได้ 2 กรณี คือ
</p>
<pre> #path ดังกล่าวไม่สามารถเข้าไปได้ เช่น ติด permission
 #ใส่ path กับ URL สรับกัน
</pre>
<p><a name=".E0.B8.AD.E0.B8.B7.E0.B9.88.E0.B8.99.E0.B9.86_.E0.B8.97.E0.B8.B5.E0.B9.88.E0.B9.80.E0.B8.81.E0.B8.B5.E0.B9.88.E0.B8.A2.E0.B8.A7.E0.B8.82.E0.B9.89.E0.B8.AD.E0.B8.87" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> อื่นๆ ที่เกี่ยวข้อง </span></h2>
<p><!--<br />
NewPP limit report<br />
Preprocessor node count: 55/1000000<br />
Post-expand include size: 0/2097152 bytes<br />
Template argument size: 0/2097152 bytes<br />
Expensive parser function count: 0/100<br />
--></p>
<p><!-- Saved in parser cache with key memoball_wiki:pcache:idhash:6-0!1!0!!th!2!edit=0 and timestamp 20090825100730 --></p>
<div class="printfooter">
<h5>รับข้อมูลจาก (Reference) : </h5>
<p>จาก WikiBall : <a href="http://wiki.memoball.info/index.php/Subversion">http://wiki.memoball.info/index.php/Subversion</a></div>
<div id='catlinks' class='catlinks'>
<div id="mw-normal-catlinks"><a href="http://wiki.memoball.info//index.php/%E0%B8%9E%E0%B8%B4%E0%B9%80%E0%B8%A8%E0%B8%A9:Categories" title="พิเศษ:Categories">หมวดหมู่</a>:&#32;<span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:SVN&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:SVN (ยังไม่ได้สร้าง)">SVN</a></span></div>
</div>
<p>			<!-- end content --></p>
<div class="visualClear"></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-subversion-%e0%b9%80%e0%b8%9e%e0%b8%b7%e0%b9%88%e0%b8%ad%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%81%e0%b8%b1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การ configure ให้ Forward packets</title>
		<link>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3-configure-%e0%b9%83%e0%b8%ab%e0%b9%89-forward-packets/</link>
		<comments>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3-configure-%e0%b9%83%e0%b8%ab%e0%b9%89-forward-packets/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 10:17:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://memoball.nabzer.com/?p=88</guid>
		<description><![CDATA[การ configure ให้ ubuntu ของเราสามารถ forwarding packet จากคอมพิวเตอร์เครื่องอื่นไปยัง ip ที่เราต้องการ 
Before:
# Disables packet forwarding
net.ipv4.ip_forward=0

After:
# Enables packet forwarding
net.ipv4.ip_forward=1

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch03_:_Linux_Networking#Configuring_IP_Forwarding
]]></description>
			<content:encoded><![CDATA[<p>การ configure ให้ ubuntu ของเราสามารถ forwarding packet จากคอมพิวเตอร์เครื่องอื่นไปยัง ip ที่เราต้องการ <span id="more-88"></span></p>
<pre style="border =1 ">Before:
# Disables packet forwarding
net.ipv4.ip_forward=0

After:
# Enables packet forwarding
net.ipv4.ip_forward=1
</pre>
<p><a href="http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch03_:_Linux_Networking#Configuring_IP_Forwarding">http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch03_:_Linux_Networking#Configuring_IP_Forwarding</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3-configure-%e0%b9%83%e0%b8%ab%e0%b9%89-forward-packets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การสร้าง iptable</title>
		<link>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%aa%e0%b8%a3%e0%b9%89%e0%b8%b2%e0%b8%87-iptable/</link>
		<comments>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%aa%e0%b8%a3%e0%b9%89%e0%b8%b2%e0%b8%87-iptable/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 05:55:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://memoball.nabzer.com/?p=83</guid>
		<description><![CDATA[
Ubuntu help : 
	https://help.ubuntu.com/community/IptablesHowTo
การใช้คำสั่ง(ภาษาไทย) : 
	http://thaicert.nectec.or.th/paper/firewall/iptables.php
ตัวอย่างการเขียน iptable : 
	http://www.itwizard.info/technology/linux/ubuntu/ubuntu_610_gateway.html

]]></description>
			<content:encoded><![CDATA[<ul>
<li><strong>Ubuntu help : </strong><br />
	<a href="https://help.ubuntu.com/community/IptablesHowTo" target="_blank">https://help.ubuntu.com/community/IptablesHowTo</a></li>
<li><strong>การใช้คำสั่ง(ภาษาไทย) : </strong><br />
	<a href="http://thaicert.nectec.or.th/paper/firewall/iptables.php" target="_blank">http://thaicert.nectec.or.th/paper/firewall/iptables.php</a></li>
<li><strong>ตัวอย่างการเขียน iptable : </strong><br />
	<a href="http://www.itwizard.info/technology/linux/ubuntu/ubuntu_610_gateway.html" target="_blank">http://www.itwizard.info/technology/linux/ubuntu/ubuntu_610_gateway.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%aa%e0%b8%a3%e0%b9%89%e0%b8%b2%e0%b8%87-iptable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
