<?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>Linux &#8211; Farlock.org</title>
	<atom:link href="https://www.farlock.org/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.farlock.org</link>
	<description>What you want to hack today?</description>
	<lastBuildDate>Fri, 04 Mar 2022 16:59:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.3</generator>
	<item>
		<title>Uptime Contest</title>
		<link>https://www.farlock.org/linux/uptime-contest/</link>
					<comments>https://www.farlock.org/linux/uptime-contest/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 04 Mar 2022 16:51:31 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[uptime]]></category>
		<guid isPermaLink="false">https://www.farlock.org/?p=297</guid>

					<description><![CDATA[ <p>1424 days</p> <p>&#160;</p>]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><img loading="lazy" width="793" height="132" class="wp-image-303" src="https://www.farlock.org/wp-content/uploads/2022/03/Screenshot-2022-03-04-175232.png" alt="" srcset="https://www.farlock.org/wp-content/uploads/2022/03/Screenshot-2022-03-04-175232.png 793w, https://www.farlock.org/wp-content/uploads/2022/03/Screenshot-2022-03-04-175232-300x50.png 300w, https://www.farlock.org/wp-content/uploads/2022/03/Screenshot-2022-03-04-175232-768x128.png 768w, https://www.farlock.org/wp-content/uploads/2022/03/Screenshot-2022-03-04-175232-150x25.png 150w, https://www.farlock.org/wp-content/uploads/2022/03/Screenshot-2022-03-04-175232-400x67.png 400w" sizes="(max-width: 793px) 100vw, 793px" /></figure>



<p>1424 days</p>

<p>&nbsp;</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.farlock.org/linux/uptime-contest/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Automatically clone zone from a bind master</title>
		<link>https://www.farlock.org/linux/automatically-clone-zone-from-a-bind-master/</link>
					<comments>https://www.farlock.org/linux/automatically-clone-zone-from-a-bind-master/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 28 Apr 2017 13:46:40 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[bind replica]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[slave]]></category>
		<guid isPermaLink="false">http://www.farlock.org/?p=289</guid>

					<description><![CDATA[<p>My situation, ns1 and ns2, master and slave. On ns1 I&#8217;ve installed smbind to simply manage my zones.</p> <p>Now I want that ns2 will be automatically updated with the new zones from ns1 but, unfortunately, I wasn&#8217;t able to find anything ready on internet.</p> <p>At the end I wrote a simple script that simply connect [...]]]></description>
										<content:encoded><![CDATA[<p>My situation, ns1 and ns2, master and slave. On ns1 I&#8217;ve installed smbind to simply manage my zones.</p>
<p>Now I want that ns2 will be automatically updated with the new zones from ns1 but, unfortunately, I wasn&#8217;t able to find anything ready on internet.</p>
<p>At the end I wrote a simple script that simply connect to the first machine via ssh, take the bind file with zones, and, if anything changed, adapt it for the slave server, copy in the bind directory and reload bind.</p>
<p>Obviously it needs to be adapted to your needs, I run it every hour.</p>
<blockquote><p>#!/bin/bash</p>
<p>VERSION=&#8221;0.1&#8243;</p>
<p># bind_auto_slave<br />
# Author:  info@farlock.org<br />
#<br />
# Description: copy bind file from master server, edit it and reload bind on slave<br />
#<br />
# ChangeLog: 0.1 &#8211; 28/04/17 &#8211; First Release</p>
<p>MASTER_SERVER=&#8221;ns1.xxx.com&#8221;<br />
MASTER_SERVER_PORT=&#8221;22&#8243;<br />
MASTER_SERVER_USER=&#8221;root&#8221;<br />
MASTER_FILE=&#8221;/etc/smbind/smbind.conf&#8221;</p>
<p>SLAVE_FILE=&#8221;/etc/bind/ns1.conf&#8221;<br />
SED_ARGUMENT=&#8221;s/master;/slave;\n\t\t\tmasters { servers_name; };/&#8221; # Argument that must be passed to sed</p>
<p>#SED_ARGUMENT=&#8221;s/master;/slave;/&#8221;</p>
<p># First of all download file from master<br />
TMP_FILE=$(mktemp)<br />
chmod g+r,o+r $TMP_FILE<br />
scp -q -P $MASTER_SERVER_PORT $MASTER_SERVER:$MASTER_FILE $TMP_FILE<br />
if [ $? -ne 0 ] ; then<br />
echo &#8220;Error downloading file from $MASTER_SERVER&#8221;<br />
exit 11<br />
fi</p>
<p># Execute sed on it<br />
#echo sed $SED_ARGUMENT $TMP_FILE<br />
sed -i &#8220;$SED_ARGUMENT&#8221; $TMP_FILE<br />
if [ $? -ne 0 ] ; then<br />
echo &#8220;Error executing sed on file $TMP_FILE&#8221;<br />
exit 12<br />
fi</p>
<p># Check differences<br />
diff -q $TMP_FILE $SLAVE_FILE &gt; /dev/null<br />
if [ $? -ne 0 ] ; then # files differ<br />
mv $TMP_FILE $SLAVE_FILE<br />
service bind9 reload<br />
if [ $? -ne 0 ] ; then<br />
echo &#8220;Error reloading bind9 on slave server&#8221;<br />
exit 13<br />
fi<br />
else<br />
rm $TMP_FILE<br />
fi</p>
<p>exit 0</p></blockquote>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.farlock.org/linux/automatically-clone-zone-from-a-bind-master/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Renew a Certification Authority that is going to expiry</title>
		<link>https://www.farlock.org/linux/renew-a-certification-authority-that-is-going-to-expiry/</link>
					<comments>https://www.farlock.org/linux/renew-a-certification-authority-that-is-going-to-expiry/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 28 Oct 2016 10:02:12 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CA]]></category>
		<category><![CDATA[CA renew]]></category>
		<category><![CDATA[certification authority]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[openvpn certificate renew]]></category>
		<guid isPermaLink="false">http://www.farlock.org/?p=284</guid>

					<description><![CDATA[<p>Esempio classico: il certificato di openvpn dopo 10 anni scade, il certificato originale era stato creato con easy-rsa</p> <p>È possibile rinnovare il certificato della Certification Authority e del server in scadenza e far si che i client continuino a collegarsi. Nel caso di alcuni software (vedi openvpn), il client dispone anche di copia del certificato [...]]]></description>
										<content:encoded><![CDATA[<p><em><strong>Esempio classico: il certificato di openvpn dopo 10 anni scade, il certificato originale era stato creato con easy-rsa</strong></em></p>
<p>È possibile rinnovare il certificato della Certification Authority e del server in scadenza e far si che i client <strong>continuino a collegarsi.</strong><br />
Nel caso di alcuni software (vedi openvpn), il client dispone anche di copia del certificato server, purtroppo in questo caso andrà comunque inviata la nuova accoppiata (CA + server) al client.<br />
Potremmo comunque installare sul server i nuovi certificati prima della scadenza e rinnovare man mano tutti i clienti senza che nessuno di essi smetta di funzionare.<br />
Passaggi, in questo caso il vecchio certificato era stato prodotto con easy-rsa:</p>
<blockquote><p>cd /etc/openvpn/extern-rsa</p></blockquote>
<p># carichiamo le variabili di easy-rsa (attenzione ai punti):</p>
<blockquote><p>. ./vars</p></blockquote>
<p># Se non abbiamo la csr originale possiamo ricrearla partendo dal certificato e dalla chiave:</p>
<blockquote><p>openssl x509 -x509toreq -in keys/ca.crt -signkey keys/ca.key -out keys/ca_2016.csr</p></blockquote>
<p># Ricreiamo un nuovo certificato CA con una nuova data di scadenza, estensioni per la CA e seriale 00 (attenzione: se il certificato CA non ha questo seriale openssl lo rifiuta, mentre i sistemi microsoft lo accettano <img src="https://s.w.org/images/core/emoji/13.1.0/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> )</p>
<blockquote><p>openssl ca -config /etc/openvpn/extern-rsa/openssl.cnf -out keys/ca_2016.crt -set_serial 0000 -extensions v3_ca -days 7200 -keyfile keys/ca.key -selfsign -infiles keys/ca_2016.csr</p></blockquote>
<p># Ricrieamo ora il certificato per il server, presupponendo che abbiamo ancora il csr, altrimenti possiamo ricrearli con il passaggio sopra.</p>
<blockquote><p>openssl ca -config /etc/openvpn/extern-rsa/openssl.cnf -out keys/extern_2016.crt -extensions server -days 7200 -infiles keys/extern.csr</p></blockquote>
<p><em>Per verificare che tutto sia ok possiamo controllare un certificato già generato e ancora valido con la vecchia CA:</em></p>
<blockquote><p>openssl verify -CAfile keys/ca.crt -verbose keys/test.crt</p></blockquote>
<p>e in seguito con la nuova:</p>
<blockquote><p>openssl verify -CAfile keys/ca_2016.crt -verbose keys/test.crt</p></blockquote>
<p>In entrambi i casi il risultato sarà OK.</p>
<p>Possiamo anche controllare il nuovo certificato server con la vecchia CA e viceversa:</p>
<blockquote><p>openssl verify -CAfile keys/ca.crt -verbose keys/extern_2016.crt<br />
openssl verify -CAfile keys/ca_2016.crt -verbose keys/extern.crt</p></blockquote>
<p>Il risultato sarà sempre OK, se cosi non fosse c&#8217;è stato qualche problema nei passaggi precedenti (attenzione al serial ad esempio)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.farlock.org/linux/renew-a-certification-authority-that-is-going-to-expiry/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Tunnel IPIP between RouterOs and Linux</title>
		<link>https://www.farlock.org/linux/tunnel-ipip-between-routeros-and-linux/</link>
					<comments>https://www.farlock.org/linux/tunnel-ipip-between-routeros-and-linux/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 27 Mar 2014 12:52:37 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mikrotik]]></category>
		<guid isPermaLink="false">http://www.farlock.org/?p=209</guid>

					<description><![CDATA[<p>This is a small tutorial on how to establish an IPIP tunnel between a Linux Debian server and a Mikrotik RouterOs.</p> <p>Linux Machine:</p> ip tunnel add tun0 mode ipip remote &#60;remote_ip_address&#62; local &#60;local_ip_address&#62; ip link set tun0 up ip addr add 192.168.200.1/24 dev tun0 <p>Mikrotik RouterBoard:</p> /interface ipip add local-address=&#60;local_address&#62; remote-address=&#60;remote_address&#62; /ip address add address=192.168.200.2/24 [...]]]></description>
										<content:encoded><![CDATA[<p>This is a small tutorial on how to establish an IPIP tunnel between a Linux Debian server and a Mikrotik RouterOs.</p>
<p>Linux Machine:</p>
<blockquote>
<pre>ip tunnel add tun0 mode ipip remote &lt;remote_ip_address&gt; local &lt;local_ip_address&gt;
ip link set tun0 up
ip addr add 192.168.200.1/24 dev tun0</pre>
</blockquote>
<p>Mikrotik RouterBoard:</p>
<blockquote>
<pre>/interface ipip add local-address=&lt;local_address&gt; remote-address=&lt;remote_address&gt;
/ip address add address=192.168.200.2/24 interface=ipip1</pre>
</blockquote>
<p>Check that there are no rules blocking protocol 4 and 94 input and output.</p>
<p>Try to ping the other end of the tunnel:</p>
<p># ping 192.168.200.2<br />
PING 192.168.200.2 (192.168.200.2) 56(84) bytes of data.<br />
64 bytes from 192.168.200.2: icmp_req=1 ttl=64 time=84.1 ms</p>
<p><strong>It works!</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.farlock.org/linux/tunnel-ipip-between-routeros-and-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>OpenVPN Linux Server &#8211; Router OS Client</title>
		<link>https://www.farlock.org/linux/openvpn-linux-server-router-os-client/</link>
					<comments>https://www.farlock.org/linux/openvpn-linux-server-router-os-client/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 10 Jul 2012 14:36:08 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mikrotik]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[routeros]]></category>
		<guid isPermaLink="false">http://www.farlock.org/?p=195</guid>

					<description><![CDATA[<p>Launch this commands:</p> <p>CATOP=./personalCA</p> <p>CAKEY=./cakey.pem</p> <p>CAREQ=./careq.pem</p> <p>CACERT=./cacert.pem</p> <p>cd /etc/ssl</p> <p>mkdir $CATOP</p> <p>mkdir $CATOP/certs</p> <p>mkdir $CATOP/crl</p> <p>mkdir $CATOP/newcerts</p> <p>mkdir $CATOP/private</p> <p>echo &#8220;00&#8221; &#62; $CATOP/serial</p> <p>echo &#8220;00&#8221; &#62; $CATOP/crlnumber</p> <p>touch $CATOP/index.txt</p> <p>export OPENSSL_CONF=/etc/ssl/essetigiCA.cnf</p> <p>copy /etc/ssl/openssl.cnf to personalCA.cnf and edit OrganizationName, Country, State, ecc fields.</p> <p>Then execute:</p> <p>openssl req -new -keyout $CATOP/private/$CAKEY -out $CATOP/$CAREQ</p> <p>write a complex passhprase [...]]]></description>
										<content:encoded><![CDATA[<p>Launch this commands:</p>
<blockquote><p>CATOP=./personalCA</p>
<p>CAKEY=./cakey.pem</p>
<p>CAREQ=./careq.pem</p>
<p>CACERT=./cacert.pem</p>
<p>cd /etc/ssl</p>
<p>mkdir $CATOP</p>
<p>mkdir $CATOP/certs</p>
<p>mkdir $CATOP/crl</p>
<p>mkdir $CATOP/newcerts</p>
<p>mkdir $CATOP/private</p>
<p>echo &#8220;00&#8221; &gt; $CATOP/serial</p>
<p>echo &#8220;00&#8221; &gt; $CATOP/crlnumber</p>
<p>touch $CATOP/index.txt</p>
<p>export OPENSSL_CONF=/etc/ssl/essetigiCA.cnf</p></blockquote>
<p>copy /etc/ssl/openssl.cnf to personalCA.cnf and edit OrganizationName, Country, State, ecc fields.</p>
<p>Then execute:</p>
<blockquote><p>openssl req -new -keyout $CATOP/private/$CAKEY -out $CATOP/$CAREQ</p></blockquote>
<p>write a complex passhprase and remember it! Without it the CA is completely useless. It asks also for information about the CA.</p>
<p>Now we create our CA, it asks for the passphrase:</p>
<blockquote><p>openssl ca -out $CATOP/$CACERT $CADAYS -extensions v3_ca -days 36500 -keyfile $CATOP/private/$CAKEY -selfsign -infiles $CATOP/$CAREQ</p></blockquote>
<p>Server certificate:</p>
<blockquote><p>openssl req -new -nodes -keyout $CATOP/private/server_key.pem -out $CATOP/certs/server_req.pem</p>
<p>openssl ca -out $CATOP/certs/server_cert.pem -days 13000 -extensions server_cert -infiles $CATOP/certs/server_req.pem</p></blockquote>
<p>client certificate:</p>
<blockquote><p>openssl req -new -nodes -keyout $CATOP/private/client01_key.pem -out $CATOP/certs/client01_req.pem</p>
<div>openssl ca -out $CATOP/certs/client01_cert.pem -days 10000  -infiles $CATOP/certs/client01_req.pem</div>
</blockquote>
<p>That&#8217;s all.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.farlock.org/linux/openvpn-linux-server-router-os-client/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Clonezilla PXE Setup</title>
		<link>https://www.farlock.org/linux/clonezilla-pxe-setup/</link>
					<comments>https://www.farlock.org/linux/clonezilla-pxe-setup/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 25 May 2011 12:38:28 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[clonezilla]]></category>
		<category><![CDATA[ethernet boot]]></category>
		<category><![CDATA[pxe]]></category>
		<guid isPermaLink="false">http://www.farlock.org/?p=171</guid>

					<description><![CDATA[<p>We assume that our server has ip 192.168.171.11, and root directory of tftp server is /srv/tftp</p> <p>Download clonezilla-live-1.2.8-42-i686.zip and clonezilla-live-1.2.8-42-amd64.zip on a local directory and unzip them. Obviously you can use only one of them.</p> <p># wget http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-4.04.tar.bz2</p> <p># tar xjvf syslinux-4.04.tar.bz2 # cp syslinux-4.04/core/pxelinux.0 /srv/tftp/ # cp syslinux-4.04/com32/menu/vesamenu.c32 /srv/tftp # mkdir /srv/tftp/clonezilla-amd64 # cp [...]]]></description>
										<content:encoded><![CDATA[<p>We assume that our server has ip 192.168.171.11, and root directory of tftp server is /srv/tftp</p>
<p>Download clonezilla-live-1.2.8-42-i686.zip and clonezilla-live-1.2.8-42-amd64.zip on a local directory and unzip them. Obviously you can use only one of them.</p>
<blockquote><p># wget http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-4.04.tar.bz2</p>
<p># tar xjvf syslinux-4.04.tar.bz2<br />
# cp syslinux-4.04/core/pxelinux.0 /srv/tftp/<br />
# cp syslinux-4.04/com32/menu/vesamenu.c32 /srv/tftp<br />
# mkdir /srv/tftp/clonezilla-amd64<br />
# cp clonezilla-live-1.2.8-42-amd64/live/* /srv/tftp/clonezilla-amd64/<br />
# mkdir /srv/tftp/clonezilla-i686<br />
# cp clonezilla-live-1.2.8-42-i686/live/* /srv/tftp/clonezilla-i686/<br />
# mkdir /srv/tftp/pxelinux.cfg</p></blockquote>
<p>edit, or add at the end of /etc/dhcp/dhcpd.conf</p>
<blockquote><p>authoritative;</p>
<p>subnet 192.168.171.0 netmask 255.255.255.0 {</p>
<p>range 192.168.171.101 192.168.171.190;</p>
<p>option domain-name &#8220;spsarone.local&#8221;;</p>
<p>option domain-name-servers 192.168.171.11;</p>
<p>option broadcast-address 192.168.171.255;</p>
<p>option routers 192.168.171.1;</p>
<p>next-server 192.168.171.11;</p>
<p>#    get-lease-hostnames true;</p>
<p>option subnet-mask 255.255.255.0;</p>
<p>filename &#8220;/pxelinux.0&#8221;;</p>
<p>}</p></blockquote>
<p>copy attached file default.txt to /srv/tftp/pxelinux.cfg/default</p>
<p><a href="http://www.farlock.org/wp-content/uploads/2011/05/default.txt">default</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.farlock.org/linux/clonezilla-pxe-setup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>openWrt non-standard module compiling</title>
		<link>https://www.farlock.org/nslu2/openwrt-non-standard-module-compiling/</link>
					<comments>https://www.farlock.org/nslu2/openwrt-non-standard-module-compiling/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 13 Oct 2010 09:10:52 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nslu2 Hack]]></category>
		<category><![CDATA[OpenWrt Generic]]></category>
		<guid isPermaLink="false">http://www.farlock.org/?p=157</guid>

					<description><![CDATA[<p>Now I want to use an easycap DC60 device also on my NSLU2 with openwrt, so similar for sheevaplug i&#8217;ve to compile the module.</p> <p>All the operations described here are executed on a standard i686 linux pc (debian).</p> <p>Download openwrt 8.09.2 and default config file:</p> <p>cd /usr/src/nslu2/test svn checkout svn://svn.openwrt.org/openwrt/branches/8.09 8.09.2 wget http://downloads.openwrt.org/kamikaze/8.09.2/ixp4xx/ixp4xx.config</p> <p>go into [...]]]></description>
										<content:encoded><![CDATA[<p>Now I want to use an easycap DC60 device also on my NSLU2 with openwrt, so similar for sheevaplug i&#8217;ve to compile the module.</p>
<p>All the operations described here are executed on a standard i686 linux pc (debian).</p>
<p>Download openwrt 8.09.2 and default config file:</p>
<blockquote><p>cd /usr/src/nslu2/test<br />
svn checkout svn://svn.openwrt.org/openwrt/branches/8.09 8.09.2<br />
wget http://downloads.openwrt.org/kamikaze/8.09.2/ixp4xx/ixp4xx.config</p></blockquote>
<p>go into 8.09.2 directory and</p>
<blockquote><p>make menuconfig</p></blockquote>
<p>now choose &#8220;Load an alternate config file and select ixp4xx.config&#8221; just downloaded, then</p>
<blockquote><p>make V=99</p></blockquote>
<p>When all done we have all things necessary.</p>
<p>In this example we try to compile easycap driver, but you can adapt it to any external modules:</p>
<blockquote><p>cd /usr/src<br />
wget &#8220;http://downloads.sourceforge.net/project/easycapdc60/easycap_dc60.0.7.1.tar.gz?use_mirror=netcologne&#8221;<br />
cd easycap_dc60.0.7.1<br />
make clean</p></blockquote>
<p>Edit src/MakeFile (<em>vi src/Makefile</em>) and replace KERNELDIR line with this:</p>
<blockquote><p>KERNELDIR ?= /usr/src/nslu2/test/8.09.2/build_dir/toolchain-armeb_gcc4.1.2/linux-2.6.26.8/</p></blockquote>
<p>we need to make a symbolic link to resolve an issue:</p>
<blockquote><p>ln -s /usr/src/nslu2/test/8.09.2/build_dir/toolchain-armeb_gcc4.1.2/linux-2.6.26.8/include/config/video/usbvideo.h /usr/src/nslu2/test/8.09.2/build_dir/linux-ixp4xx_generic/linux-2.6.26.8/include/config/video</p></blockquote>
<p>and now compile it:</p>
<blockquote><p>make clean<br />
make ARCH=arm CROSS_COMPILE=/usr/src/nslu2/test/8.09.2/build_dir/armeb/OpenWrt-SDK-ixp4xx-for-Linux-i686/staging_dir/toolchain-armeb_gcc4.1.2/bin/armeb-linux-uclibc-</p></blockquote>
<p>All done! <img src="https://s.w.org/images/core/emoji/13.1.0/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Login to your nslu and copy the new kernel mod in <em>/lib/modules/`uname -r`/kernel/drivers/media/video</em></p>
<blockquote><p>scp 192.168.1.220:/usr/src/easycap_dc60.0.7.1/src/easycap.ko /lib/modules/`uname -r`/kernel/drivers/media/video<br />
depmod -a</p></blockquote>
<p>try to insmod it and enjoy <img src="https://s.w.org/images/core/emoji/13.1.0/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>With new version of easycap 0.8.3 there is some difference, when you have unzipped easycap source edit install.sh and just before the line:</p>
<blockquote><p>make 1&gt;&gt;${WORKDIR}/make.out 2&gt;&gt;${WORKDIR}/make.err</p></blockquote>
<p>insert an <em>exit 0</em>, so the script will terminate there. Now we can launch the script with KERNELDIR as parameter:</p>
<blockquote><p>./install.sh /usr/src/nslu2/test/8.09.2/build_dir/toolchain-armeb_gcc4.1.2/linux-2.6.26.8/</p></blockquote>
<p>now some needed steps:</p>
<blockquote><p>cd /usr/src/nslu2/test/8.09.2/build_dir/toolchain-armeb_gcc4.1.2/linux-2.6.26.8</p></blockquote>
<p>check in .config that MODVERSIONS is disabled and BIG_ENDIAN is enabled!</p>
<blockquote><p># make ARCH=arm CROSS_COMPILE=/usr/src/nslu2/test/8.09.2/build_dir/armeb/OpenWrt-SDK-ixp4xx-for-Linux-i686/staging_dir/toolchain-armeb_gcc4.1.2/bin/armeb-linux-uclibc- prepare<br />
# make ARCH=arm CROSS_COMPILE=/usr/src/nslu2/test/8.09.2/build_dir/armeb/OpenWrt-SDK-ixp4xx-for-Linux-i686/staging_dir/toolchain-armeb_gcc4.1.2/bin/armeb-linux-uclibc- scripts/mod/</p></blockquote>
<p>and then make it:</p>
<blockquote><p>cd /usr/src/easycap_dc60.0.8.3<br />
make ARCH=arm CROSS_COMPILE=/usr/src/nslu2/test/8.09.2/build_dir/armeb/OpenWrt-SDK-ixp4xx-for-Linux-i686/staging_dir/toolchain-armeb_gcc4.1.2/bin/armeb-linux-uclibc-</p></blockquote>
<p>now in src/easycap.ko we have the module for our NSLU2!</p>
<p>Attached here you can find the already compiled module for openwrt kamikaze 8.09.2</p>
<p><a href="/wp-content/uploads/2011/01/easycap.ko">easycap.ko</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.farlock.org/nslu2/openwrt-non-standard-module-compiling/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>BlackBerry Bold 9700 as Linux Modem</title>
		<link>https://www.farlock.org/linux/blackberry-bold-9700-as-linux-modem/</link>
					<comments>https://www.farlock.org/linux/blackberry-bold-9700-as-linux-modem/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 13 Apr 2010 10:59:30 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apn]]></category>
		<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[BlackBerry Linux]]></category>
		<category><![CDATA[Blackberry modem]]></category>
		<category><![CDATA[Bold 9700]]></category>
		<category><![CDATA[Linux GPRS]]></category>
		<category><![CDATA[ppp BlackBerry]]></category>
		<category><![CDATA[tether]]></category>
		<category><![CDATA[tre.it]]></category>
		<guid isPermaLink="false">http://www.farlock.org/?p=140</guid>

					<description><![CDATA[<p>In questa breve guida andrò ad illustrare come usare il nostro BlackBerry Storm 9700 quale modem HSDPA/UMTS/GPRS. Ovviamente il metodo illustrato funziona con (teoricamente) qualsiasi terminale BlackBerry.</p> <p>Il tutto è reso possibile dal software prodotto da NetDirect, Barry. Scarichiamolo a questo indirizzo http://www.netdirect.ca/software/packages/barry.</p> <p>Grazie a barry (in particolare l&#8217;eseguibile è pppob) ci viene fornita una [...]]]></description>
										<content:encoded><![CDATA[<p>In questa breve guida andrò ad illustrare come usare il nostro BlackBerry Storm 9700 quale modem HSDPA/UMTS/GPRS. Ovviamente il metodo illustrato funziona con (teoricamente) qualsiasi terminale BlackBerry.</p>
<p>Il tutto è reso possibile dal software prodotto da NetDirect, Barry. Scarichiamolo a questo indirizzo <a href="http://www.netdirect.ca/software/packages/barry">http://www.netdirect.ca/software/packages/barry</a>.</p>
<p>Grazie a barry (in particolare l&#8217;eseguibile è pppob) ci viene fornita una seriale virtuale sulla quale possiamo poi eseguire il demone ppp.</p>
<p>Nei repository Debian è disponibile una versione pacchettizzata, vi consiglio comunque di scaricare l&#8217;ultima da sourceforge.net (sono presenti già le versioni binarie pacchettizzate).</p>
<p>Installiamo le dipendenze necessarie e i due pacchetti scaricati:</p>
<blockquote><p>apt-get update</p>
<p>apt-get install libboost-serialization1.34.1 libfuse2 libstdc++6 libusb-0.1-4 libgcc1zlib1g</p>
<p>dpkg -i libbarry0_0.16-0_i386.deb barry-util_0.16-0_i386.deb</p></blockquote>
<p>Fatto questo ci troveremo in /etc/chatscripts e in /etc/ppp/peers alcuni file barry-* di esempio. Io personalmente ho preso quello di att-cingular (connessione tramite APN standard) e li ho modificati come segue (il mio provider è Tre).</p>
<p>/etc/ppp/peers/Berry</p>
<blockquote><p>connect &#8220;/usr/sbin/chat -v -f /etc/chatscripts/Berry&#8221;</p>
<p># Authentication options &#8211; no need for ISP to authenticate to us, but<br />
#                          we may need a login here: user/password/name<br />
noauth<br />
user tre<br />
password tre<br />
name Berry</p>
<p># Handle the default route and DNS<br />
#nodefaultroute<br />
defaultroute<br />
usepeerdns<br />
replacedefaultroute</p>
<p># Disable unsupported options<br />
noipdefault<br />
#nodetach<br />
nodeflate<br />
nobsdcomp<br />
noaccomp<br />
#default-asyncmap<br />
nocrtscts<br />
nopcomp<br />
nomagic</p>
<p># This is disabled by default for a Barry config, but this<br />
# has caused connection issues in the past.  If you are unable<br />
# to get an ip with your provider, try commenting this out.<br />
# See:<br />
# http://www.mail-archive.com/barry-devel@lists.sourceforge.net/msg01871.html<br />
#novj</p>
<p>passive</p>
<p>#nomultilink<br />
ipcp-restart 7<br />
ipcp-accept-local<br />
ipcp-accept-remote<br />
lcp-echo-interval 0<br />
lcp-echo-failure 999</p>
<p># Limit size of packets<br />
mtu 1492</p>
<p># Verbosity<br />
debug<br />
#debug debug debug</p>
<p># Call pppob for the USB link<br />
pty &#8220;/usr/sbin/pppob&#8221;</p></blockquote>
<p>/etc/chatscripts/Berry</p>
<blockquote><p>SAY &#8216;Setting abort string\n&#8217;<br />
ABORT ERROR</p>
<p>SAY &#8216;Initializing modem\n&#8217;<br />
#OK AT<br />
&#8221; ATZ</p>
<p>SAY &#8216;Carrier Information\n&#8217;<br />
OK AT+CGDCONT=1,&#8221;IP&#8221;,&#8221;tre.it&#8221;<br />
OK ATI<br />
OK ATDT*99#</p>
<p>SAY &#8216;Connecting\n&#8217;<br />
CONNECT</p></blockquote>
<p>Attenzione, nel file peers/Berry ho commentato l&#8217;opzione &#8220;<strong>novj</strong>&#8220;, altrimenti non mi veniva assegnato l&#8217;indirizzo IP dal provider, fate alcune prove con e senza l&#8217;opzione!</p>
<p>Se il vs provider è diverso basta modificare l&#8217;apn nel file chatscripts/Berry, sostiuite &#8220;tre.it&#8221; con l&#8217;apn corretto (ibox.tim.it per TIM, web.omnitel.it per Vodafone, internet.wind per Wind Privati, internet.wind.biz per Wind Aziende).</p>
<p>Una volta salvati i nuovi file lanciate da riga di comando:</p>
<blockquote><p>pppd call Berry</p></blockquote>
<p>In /var/log/syslog potrete seguire l&#8217;output del demone fino alla corretta assegnazione dell&#8217;indirizzo.</p>
<p>In caso di problemi lanciate il demone ppp con le seguenti opzioni:</p>
<blockquote><p>pppd nodetach debug call Berry</p></blockquote>
<p>In questo modo l&#8217;output vi viene presentato direttamente sullo standard output.</p>
<p><strong>ATTENZIONE</strong>: con il mio Bold l&#8217;eseguibile pppob a volte rimane in esecuzione anche al termine della connessione, così facendo al tentativo successivo non sarà più possibile connettersi. Lanciamo semplicemente questo comando</p>
<blockquote><p>killall -9 pppob</p></blockquote>
<p>prima di ogni connessione, ogni processo appeso verrà terminato e riusciremo a connetterci.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.farlock.org/linux/blackberry-bold-9700-as-linux-modem/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
