<?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>Bass &#039;s Blog (เขียน Blog แบบ บ่นๆ ตามฉบับ นายเบส) &#187; compile</title>
	<atom:link href="http://bass.bns.in.th/tag/compile/feed/" rel="self" type="application/rss+xml" />
	<link>http://bass.bns.in.th</link>
	<description>ที่เขียนเรื่องบ้าๆ บ่อๆ กับความรู้ ของนายเบส ($BASS = &#34;Bass&#34;; print &#34;$BASS = 9Bass&#34;;) ปล. สถาที่นี้เป็นที่ส่วนบุคคล โปรดใช้วิจรญาณในการรับชมด้วยครับ</description>
	<lastBuildDate>Thu, 11 Mar 2010 10:02:09 +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>IPSET Installation With Compile For iptables</title>
		<link>http://bass.bns.in.th/2010/01/01/ipset-installation-with-compile-for-iptables/</link>
		<comments>http://bass.bns.in.th/2010/01/01/ipset-installation-with-compile-for-iptables/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 05:45:11 +0000</pubDate>
		<dc:creator>bass</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[blockbit]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[ipset]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://bass.bns.in.th/?p=449</guid>
		<description><![CDATA[The installation requires the following steps
it is assumed that you have got the kernel source tree, configured and at least the modules compiled
donwload and unpack the source
run KERNEL_DIR= make to compile the userspace tool and the kernel modules
run KERNEL_DIR= make install to install the ipset userspace tool and the kernel modules
In order to use to [...]]]></description>
			<content:encoded><![CDATA[<p>The installation requires the following steps</p>
<p>it is assumed that you have got the kernel source tree, configured and at least the modules compiled<br />
donwload and unpack the source<br />
run KERNEL_DIR= make to compile the userspace tool and the kernel modules<br />
run KERNEL_DIR= make install to install the ipset userspace tool and the kernel modules<br />
In order to use to the set match and SET target<br />
you need iptables 1.4.4 (or above), or<br />
due to the ipset protocol change, you have to recompile iptables before 1.4.4 to get ipset 3.0 (or above) supported:<br />
Copy the file kernel/include/linux/netfilter_ipv4/ip_set.h from the source tree of ipset-3.9 to include/linux/netfilter_ipv4 in the source of iptables<br />
Recompile iptables<br />
and ready!</p>
<p>Refer : <a href="http://ipset.netfilter.org/install.html" rel="nofollow">http://ipset.netfilter.org/install.html</a></p>]]></content:encoded>
			<wfw:commentRss>http://bass.bns.in.th/2010/01/01/ipset-installation-with-compile-for-iptables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile Debian + L7</title>
		<link>http://bass.bns.in.th/2009/11/03/compile-debian-l7/</link>
		<comments>http://bass.bns.in.th/2009/11/03/compile-debian-l7/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 18:40:37 +0000</pubDate>
		<dc:creator>bass</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[blockbit]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[imq]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[layer7]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://bass.bns.in.th/?p=260</guid>
		<description><![CDATA[Debian Lenny Compile Kernel

apt-get install gzip unzip bzip2 patch
apt-get install debhelper screen fakeroot zlib1g-dev build-essential libncurses5-dev kernel-package
apt-get install linux-source-2.6
cd /usr/src/
wget http://downloads.sourceforge.net/project/l7-filter/l7-filter%20kernel%20version/2.22/netfilter-layer7-v2.22.tar.gz
wget http://downloads.sourceforge.net/project/l7-filter/Protocol%20definitions/2009-05-28/l7-protocols-2009-05-28.tar.gz
wget http://www.ssi.bg/~ja/routes-2.6.26-15.diff
wget http://www.linuximq.net/patchs/linux-2.6.26.8-imq-test2.diff
wget http://www.linuximq.net/patchs/iptables-1.4.3.2-imq_xt.diff
wget http://www.netfilter.org/projects/iptables/files/iptables-1.4.3.2.tar.bz2
tar jxf linux-source-2.6.26.tar.bz2
tar zxf netfilter-layer7-v2.22.tar.gz
tar zxf l7-protocols-2009-05-28.tar.gz
tar jxf iptables-1.4.3.2.tar.bz2
ln -sd linux-source-2.6.26 ./linux
cd linux
patch -p1 &#60; /usr/src/netfilter-layer7-v2.22/kernel-2.6.25-2.6.28-layer7-2.22.patch
patch -p1 &#60; /usr/src/routes-2.6.26-15.diff
patch -p1  &#60; /usr/src/linux-2.6.26.8-imq-test2.diff
Networking options &#62; Network packet filtering framework (Netfilter) [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="font-size: large">Debian Lenny Compile Kernel<br />
</span></strong></p>
<p>apt-get install gzip unzip bzip2 patch<br />
apt-get install debhelper screen fakeroot zlib1g-dev build-essential libncurses5-dev kernel-package</p>
<p>apt-get install linux-source-2.6</p>
<p>cd /usr/src/</p>
<p>wget <a href="http://downloads.sourceforge.net/project/l7-filter/l7-filter%20kernel%20version/2.22/netfilter-layer7-v2.22.tar.gz" rel="nofollow">http://downloads.sourceforge.net/project/l7-filter/l7-filter%20kernel%20version/2.22/netfilter-layer7-v2.22.tar.gz</a><br />
wget <a href="http://downloads.sourceforge.net/project/l7-filter/Protocol%20definitions/2009-05-28/l7-protocols-2009-05-28.tar.gz" rel="nofollow">http://downloads.sourceforge.net/project/l7-filter/Protocol%20definitions/2009-05-28/l7-protocols-2009-05-28.tar.gz</a></p>
<p>wget <a href="http://www.ssi.bg/~ja/routes-2.6.26-15.diff" rel="nofollow">http://www.ssi.bg/~ja/routes-2.6.26-15.diff</a></p>
<p>wget <a href="http://www.linuximq.net/patchs/linux-2.6.26.8-imq-test2.diff" rel="nofollow">http://www.linuximq.net/patchs/linux-2.6.26.8-imq-test2.diff</a><br />
wget <a href="http://www.linuximq.net/patchs/iptables-1.4.3.2-imq_xt.diff" rel="nofollow">http://www.linuximq.net/patchs/iptables-1.4.3.2-imq_xt.diff</a></p>
<p>wget <a href="http://www.netfilter.org/projects/iptables/files/iptables-1.4.3.2.tar.bz2" rel="nofollow">http://www.netfilter.org/projects/iptables/files/iptables-1.4.3.2.tar.bz2</a></p>
<p>tar jxf linux-source-2.6.26.tar.bz2<br />
tar zxf netfilter-layer7-v2.22.tar.gz<br />
tar zxf l7-protocols-2009-05-28.tar.gz<br />
tar jxf iptables-1.4.3.2.tar.bz2</p>
<p>ln -sd linux-source-2.6.26 ./linux</p>
<p>cd linux</p>
<p>patch -p1 &lt; /usr/src/netfilter-layer7-v2.22/kernel-2.6.25-2.6.28-layer7-2.22.patch<br />
patch -p1 &lt; /usr/src/routes-2.6.26-15.diff<br />
patch -p1  &lt; /usr/src/linux-2.6.26.8-imq-test2.diff</p>
<p>Networking options &gt; Network packet filtering framework (Netfilter) &gt; Core Netfilter Configuration.<br />
[ ] layer7 match support</p>
<p>[*] select all<br />
[M] select all</p>
<p>&quot;IMQ&quot; target support<br />
&quot;layer7&quot; match support<br />
[ ]   &quot;Layer7&quot; debugging output</p>
<p><strong>ติดตั้งแบบ ด่วน</strong><br />
make &amp;&amp; make modules &amp;&amp; make modules_install &amp;&amp; make install<br />
cd /boot<br />
mkinitramfs -o initrd.img-2.6.26.19 2.6.26.19<br />
update-grub<br />
reboot</p>
<p><strong>สำหรับสร้างเพื่อไป Install ที่อื่น (.deb)</strong></p>
<p>make clean &amp;&amp; make mrproper<br />
make menuconfig</p>
<p>make-kpkg clean<br />
fakeroot make-kpkg &#8211;initrd &#8211;append-to-version=-l7imq kernel_image kernel_headers<br />
cd /usr/src<br />
dpkg -i linux-image-*<br />
dpkg -i linux-headers-*</p>
<p>reboot</p>
<p><strong>iptables v1.4.3.2 เพื่อให้รองรับกับ layer7</strong><br />
cd /usr/src/iptables-1.4.3.2<br />
patch -p1 &lt; /usr/src/iptables-1.4.3.2-imq_xt.diff<br />
cp /usr/src/netfilter-layer7-v2.22/iptables-1.4.3forward-for-kernel-2.6.20forward/* /usr/src/iptables-1.4.3.2/extensions/<br />
./configure &#8211;with-kernel=/usr/src/linux<br />
make<br />
make install<br />
cd /usr/src/l7-protocols-2009-05-28<br />
make install</p>
<p>modprobe xt_layer7</p>
<p><strong>Files rc.local</strong></p>
<p>modprobe xt_rateest<br />
modprobe xt_helper<br />
modprobe xt_dccp<br />
modprobe xt_TPROXY<br />
modprobe xt_NFLOG<br />
modprobe xt_limit<br />
modprobe xt_tcpmss<br />
modprobe xt_connbytes<br />
modprobe xt_owner<br />
modprobe xt_sctp<br />
modprobe xt_DSCP<br />
modprobe xt_MARK<br />
modprobe xt_IMQ<br />
modprobe xt_statistic<br />
modprobe xt_quota<br />
modprobe xt_layer7<br />
modprobe xt_TCPOPTSTRIP<br />
modprobe xt_recent<br />
modprobe xt_NOTRACK<br />
modprobe xt_iprange<br />
modprobe xt_CONNSECMARK<br />
modprobe xt_multiport<br />
modprobe xt_CONNMARK<br />
modprobe xt_RATEEST<br />
modprobe xt_policy<br />
modprobe xt_dscp<br />
modprobe xt_pkttype<br />
modprobe xt_length<br />
modprobe xt_CLASSIFY<br />
modprobe xt_physdev<br />
modprobe xt_SECMARK<br />
modprobe xt_connlimit<br />
modprobe xt_tcpudp<br />
modprobe xt_TRACE<br />
modprobe xt_realm<br />
modprobe xt_conntrack<br />
modprobe xt_string<br />
modprobe xt_hashlimit<br />
modprobe xt_mac<br />
modprobe xt_time<br />
modprobe xt_mark<br />
modprobe xt_comment<br />
modprobe xt_u32<br />
modprobe xt_NFQUEUE<br />
modprobe xt_TCPMSS<br />
modprobe xt_socket<br />
modprobe xt_esp<br />
modprobe xt_state<br />
modprobe xt_connmark<br />
modprobe nf_conntrack_ftp<br />
modprobe nf_conntrack<br />
modprobe nf_nat_ftp<br />
modprobe nf_nat</p>
<p><strong>ทดสอบ Layer7</strong><br />
iptables -m layer7 -h</p>
<p><strong>Block Bit</strong><br />
iptables -A FORWARD -m layer7 &#8211;l7proto bittorrent -j DROP</p>
<p>iptables -nvL | grep LAYER</p>
<p><strong>ทดสอบ IMQ</strong><br />
<a href="http://www.linuximq.net/usage.html" rel="nofollow">http://www.linuximq.net/usage.html</a></p>
<div><strong>Refer :</strong> <a href="http://www.linuximq.net" rel="nofollow">http://www.linuximq.net</a><br />
<a href="http://www.ssi.bg/~ja/" rel="nofollow">http://www.ssi.bg/~ja/</a><br />
<a href="http://l7-filter.sourceforge.net/" rel="nofollow">http://l7-filter.sourceforge.net/</a><br />
<a href="http://mscompute.com/wiki/index.php/Layer7_IMQ_Route_Multipath_Loadbalance_Debian_Lenny_2.6.28" rel="nofollow">http://mscompute.com/wiki/index.php/Layer7_IMQ_Route_Multipath_Loadbalance_Debian_Lenny_2.6.28</a></div>]]></content:encoded>
			<wfw:commentRss>http://bass.bns.in.th/2009/11/03/compile-debian-l7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
