<?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>Matt Hardy</title>
	<atom:link href="http://www.matthardy.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.matthardy.info</link>
	<description>Personal Site and Blog</description>
	<lastBuildDate>Tue, 09 Mar 2010 19:53:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Asterisk / TrixBox &#8211; &#8220;That is not a valid conference number&#8221; problem</title>
		<link>http://www.matthardy.info/2010/asterisk_trixbox-that-is-not-a-valid-conference-number-problem/</link>
		<comments>http://www.matthardy.info/2010/asterisk_trixbox-that-is-not-a-valid-conference-number-problem/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 23:21:30 +0000</pubDate>
		<dc:creator>Matt Hardy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[meetme]]></category>
		<category><![CDATA[trixbox]]></category>

		<guid isPermaLink="false">http://www.matthardy.info/?p=52</guid>
		<description><![CDATA[Recently I ran across a problem with an asterisk setup (trixbox on centos) where the conference rooms did not work. Everything was configured properly, but when trying to enter the conference room and entering the pin number, the lovely woman said &#8220;That is not a valid conference number&#8221;. 
After looking through the logs, I noticed [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I ran across a problem with an asterisk setup (trixbox on centos) where the conference rooms did not work. Everything was configured properly, but when trying to enter the conference room and entering the pin number, the lovely woman said &#8220;That is not a valid conference number&#8221;. </p>
<p>After looking through the logs, I noticed the following error messages:<br />
<code><br />
Mar  4 17:04:20 WARNING[12213] chan_zap.c: Unable to open '/dev/zap/pseudo': No such file or directory<br />
Mar  4 17:04:20 WARNING[12213] app_meetme.c: Unable to open pseudo channel - trying device<br />
Mar  4 17:04:20 WARNING[12213] app_meetme.c: Unable to open pseudo device<br />
</code></p>
<p>After digging around a while, I realized it was because the zaptel drivers did not have a zaptel device to base the timing off of. In this case I needed to install the ztdummy drivers. I looked around but could not find any support for this in trixbox, so I decided to install from scratch.</p>
<p>First I checked out the latest zaptel src code from digiums svn repository and configured it:<br />
<code><br />
cd /usr/src<br />
svn co http://svn.digium.com/svn/zaptel/tags/1.4.2.1 zaptel<br />
</code></p>
<p>When trying to make, it gave errors about needing the linux kernel src, which I installed:<br />
<code><br />
yum install kernel-smp-devel<br />
</code></p>
<p>With this, make went further, but got hung up on :<br />
<code><br />
make[2]: Entering directory `/usr/src/kernels/2.6.9-34.EL-i686  '<br />
CC [M] /usr/src/zaptel/torisa.o<br />
/usr/src/zaptel/torisa.c:132: error: syntax error before "torisa"<br />
/usr/src/zaptel/torisa.c:132: warning: type defaults to `int' in declaration of `torisa'<br />
/usr/src/zaptel/torisa.c:132: error: incompatible types in initialization<br />
/usr/src/zaptel/torisa.c:132: error: initializer element is not constant<br />
</code></p>
<p>This was an error with the kernel headers spinlock.h file. Navigate to the spinlock.h file is located (use uname -r to verify your own kernel version):<br />
<code><br />
vi /usr/src/kernels/2.6.9-34.0.2.EL-smp-i686/include/linux/spinlock.h<br />
</code><br />
and change the line:<br />
<code><br />
#define DEFINE_RWLOCK(x)        rw_lock_t x = RW_LOCK_UNLOCKED<br />
</code><br />
to<br />
<code><br />
#define DEFINE_RWLOCK(x)        rwlock_t x = RW_LOCK_UNLOCKED<br />
</code><br />
(Notice the rw_lock_t vs rwlock_t)</p>
<p>After this, run make, and make should run successfully.<br />
<code><br />
# make<br />
</code></p>
<p>Now when you run make install, it will seem to work but for me was timing out on downloading zaptel firmware from ftp.digium.com. So I edited the Makefile, and commented out these 3 lines:<br />
<code><br />
#ifeq ($(HOTPLUG_FIRMWARE),yes)<br />
#       $(MAKE) -C firmware hotplug-install<br />
#endif<br />
</code></p>
<p>Then make install worked properly.<br />
<code><br />
# make install<br />
</code></p>
<p>Now you should have a working version of zaptel installed.</p>
<p>When you start it, you should get no errors!<br />
<code><br />
[root@asterisk1 zaptel]# /etc/init.d/zaptel start<br />
Loading zaptel framework:                                  [  OK  ]<br />
Waiting for zap to come online...OK<br />
Loading zaptel hardware modules: ztdummy.<br />
Running ztcfg:                                             [  OK  ]<br />
</code></p>
<p>voila!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthardy.info/2010/asterisk_trixbox-that-is-not-a-valid-conference-number-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure OpenVPN to authenticate against Active Directory (LDAP) in Linux</title>
		<link>http://www.matthardy.info/2009/configure-openvpn-to-authenticate-against-active-directory-ldap-in-linux/</link>
		<comments>http://www.matthardy.info/2009/configure-openvpn-to-authenticate-against-active-directory-ldap-in-linux/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 18:30:10 +0000</pubDate>
		<dc:creator>Matt Hardy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.matthardy.info/?p=19</guid>
		<description><![CDATA[I recently had to setup OpenVPN server setup on Linux (Ubuntu 9.04) to authenticate against Active Directory via LDAP. This assumes I already had the OpenVPN server setup and generating keys properly. All I added was the LDAP Authentication with Active Directory.
First, download and extract the openvpn-auth-ldap package from:
http://code.google.com/p/openvpn-auth-ldap/
/tmp$ wget http://openvpn-auth-ldap.googlecode.com/files/auth-ldap-2.0.3.tar.gz
/tmp$ tar xvfz auth-ldap-2.0.3.tar.gz
&#8230;.
Then follow the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to setup OpenVPN server setup on Linux (Ubuntu 9.04) to authenticate against Active Directory via LDAP. This assumes I already had the OpenVPN server setup and generating keys properly. All I added was the LDAP Authentication with Active Directory.</p>
<p>First, download and extract the <em>openvpn-auth-ldap</em> package from:<br />
<a href="http://code.google.com/p/openvpn-auth-ldap/">http://code.google.com/p/openvpn-auth-ldap/</a></p>
<blockquote><p>/tmp$ wget <a href="http://openvpn-auth-ldap.googlecode.com/files/auth-ldap-2.0.3.tar.gz">http://openvpn-auth-ldap.googlecode.com/files/auth-ldap-2.0.3.tar.gz</a><br />
/tmp$ tar xvfz auth-ldap-2.0.3.tar.gz<br />
&#8230;.</p></blockquote>
<p>Then follow the instructions on compiling (note for this you will need to have installed the appropriate compilers for your system. e.g. $ sudo apt-get install build-essential)</p>
<p>To configure, there are a few pre-requiesites:</p>
<ul>
<li>You&#8217;ll need to install re2c from sourcefourge:<br />
<a href="http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/download">http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/download</a></li>
</ul>
<blockquote><p>$ wget <a href="http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/download">http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/download</a><br />
$ tar xvfz re2c-0.13.5.tar.gz<br />
$ cd re2c-0.13.5.tar.gz<br />
$ ./configure<br />
$ make<br />
$ sudo make install</p></blockquote>
<ul>
<li>You&#8217;ll also need to install OpenLDAP from:<br />
<a href="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.19.tgz">ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.19.tgz</a><br />
$ wget <a href="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.19.tgz">ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.19.tgz</a><br />
$ tar xvfz openldap-2.4.19.tgz<br />
$ ./configure &#8211;disable-bdb &#8211;disable-hdb<br />
<em>Need to add disable bdb/hdb flags so it doesn&#8217;t try to install the backend databases<br />
</em>$ make depend<br />
$ sudo make install<br />
Now wait for OpenLDAP to build and install</li>
</ul>
<ul>
<li>You&#8217;ll need the OpenVPN src files. In my case I&#8217;m using Ubuntu, so I went to the /src directory, and downloaded/unpacked them there.<br />
$ cd /src<br />
$ sudo mkdir openvpn<br />
$ cd openvpn<br />
$ sudo apt-get source openvpn<br />
$ tar xvfz openvpn_2.1~rc11.orig.tar.gz</li>
</ul>
<p><BR><br />
Now, on to installing the auth-ldap plugin.  The first thing I noticed when trying to <em>./configure </em>was that it was giving me an error about the &#8220;Objective C preprocessor /lib/cpp&#8221;.  To get around this, I had to install the <em>gobjc</em> package, which wasn&#8217;t included in <em>build-essential</em></p>
<p>After this is installed, you can configure the code for your environment:</p>
<p>$  ./configure &#8211;prefix=/usr/local &#8211;with-openldap=/usr/local &#8211;with-openvpn=/src/openvpn/openvpn-2.1_rc11<br />
This should exit displaying what files have been created, with no error messages.</p>
<p>If that worked properly, you can now build the plugin<br />
$ make<br />
This should exit with no errors, and you should now have the <em>openvpn-auth-ldap.so </em>file in your src directory.</p>
<p>Now, install to the lib folder<br />
$ sudo make install<br />
This will copy the plugin to the <em>/usr/local/lib </em>directory</p>
<p>The next step is to configure your LDAP bind and search strings. I edited the sample auth-ldap.conf file to work with my Active Directory scenario. Here&#8217;s a sample:</p>
<blockquote><p>&lt;LDAP&gt;<br />
# LDAP server URL<br />
URL             <a href="ldap://dc.server.local">ldap://dc.server.local</a></p>
<p># Bind DN (If your LDAP server doesn&#8217;t support anonymous binds)<br />
BindDN          &#8220;cn=testuser,ou=Users,dc=server,dc=local&#8221;</p>
<p># Bind Password<br />
Password       testpassword</p>
<p># Network timeout (in seconds)<br />
Timeout         30</p>
<p>TLSEnable       no<br />
FollowReferrals yes<br />
&lt;/LDAP&gt;</p>
<p>&lt;Authorization&gt;<br />
# where to start search<br />
BaseDN                  &#8220;ou=Users,dc=server,dc=local&#8221;</p>
<p># For active directory, I used sAMAccountName to search by username<br />
# I also configured the original search filter to contain the group membership, instead of using the<br />
# RequireGroup directive below<br />
SearchFilter    &#8220;(&amp;(sAMAccountName=%u)(memberOf= CN=testGroup,OU=Users,DC=server,DC=Local))&#8221;</p>
<p># Require Group Membership<br />
RequireGroup    false<br />
&lt;/Authorization&gt;</p></blockquote>
<p>Then, I copied this file to <em>/etc/openvpn/auth-ldap.cfg<br />
</em><strong>NOTE:</strong> Don&#8217;t save in openvpn folder with .conf extension, or openvpn will try to load that directly!</p>
<p>To test your auth-ldap config against Active Directory, you can use testplugin tool included with the auth-ldap plugin:</p>
<blockquote><p>/tmp/auth-ldap-2.0.3/src$ ./testplugin /etc/openvpn/auth-ldap.cfg<br />
Username: user<br />
Password:<br />
Authorization Succeed!<br />
client-connect succeed!<br />
client-disconnect succeed!</p></blockquote>
<p>If everything works ok, you can then add to openvpn. In your openvpn config, add the line:</p>
<blockquote><p>plugin /usr/local/lib/openvpn-auth-ldap.so auth-ldap.cfg</p></blockquote>
<p>And Restart openvpn</p>
<blockquote><p>sudo /etc/init.d/openvpn restart<br />
* Stopping virtual private network daemon(s)&#8230;                                                               *   Stopping VPN &#8217;server&#8217;                                                                             [ OK ]<br />
* Starting virtual private network daemon(s)&#8230;                                                               *   Autostarting VPN &#8217;server&#8217;                                                                         [ OK ]</p></blockquote>
<p>Now, the server should be good to go.</p>
<p>Next step, the client. Here&#8217;s a client config I used:</p>
<blockquote><p>client<br />
auth-user-pass<br />
dev tun<br />
proto udp<br />
remote vpn.server.com 1194<br />
resolv-retry infinite<br />
nobind<br />
# Downgrade privileges after initialization (non-Windows only)<br />
;user nobody<br />
;group nobody</p>
<p>persist-key<br />
persist-tun<br />
ca ca.crt<br />
cert client.crt<br />
key client.key<br />
ns-cert-type server<br />
comp-lzo<br />
# Set log file verbosity.<br />
verb 3<br />
# Silence repeating messages<br />
;mute 20</p></blockquote>
<p>Now, try to connect with incorrect user:</p>
<blockquote><p>* Starting virtual private network daemon(s)&#8230;<br />
*   Autostarting VPN &#8216;client&#8217;<br />
Enter Auth Username:wrong<br />
Enter Auth Password:<br />
[ OK ]<br />
<a href="mailto:user@user-laptop:/etc/openvpn$">user@user-laptop:/etc/openvpn$</a> egrep AUTH /var/log/daemon.log<br />
Oct 29 14:08:54 user-laptop ovpn-client[7728]: AUTH: Received AUTH_FAILED control message</p></blockquote>
<p>Try again with correct user:</p>
<blockquote><p>* Starting virtual private network daemon(s)&#8230;<br />
*   Autostarting VPN &#8216;client&#8217;<br />
Enter Auth Username:user<br />
Enter Auth Password:<br />
[ OK ]</p></blockquote>
<p>Voila! Worked&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthardy.info/2009/configure-openvpn-to-authenticate-against-active-directory-ldap-in-linux/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Problems with Contact Form 7 for Wordpress not working properly</title>
		<link>http://www.matthardy.info/2009/problems-with-contact-form-7-for-wordpress-not-working-properly/</link>
		<comments>http://www.matthardy.info/2009/problems-with-contact-form-7-for-wordpress-not-working-properly/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 04:58:21 +0000</pubDate>
		<dc:creator>Matt Hardy</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.matthardy.info/?p=16</guid>
		<description><![CDATA[After installing Wordpress, I immediately started customizing with content and plugins. One particular plugin I installed was the Contact Form 7 Plugin 
After installing and configuring, I realized the plugin would give an error message: &#8220;Failed to send your message. Please try later or contact administrator by other way.&#8221; After digging around, I realized the [...]]]></description>
			<content:encoded><![CDATA[<p>After installing Wordpress, I immediately started customizing with content and plugins. One particular plugin I installed was the <a href="http://wordpress.org/extend/plugins/contact-form-7/" target="_blank">Contact Form 7 Plugin </a></p>
<p>After installing and configuring, I realized the plugin would give an error message: &#8220;Failed to send your message. Please try later or contact administrator by other way.&#8221; After digging around, I realized the Contact Form 7 plugin uses the PHP mail() function, which by default uses <em>sendmail</em> to send email. On my server, I had not installed <em>sendmail </em>yet. So after installing that&#8230; no more error message.</p>
<p>Now, after clicking send and waiting a REALLY LONG time, the form said &#8220;Your message was sent successfully. Thanks&#8221;. This was a hopeful message. However, when checking my inbox&#8230; no new messages.</p>
<p>After digging further, I noticed &#8220;DSN: Service unavailable&#8221; error messages in my <em>/var/log/mail.log</em> file, as well as complaints about my hostname being unqualified:</p>
<blockquote><p>Oct 12 00:49:44 lamp sm-mta[3230]: My unqualified host name (lamp) unknown; sleeping for retry<br />
Oct 12 00:49:46 lamp sm-msp-queue[3235]: My unqualified host name (lamp) unknown; sleeping for retry</p></blockquote>
<p>So when using sendmail to send email messages, it&#8217;s best if the hostname of the machine is a FQDN. So I changed my hostname to the FQDN of my server</p>
<blockquote><p># sudo hostname www.matthardy.info</p></blockquote>
<p>and restarted the sendmail service</p>
<blockquote><p># sudo /etc/init.d/sendmail restart</p></blockquote>
<p>Now, sendmail works properly, and the form instantly and successfully sends the email message to my mail server!</p>
<p>Hope that helps some others of you out there having issues.</p>
<p>-Matt</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthardy.info/2009/problems-with-contact-form-7-for-wordpress-not-working-properly/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Wordpress Installation is Easy!</title>
		<link>http://www.matthardy.info/2009/wordpress-installation-is-easy/</link>
		<comments>http://www.matthardy.info/2009/wordpress-installation-is-easy/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 04:20:29 +0000</pubDate>
		<dc:creator>Matt Hardy</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.matthardy.info/?p=14</guid>
		<description><![CDATA[I finally decided to crack down and give WordPress a try for my personal information / blogging site.
The installation documentation was quite accurate as the installation on a new LAMP server took about 5 minutes!
]]></description>
			<content:encoded><![CDATA[<p>I finally decided to crack down and give WordPress a try for my personal information / blogging site.</p>
<p>The installation documentation was quite accurate as the installation on a new LAMP server took about 5 minutes!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthardy.info/2009/wordpress-installation-is-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
