<?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>Bugoff&#039;s blog</title>
	<atom:link href="http://bugoff.be/feed/" rel="self" type="application/rss+xml" />
	<link>http://bugoff.be</link>
	<description>Tips and trics for Directadmin, Nagios, and many more</description>
	<lastBuildDate>Fri, 27 Jan 2012 10:08:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Exim blacklist on directadmin</title>
		<link>http://bugoff.be/2010/07/exim-blacklist-on-directadmin/</link>
		<comments>http://bugoff.be/2010/07/exim-blacklist-on-directadmin/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 20:32:12 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[directadmin]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://bugoff.be/?p=35</guid>
		<description><![CDATA[One of the interesting things in exim is blacklisting, unfortunately this is not enabled by default. To enable blacklisting you need to execute these 3 commands as root on your server: cd /etc/virtual rm use_rbl_domains ln -s domains use_rbl_domains]]></description>
			<content:encoded><![CDATA[<p>One of the interesting things in exim is blacklisting, unfortunately this is not enabled by default.</p>
<p>To enable blacklisting you need to execute these 3 commands as root on your server:</p>
<blockquote><p>cd /etc/virtual<br />
rm use_rbl_domains<br />
ln -s domains use_rbl_domains</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://bugoff.be/2010/07/exim-blacklist-on-directadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a huawei E1750 as a sms gateway</title>
		<link>http://bugoff.be/2010/06/using-a-huawei-e1750-as-a-sms-gateway/</link>
		<comments>http://bugoff.be/2010/06/using-a-huawei-e1750-as-a-sms-gateway/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 20:10:32 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[nagios]]></category>
		<category><![CDATA[huawei]]></category>
		<category><![CDATA[sms]]></category>

		<guid isPermaLink="false">http://bugoff.be/?p=24</guid>
		<description><![CDATA[First we need to install some debian packages we need: apt-get install build-essential libhid-dev bzip2 tcl8.5-dev Because the huawei E1750 has a card reader integrated we need to disable this to use the modem, to do this we need to download Usb-modeswitch. cd /usr/src wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-1.1.4.tar.bz2 wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-20100826.tar.bz2 tar xvjf usb-modeswitch-1.1.4.tar.bz2 tar xvjf usb-modeswitch-data-20100826.tar.bz2 cd [...]]]></description>
			<content:encoded><![CDATA[<p>First we need to install some debian packages we need:</p>
<blockquote><p> apt-get install build-essential libhid-dev bzip2 tcl8.5-dev</p></blockquote>
<p>Because the huawei E1750 has a card reader integrated we need to disable this to use the modem, to do this we need to download Usb-modeswitch.</p>
<blockquote><p>
cd /usr/src<br />
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-1.1.4.tar.bz2<br />
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-20100826.tar.bz2<br />
tar xvjf usb-modeswitch-1.1.4.tar.bz2<br />
tar xvjf usb-modeswitch-data-20100826.tar.bz2<br />
cd usb-modeswitch-1.1.4</p>
<p>make install</p>
<p>cd usb-modeswitch-data-20100826<br />
make install<br />
cp 40-usb_modeswitch.rules /etc/udev/rules.d/<br />
udevadm control &#8211;reload_rules
</p></blockquote>
<p>Edit the file /etc/usb_modeswitch.conf en paste this below the other options.</p>
<blockquote><p># Configuration for the usb_modeswitch package, a mode switching tool for<br />
# USB devices providing multiple states or modes<br />
#<br />
# This file is evaluated by the wrapper script &#8220;usb_modeswitch_dispatcher&#8221;<br />
# in /usr/sbin<br />
# To enable an option, set it to &#8220;1&#8243;, &#8220;yes&#8221; or &#8220;true&#8221; (case doesn&#8217;t matter)<br />
# Everything else counts as &#8220;disable&#8221;</p>
<p># Disable automatic mode switching globally (e.g. to access the original<br />
# install storage)</p>
<p>DisableSwitching=0</p>
<p># Enable logging (results in a extensive report file in /var/log, named<br />
# &#8220;usb_modeswitch_<interface-name>&#8221;</p>
<p>EnableLogging=0</p>
<p>########################################################<br />
;DefaultVendor=  0x12d1<br />
;DefaultProduct= 0&#215;1446</p>
<p>MessageEndpoint = 0&#215;01<br />
MessageContent = &#8220;55534243000000000000000000000011060000000000000000000000000000&#8243;<br />
########################################################
</p></blockquote>
<p>Lets execute usb_modeswitch to disable the card reader</p>
<blockquote><p> usb_modeswitch -v 0x12d1 -p 0&#215;1446 -H -s 5 -c /etc/usb_modeswitch.conf</p></blockquote>
<p>You should get some output like this:</p>
<blockquote><p>
Looking for target devices &#8230;<br />
No devices in target mode or class found<br />
Looking for default devices &#8230;<br />
Found devices in default mode or class (1)<br />
Accessing device 003 on bus 005 &#8230;<br />
Using endpoints 0&#215;01 (out) and 0&#215;81 (in)<br />
Inquiring device details; driver will be detached &#8230;<br />
Looking for active driver &#8230;<br />
No driver found. Either detached before or never attached</p>
<p>SCSI inquiry data (for identification)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Vendor String: HUAWEI<br />
Model String: Mass Storage<br />
Revision String: 2.31<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>USB description data (for identification)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Manufacturer: HUAWEI Technology<br />
Product: HUAWEI Mobile<br />
Serial No.: not provided<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Setting up communication with interface 0 &#8230;<br />
Using endpoint 0&#215;01 for message sending &#8230;<br />
Trying to send message 1 to endpoint 0&#215;01 &#8230;<br />
OK, message successfully sent<br />
Resetting response endpoint 0&#215;81<br />
Error resetting endpoint: -71<br />
Resetting message endpoint 0&#215;01<br />
Error resetting endpoint: -19<br />
Device is gone, skipping any further commands</p>
<p>Checking for mode switch (max. 20 times, once per second) &#8230;<br />
Original device is gone already, not checking<br />
Searching for target devices &#8230;<br />
Searching for target devices &#8230;<br />
Searching for target devices &#8230;<br />
Searching for target devices &#8230;<br />
Searching for target devices &#8230;<br />
Searching for target devices &#8230;<br />
Found correct target device</p>
<p>Mode switch succeeded. Bye.</p></blockquote>
<p>The part where it says: &#8220;Mode switch succeeded. Bye.&#8221; is important, if it doesn&#8217;t say succeeded you&#8217;ll have to look for the right vendor and product id. You can find this by using lsusb.</p>
<p>I&#8217;ll assume it said succeeded and we are going to install everything we need to use gnokii, as i&#8217;m a great fan of MySQL i want to put all my data in mysql so we need a mysql server and the mysql version of gnokii.</p>
<blockquote><p> apt-get install gnokii-smsd-mysql mysql-server-5.0 gnokii-cli</p></blockquote>
<p>Setup the mysql database, create a database + user.</p>
<blockquote><p>
echo &#8220;create database smsd&#8221; | mysql -u root -p</p>
<p>echo &#8220;grant all on smsd.* to gnokii@&#8217;localhost&#8217; identified by &#8216;password&#8217;&#8221; | mysql -u root -p</p></blockquote>
<p>Import the gnokii sql file</p>
<blockquote><p> mysql smsd &lt; /usr/share/doc/gnokii-smsd-mysql/sms.tables.mysql.sql</p></blockquote>
<p>Now our database is ready for use, the next thing we need to do is configure our gnokii.</p>
<p>edit /etc/gnokiirc</p>
<p>(this is what mine looks like)</p>
<blockquote><p># This is a sample ~/.gnokiirc file.  Copy it into your<br />
# home directory and name it .gnokiirc.<br />
# See http://wiki.gnokii.org/index.php/Config for working examples.<br />
#</p>
<p>[global]<br />
port = /dev/ttyUSB0<br />
model = AT-HW<br />
initlength = default<br />
connection = serial<br />
use_locking = yes<br />
serial_baudrate = 9600<br />
handshake = hardware<br />
smsc_timeout = 30</p>
<p>[xgnokii]<br />
allow_breakage = 0</p>
<p>[gnokiid]<br />
bindir = /usr/sbin/</p>
<p>[connect_script]<br />
TELEPHONE = 12345678<br />
[disconnect_script]</p>
<p>[logging]<br />
debug = off<br />
rlpdebug = off<br />
xdebug = off</p></blockquote>
<p>We should be able to see some data of our modem,  lets see if gnokii can identify our huawei:</p>
<blockquote><p>
gnokii &#8211;identify</p>
<p>GNOKII Version 0.6.26<br />
Couldn&#8217;t read /root/.gnokiirc config file.<br />
Couldn&#8217;t read /root/.gnokiirc config file.<br />
IMEI         : 351910046446428<br />
Manufacturer : huawei<br />
Model        : E1750<br />
Product name : E1750<br />
Revision     : 11.126.00.00.00
</p></blockquote>
<p>If you see this everything should work fine.</p>
<p>Now we can test if we can send a sms manually.</p>
<blockquote><p> echo &#8220;testing if we can send sms&#8221; | gnokii &#8211;sendsms +32477&#8230;&#8230;</p></blockquote>
<p>A couple of seconds later you should receive the sms on your phone.</p>
<p>Now lets start the smsd daemon.</p>
<blockquote><p> /usr/sbin/smsd -u gnokii -p password -d smsd -m mysql -f /var/log/smsd/smsd.log &amp;</p></blockquote>
<p>And fill in some data in our outbox.</p>
<blockquote><p> mysql smsd<br />
 insert into outbox(number,text,dreport) values (&#8216;+32477&#8230;&#8230;&#8217;,'testing if we can send from gnokii-smsd&#8217;,1);</p></blockquote>
<p>You should receive a text message shortly</p>
]]></content:encoded>
			<wfw:commentRss>http://bugoff.be/2010/06/using-a-huawei-e1750-as-a-sms-gateway/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Faster way to install directadmin</title>
		<link>http://bugoff.be/2010/04/faster-way-to-install-directadmin/</link>
		<comments>http://bugoff.be/2010/04/faster-way-to-install-directadmin/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 17:33:07 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[directadmin]]></category>
		<category><![CDATA[custombuild]]></category>
		<category><![CDATA[vds]]></category>

		<guid isPermaLink="false">http://bugoff.be/?p=8</guid>
		<description><![CDATA[Sometimes I need to install directadmin on our vds servers, as we don’t use templates for this I was looking for an easy and faster way to install new servers. A couple of weeks ago I found the solution and i thought I’d share it. apt-get install gcc g++ debianutils binutils make autoconf automake vim [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes I need to install directadmin on our vds servers, as we don’t use templates for this I was looking for an easy and faster way to install new servers.<br />
A couple of weeks ago I found the solution and i thought I’d share it.</p>
<blockquote><p>apt-get install gcc g++ debianutils binutils make autoconf automake vim pwgen<br />
wget <a title="Directadmin setup" href="http://www.directadmin.com/setup.sh" target="_blank">http://www.directadmin.com/setup.sh</a><br />
chmod +x setup.sh<br />
mkdir -p /usr/local/directadmin/custombuild<br />
wget<a title="options.conf" href="http://bugoff.be/wp-content/uploads/2010/04/options.conf" target="_blank"> http://bugoff.be/wp-content/uploads/2010/04/options.conf</a> -O /usr/local/directadmin/custombuild/options.conf<br />
echo 1.2 &gt; /root/.custombuild<br />
./setup.sh &lt;User ID&gt; &lt;License id&gt; &lt;servername&gt; &lt;eth&gt;</p></blockquote>
<p>This will install your directadmin server with my options.conf file, correct the options to what you want. I always install my servers using php-cgi.</p>
]]></content:encoded>
			<wfw:commentRss>http://bugoff.be/2010/04/faster-way-to-install-directadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mijn eerste blogpostje</title>
		<link>http://bugoff.be/2010/04/mijn-eerste-blogpostje/</link>
		<comments>http://bugoff.be/2010/04/mijn-eerste-blogpostje/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 14:13:02 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://bugoff.be/?p=6</guid>
		<description><![CDATA[Hoera! Mijn eerste blogpost op mijn nieuwe blog.]]></description>
			<content:encoded><![CDATA[<p>Hoera! Mijn eerste blogpost op mijn nieuwe blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://bugoff.be/2010/04/mijn-eerste-blogpostje/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

