<?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>Debian Tutorials</title>
	<atom:link href="http://www.debiantutorials.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.debiantutorials.com</link>
	<description>Copy/Paste tutorials for Debian Linux</description>
	<lastBuildDate>Wed, 18 Aug 2010 00:35:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Install and configure MailWatch monitoring tool for MailScanner</title>
		<link>http://www.debiantutorials.com/install-and-configure-mailwatch-monitoring-tool-for-mailscanner/</link>
		<comments>http://www.debiantutorials.com/install-and-configure-mailwatch-monitoring-tool-for-mailscanner/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 00:35:59 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mailscanner]]></category>
		<category><![CDATA[mailwatch]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.com/?p=349</guid>
		<description><![CDATA[MailWatch for MailScanner is a web-based front-end to MailScanner written in PHP, MySQL and JpGraph. It comes with a CustomConfig module for MailScanner which causes MailScanner to log all message data (excluding body text) to a MySQL database which is then queried by MailWatch for reporting and statistics. 
1. Install Apache2, MySql server and PHP5 [...]]]></description>
			<content:encoded><![CDATA[<p>MailWatch for MailScanner is a web-based front-end to MailScanner written in PHP, MySQL and JpGraph. It comes with a CustomConfig module for MailScanner which causes MailScanner to log all message data (excluding body text) to a MySQL database which is then queried by MailWatch for reporting and statistics. </p>
<p>1. Install Apache2, MySql server and PHP5 with required modules. You may already have some or all of these packages installed.</p>
<p><code>apt-get install apache2 php5-cli php5 mysql-server libdbd-mysql-perl php5-gd php5-mysql libapache2-mod-php5<br />
</code><span id="more-349"></span></p>
<p>2. Download the latest version of MailWatch</p>
<p><code>wget http://downloads.sourceforge.net/project/mailwatch/mailwatch/1.0.5/mailwatch-1.0.5.tar.gz<br />
</code></p>
<p><em>At the time this tutorial was written, version 1.0.5 was the latest version. Check this location for latest version: http://sourceforge.net/projects/mailwatch/files/</em></p>
<p>3. Extract and enter the mailwatch directory</p>
<p><code>tar zxvf mailwatch-1.0.5.tar.gz<br />
cd mailwatch-1.0.5<br />
</code></p>
<p>4. Create the database and tables</p>
<p><code>mysql -p < create.sql<br />
</code></p>
<p>5. Create a MySql user used for MailScanner logging (mysql -u root -p)</p>
<p><code>GRANT ALL ON mailscanner.* TO '{username}'@'localhost' IDENTIFIED BY '{password}';<br />
FLUSH PRIVILEGES;<br />
</code></p>
<p><em>Replace {username} and {password} with a username and password of choice.</em></p>
<p>6. Configure the MailScanner logger (pico MailWatch.pm)</p>
<p><code>my($db_user) = '{username}';<br />
my($db_pass) = '{password}';<br />
</code></p>
<p><em>On line 43 and 44, input your MySql user created in step 5</em></p>
<p>7. Move the MailScanner logger to correct directory</p>
<p><code>mv MailWatch.pm /usr/share/MailScanner/MailScanner/CustomFunctions/<br />
</code></p>
<p>8. Edit Mail Scanner config to enable MailWatch logger (pico /etc/MailScanner/MailScanner.conf)</p>
<p><code>Always Looked Up Last = &#038;MailWatchLogging<br />
</code></p>
<p>9. Create a MailWatch web admin user (mysql -u root -p)</p>
<p><code>USE mailscanner;<br />
INSERT INTO users VALUES ('{username}',md5('{password}'),'Administrator name','A','0','0','0','0','0');<br />
</code></p>
<p><em>Replace {username} and {password} with a username and password used to enter the web interface.</em></p>
<p>10. Move the web interface to the web server's root</p>
<p><code>mv mailscanner /var/www/mailwatch<br />
</code></p>
<p>11. Make the temp and cache directories writeable</p>
<p><code>chmod 777 /var/www/mailwatch/temp<br />
chmod 777 /var/www/mailwatch/images/cache<br />
</code></p>
<p>12. Copy the example config file</p>
<p><code>mv /var/www/mailwatch/conf.php.example /var/www/mailwatch/conf.php<br />
</code></p>
<p>13. Configure the web interface (pico /var/www/mailwatch/conf.php)</p>
<p><code>define('DB_USER', '{username}');<br />
define('DB_PASS', '{password}');<br />
define('MAILWATCH_HOME', '/var/www/mailscanner');<br />
</code></p>
<p><em>Type the MySql username and password created in step 5</em></p>
<p>14. Install PEAR PHP framework</p>
<p><code>apt-get install php-pear<br />
</code></p>
<p>15. Install required PEAR packages</p>
<p><code>pear install DB<br />
pear install DB_Pager<br />
pear install Mail_mimeDecode-1.5.1<br />
</code></p>
<p>16. On line 37, add /usr/share/php to the mailwatch include path (pico /var/www/mailwatch/functions.php)</p>
<p><code>ini_set('include_path','.:'.MAILWATCH_HOME.'/pear:'.MAILWATCH_HOME.'/fpdf:'.MAILWATCH_HOME.'/xmlrpc:/usr/share/php');<br />
</code></p>
<p>17. Restart Apache and MailScanner</p>
<p><code>/etc/init.d/apache2 restart<br />
/etc/init.d/mailscanner restart<br />
</code></p>
<p>18. You're all set. Enter the web interface at this location http://yourserver/mailwatch</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/install-and-configure-mailwatch-monitoring-tool-for-mailscanner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing PEAR framework and packages</title>
		<link>http://www.debiantutorials.com/installing-pear-framework-and-packages/</link>
		<comments>http://www.debiantutorials.com/installing-pear-framework-and-packages/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 17:36:49 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=345</guid>
		<description><![CDATA[PEAR is a framework and distribution system for reusable PHP components.
1. Install the PEAR framework
get install php-pear

2. Restart apache
/etc/init.d/apace2 restart

3. Install a PEAR package (optional)
pear install Net_Ping-2.4.5

You can install any PEAR package using this command but in this example we'll install the Net_Ping package
4. Here's a sample PHP code to use the Net_Ping package (optional)
require_once [...]]]></description>
			<content:encoded><![CDATA[<p>PEAR is a framework and distribution system for reusable PHP components.</p>
<p>1. Install the PEAR framework</p>
<p><code>get install php-pear<br />
</code><span id="more-345"></span></p>
<p>2. Restart apache</p>
<p><code>/etc/init.d/apace2 restart<br />
</code></p>
<p>3. Install a PEAR package (optional)</p>
<p><code>pear install Net_Ping-2.4.5<br />
</code></p>
<p><em>You can install any PEAR package using this command but in this example we'll install the Net_Ping package</em></p>
<p>4. Here's a sample PHP code to use the Net_Ping package (optional)</p>
<p><code>require_once "Net/Ping.php";<br />
$ping = Net_Ping::factory();<br />
&nbsp;<br />
$host = 'debiantutorials.com';<br />
$count = 3;<br />
&nbsp;<br />
if (PEAR::isError($ping))<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo $ping->getMessage();<br />
}<br />
else<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;$ping->setArgs(array('count' => $count));<br />
&nbsp;&nbsp;&nbsp;&nbsp;$res = $ping->ping($host);<br />
&nbsp;&nbsp;&nbsp;&nbsp;foreach ($res->_raw_data as $line)<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $line . "\n";<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
</code></p>
<p><em>This code will ping the host debiantutorials.com three times and echo the results</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/installing-pear-framework-and-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring goldfish autoresponder for Postfix</title>
		<link>http://www.debiantutorials.com/configuring-goldfish-autoresponder-for-postfix/</link>
		<comments>http://www.debiantutorials.com/configuring-goldfish-autoresponder-for-postfix/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 13:46:21 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Etch]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Squeeze]]></category>
		<category><![CDATA[autoresponder]]></category>
		<category><![CDATA[goldfish]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=335</guid>
		<description><![CDATA[goldfish is a quite simple autoresponder for Postfix in conjunction with MySQL, written in PHP. It consists of only one PHP file which can be started through a cronjob. 
In this tutorial, it's assumed that you have already installed Postfix with MySql backend using this tutorial: Installing Postfix with MySql backend and SASL for SMTP [...]]]></description>
			<content:encoded><![CDATA[<p>goldfish is a quite simple autoresponder for Postfix in conjunction with MySQL, written in PHP. It consists of only one PHP file which can be started through a cronjob. </p>
<p>In this tutorial, it's assumed that you have already installed Postfix with MySql backend using this tutorial: <a href="http://www.debiantutorials.net/installing-postfix-with-mysql-backend-and-sasl-for-smtp-authentication/">Installing Postfix with MySql backend and SASL for SMTP authentication</a></p>
<p>1. Install PHP5-CLI (Command Line Interpreter) if it's not already installed</p>
<p><code>apt-get install php5-cli<br />
</code><span id="more-335"></span></p>
<p>2. Create a MySql table for goldfish and a user that has only read access to the users table and read/update access to the autoresponder table (mysql -u root -p)</p>
<p><code>USE mail;<br />
&nbsp;<br />
CREATE TABLE autoresponder (<br />
email varchar(255) NOT NULL,<br />
descname varchar(255) default NULL,<br />
`from` date NOT NULL,<br />
`to` date NOT NULL,<br />
message text NOT NULL,<br />
enabled tinyint(4) NOT NULL default '0',<br />
subject varchar(255) NOT NULL,<br />
PRIMARY KEY (email),<br />
FULLTEXT KEY message (message)<br />
) TYPE=MyISAM;<br />
&nbsp;<br />
-- Insert a sample out of office message for the<br />
-- e-mail address email@example.com<br />
-- Goldfish automatically enables and disables the out of office<br />
-- message according to the from and to dates<br />
-- (in this case: 7th of august to 14th of august 2010)<br />
INSERT INTO autoresponder ('email@example.com', 'Your name', '2010-08-07', '2010-08-14', 'Your message', '1', 'Your subject');<br />
&nbsp;<br />
GRANT SELECT,UPDATE ON mail.autoresponder TO '{username}'@'localhost' IDENTIFIED BY '{password}';<br />
GRANT SELECT ON mail.users TO '{username}'@'localhost' IDENTIFIED BY '{password}';<br />
FLUSH PRIVILEGES;<br />
&nbsp;<br />
exit;<br />
</code></p>
<p><em>Replace {username} and {password} with selected username and password that will be used by goldfish</em></p>
<p><em>We'll use the mail database that was created in the Postfix installation tutorial.</em></p>
<p>3. Download goldfish and put it to any location on the server. In this example I'll place it in /usr/local/goldfish</p>
<p><code>mkdir /usr/local/goldfish<br />
wget http://www.remofritzsche.com/projects/goldfish/download/goldfish-1.1-STABLE.tar.gz<br />
tar zxvf goldfish-1.1-STABLE.tar.gz<br />
mv goldfish-1.1-STABLE/* /usr/local/goldfish/<br />
rm goldfish-1.1-STABLE* -rf # Clean up<br />
</code></p>
<p><em>1.1 was the latest stable version when this tutorial was written. Check this location for updated version: http://www.remofritzsche.com/projects/goldfish/download/</em></p>
<p>4. Configure database information in goldfish (pico /usr/local/goldfish/autoresponder.php)</p>
<p><code>/* Database information */<br />
$conf['mysql_host'] = "localhost";<br />
$conf['mysql_user'] = "{username}";<br />
$conf['mysql_password'] = "{password}";<br />
$conf['mysql_database'] = "mail";<br />
</code></p>
<p><em>Input your MySql server information and the login created in step 2. mysql_host should be localhost in most cases and the mysql_database should be mail (if you didn't choose another name for the database when Postfix was installed with MySql backend)</em></p>
<p>5. Configure database queries in goldfish (pico /usr/local/goldfish/autoresponder.php)</p>
<p><code>/* Database Queries */<br />
&nbsp;<br />
# This query has to return the path (`path`) of the corresponding<br />
# maildir-Mailbox with email-address %m<br />
$conf['q_mailbox_path'] = "SELECT CONCAT('/home/vmail/', SUBSTRING_INDEX(email,'@',-1), '/', SUBSTRING_INDEX(email,'@',1), '/') as `path` FROM users WHERE `email` = '%m'";<br />
</code></p>
<p><em>The database queries begin on line 56 in version 1.1. Replace the q_mailbox_path query with the one shown above. The only change is that the table name is changed from view_users to users.</em></p>
<p>6. Make the vmail user the owner of the goldfish directory and make the php file executable. The vmail user was created when you installed Postfix.</p>
<p><code>chown vmail /usr/local/goldfish -R<br />
chmod 700 /usr/local/goldfish/autoresponder.php<br />
</code></p>
<p>7. Create a cronjob to run goldfish every 5 minutes as the vmail user. It must be running as a user that can read the maildir mailboxes currently located in /home/vmail. (crontab -e)</p>
<p><code>*/5 * * * * vmail /usr/local/goldfish/autoresponder.php<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/configuring-goldfish-autoresponder-for-postfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing OpenSSH server with dropbear</title>
		<link>http://www.debiantutorials.com/replacing-openssh-server-with-dropbear/</link>
		<comments>http://www.debiantutorials.com/replacing-openssh-server-with-dropbear/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 20:42:35 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[dropbear]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=331</guid>
		<description><![CDATA[dropbear is a SSH 2 server and client designed to be small enough to be used in small memory environments, while still being functional and secure enough for general use.
It implements most required features of the SSH 2 protocol, and other features such as X11 and authentication agent forwarding.
1. Install dropbear
apt-get install dropbear

2. Stop OpenSSH [...]]]></description>
			<content:encoded><![CDATA[<p>dropbear is a SSH 2 server and client designed to be small enough to be used in small memory environments, while still being functional and secure enough for general use.</p>
<p>It implements most required features of the SSH 2 protocol, and other features such as X11 and authentication agent forwarding.</p>
<p>1. Install dropbear</p>
<p><code>apt-get install dropbear<br />
</code><span id="more-331"></span></p>
<p>2. Stop OpenSSH server (you won't loose your SSH connection)</p>
<p><code>/etc/init.d/ssh stop<br />
</code></p>
<p>2. Enable dropbear (pico /etc/default/dropbear)</p>
<p><code>NO_START=0<br />
</code></p>
<p>3. Start dropbear</p>
<p><code>/etc/init.d/dropbear start<br />
</code></p>
<p>4. Remove OpenSSH server</p>
<p><code>apt-get remove openssh-server<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/replacing-openssh-server-with-dropbear/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Prevent brute force attacks using fail2ban</title>
		<link>http://www.debiantutorials.com/prevent-brute-force-attacks-using-fail2ban/</link>
		<comments>http://www.debiantutorials.com/prevent-brute-force-attacks-using-fail2ban/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 22:38:04 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[fail2ban]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=329</guid>
		<description><![CDATA[fail2ban monitors log files such as /var/log/auth.log and /var/log/apache/access.log and temporarily or persistently bans failure-prone addresses by updating existing firewall rules. Currently, by default, fail2ban supports ssh/apache/vsftpd but configuration can be easily extended for monitoring any other ASCII file.
1. Install fail2ban
apt-get install fail2ban

2. Test by connecting via ssh and making three incorrect password attempts. By [...]]]></description>
			<content:encoded><![CDATA[<p>fail2ban monitors log files such as /var/log/auth.log and /var/log/apache/access.log and temporarily or persistently bans failure-prone addresses by updating existing firewall rules. Currently, by default, fail2ban supports ssh/apache/vsftpd but configuration can be easily extended for monitoring any other ASCII file.</p>
<p>1. Install fail2ban</p>
<p><code>apt-get install fail2ban<br />
</code><span id="more-329"></span></p>
<p>2. Test by connecting via ssh and making three incorrect password attempts. By default fail2ban blocks the IP address for 10 minutes.</p>
<p>You can tail the fail2ban log file to monitor actions:</p>
<p><code>tail -f /var/log/fail2ban.log<br />
</code></p>
<p>Sample results</p>
<p><code>2010-06-21 22:27:58,953 fail2ban.jail   : INFO   Jail 'ssh' started<br />
2010-06-21 22:29:36,430 fail2ban.actions: WARNING [ssh] Ban 192.168.1.18<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/prevent-brute-force-attacks-using-fail2ban/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup DomainKeys Identified Mail (DKIM) in Postfix</title>
		<link>http://www.debiantutorials.com/setup-domainkeys-identified-mail-dkim-in-postfix/</link>
		<comments>http://www.debiantutorials.com/setup-domainkeys-identified-mail-dkim-in-postfix/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 08:39:04 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[dkim]]></category>
		<category><![CDATA[DomainKeys]]></category>
		<category><![CDATA[milter]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=323</guid>
		<description><![CDATA[DomainKeys Identified Mail (DKIM) is a method for email authentication that allows an organization to take responsibility for a message it has sent in a way that can be validated by a recipient. The technique is based on public-key cryptography: Responsibility is claimed by the signer by adding a digital signature to a message's header, [...]]]></description>
			<content:encoded><![CDATA[<p>DomainKeys Identified Mail (DKIM) is a method for email authentication that allows an organization to take responsibility for a message it has sent in a way that can be validated by a recipient. The technique is based on public-key cryptography: Responsibility is claimed by the signer by adding a digital signature to a message's header, the DKIM-Signature header field. The verifier recovers the signer's public key using the DNS, and then verifies that the signed parts have not been altered.</p>
<p>1. Install DKIM filter</p>
<p><code>apt-get install dkim-filter<br />
</code><span id="more-323"></span></p>
<p>2. Create a key for each domain verified</p>
<p><code>mkdir -p /etc/dkim/keys/domain1.com<br />
cd /etc/dkim/keys/domain1.com<br />
dkim-genkey -r -d domain1.com<br />
</code></p>
<p><em>Replace domain1.com with the domain that this mail server should authenticate using DKIM</em></p>
<p>3. Add a line for each domain to dkim-keys.conf file (pico /etc/dkim-keys.conf)</p>
<p><code>*@domain1.com:domain1.com:/etc/dkim/keys/domain1.com/default.private<br />
</code></p>
<p><em>Replace domain1.com with the domain that this mail server should authenticate using DKIM</em></p>
<p>4. Add a TXT record to the DNS for the domain being authenticated using DKIM. The record is automatically created and stored in /etc/dkim/keys/domain1.com/default.txt. You just need to add it to the DNS server. (cat /etc/dkim/keys/domain1.com/default.txt)</p>
<p>Here's a sample output:</p>
<p><code>default._domainkey IN TXT "v=DKIM1; g=*; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8IQNYlS+8jyrbAxNsghsPrWYgOQQWI0Ab4e9MToZYLTBGI41V3Zet5Awrt19nMIUlTpuE+/YVnjP/pu3fgeYkoe6NUzp+oEcWAioQXBmx0njigac7iJ/I0naTP1xTrDacnwsTp/F+lMwGgjiHpaJA7iBmL0AfYMXlTBo5pFog2QIDAQAB" ; ----- DKIM default for domain1.com<br />
</code></p>
<p>Repeat steps 2, 3 and 4 for every domain that this server should authenticate using DKIM.</p>
<p>5. Uncomment line 37 to make DKIM filter use the dkim-keys.conf file to look up domains available (pico /etc/dkim-filter.conf)</p>
<p><code>KeyList                /etc/dkim-keys.conf<br />
</code></p>
<p>6. Add a inet socket that Postfix can communicate with (pico /etc/default/dkim-filter)</p>
<p><code>SOCKET="inet:8891@localhost"<br />
</code></p>
<p>7. Restart DKIM filter</p>
<p><code>/etc/init.d/dkim-filter restart<br />
</code></p>
<p>8. Configure Postfix to query DKIM filter using the socket created earlier. Add these lines to main.cf (pico /etc/postfix/main.cf)</p>
<p><code>milter_default_action = accept<br />
milter_protocol = 2<br />
smtpd_milters = inet:localhost:8891<br />
non_smtpd_milters = inet:localhost:8891<br />
</code></p>
<p>9. Reload Postfix config</p>
<p><code>postfix reload<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/setup-domainkeys-identified-mail-dkim-in-postfix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tuning MySql with MySqlTuner to increase efficiency and performance</title>
		<link>http://www.debiantutorials.com/tuning-mysql-with-mysqltuner-to-increase-efficiency-and-performance/</link>
		<comments>http://www.debiantutorials.com/tuning-mysql-with-mysqltuner-to-increase-efficiency-and-performance/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 08:52:24 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysqltuner]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=319</guid>
		<description><![CDATA[mysqltuner is a high-performance MySQL tuning script written in perl that will provide you with a snapshot of a MySQL server's health. Based on the statistics gathered, specific recommendations will be provided that will increase a MySQL server's efficiency and performance.
1. Install MySqlTuner
apt-get install mysqltuner

2. Run MySqlTuner
mysqltuner

Input your MySql administrative login and password
Please enter your [...]]]></description>
			<content:encoded><![CDATA[<p>mysqltuner is a high-performance MySQL tuning script written in perl that will provide you with a snapshot of a MySQL server's health. Based on the statistics gathered, specific recommendations will be provided that will increase a MySQL server's efficiency and performance.</p>
<p>1. Install MySqlTuner</p>
<p><code>apt-get install mysqltuner<br />
</code><span id="more-319"></span></p>
<p>2. Run MySqlTuner</p>
<p><code>mysqltuner<br />
</code></p>
<p>Input your MySql administrative login and password</p>
<p><code>Please enter your MySQL administrative login:<br />
Please enter your MySQL administrative password:<br />
</code></p>
<p>Here are sample results:</p>
<p><code>-------- General Statistics --------------------------------------------------<br />
[!!] There is a new version of MySQLTuner available<br />
[OK] Currently running supported MySQL version 5.0.51a-24+lenny2-log<br />
[OK] Operating on 32-bit architecture with less than 2GB RAM<br />
&nbsp;<br />
-------- Storage Engine Statistics -------------------------------------------<br />
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster<br />
[--] Data in MyISAM tables: 98M (Tables: 81)<br />
[!!] InnoDB is enabled but isn't being used<br />
&nbsp;<br />
-------- Performance Metrics -------------------------------------------------<br />
[--] Up for: 56d 10h 58m 7s (137M q [28.243 qps], 3M conn, TX: 2B, RX: 1B)<br />
[--] Reads / Writes: 90% / 10%<br />
[--] Total buffers: 2.6M per thread and 106.0M global<br />
[OK] Maximum possible memory usage: 368.5M (18% of installed RAM)<br />
[OK] Slow queries: 0% (75K/137M)<br />
[!!] Highest connection usage: 100%  (101/100)<br />
[OK] Key buffer size / total MyISAM indexes: 64.0M/79.3M<br />
[OK] Key buffer hit rate: 100.0%<br />
[OK] Query cache efficiency: 78.4%<br />
[!!] Query cache prunes per day: 269788<br />
[OK] Sorts requiring temporary tables: 0%<br />
[!!] Temporary tables created on disk: 99%<br />
[OK] Thread cache hit rate: 99%<br />
[!!] Table cache hit rate: 1%<br />
[OK] Open file limit used: 27%<br />
[OK] Table locks acquired immediately: 99%<br />
&nbsp;<br />
-------- Recommendations -----------------------------------------------------<br />
General recommendations:<br />
    Add skip-innodb to MySQL configuration to disable InnoDB<br />
    Reduce or eliminate persistent connections to reduce connection usage<br />
    When making adjustments, make tmp_table_size/max_heap_table_size equal<br />
    Reduce your SELECT DISTINCT queries without LIMIT clauses<br />
    Increase table_cache gradually to avoid file descriptor limits<br />
Variables to adjust:<br />
    max_connections (> 100)<br />
    wait_timeout (< 28800)<br />
    interactive_timeout (< 28800)<br />
    query_cache_size (> 16M)<br />
    tmp_table_size (> 32M)<br />
    max_heap_table_size (> 16M)<br />
    table_cache (> 200)<br />
</code></p>
<p>3. Adjust your MySql config file (/etc/mysql/my.cnf) according to the recommendations. Don't increase or decrease the values too much because it may have negative impact on the server. If this is a production server, just make minor changes each time and test again a few hours/days later and adjust the values again if needed. It may take a few days to figure out the best values for your server.</p>
<p>4. Restart MySql after you have made changes to the config file</p>
<p><code>/etc/init.d/mysql restart<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/tuning-mysql-with-mysqltuner-to-increase-efficiency-and-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing PowerDNS Recursor</title>
		<link>http://www.debiantutorials.com/installing-powerdns-recursor/</link>
		<comments>http://www.debiantutorials.com/installing-powerdns-recursor/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 07:01:21 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[powerdns]]></category>
		<category><![CDATA[recursor]]></category>
		<category><![CDATA[resolving DNS]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=317</guid>
		<description><![CDATA[PowerDNS Recursor is a resolving DNS server, that runs as a separate process. The authoritative pdns_server can be configured to proxy  recursive queries to the recursor, and optionally overlay authoritative zone data.
The Recursor is used by several of the largest Internet providers of the world, including AOL, Shaw Cable and Neuf Cegetel.
1. Install the [...]]]></description>
			<content:encoded><![CDATA[<p>PowerDNS Recursor is a resolving DNS server, that runs as a separate process. The authoritative pdns_server can be configured to proxy  recursive queries to the recursor, and optionally overlay authoritative zone data.</p>
<p>The Recursor is used by several of the largest Internet providers of the world, including AOL, Shaw Cable and Neuf Cegetel.</p>
<p>1. Install the pdns-recursor package</p>
<p><code>apt-get install pdns-recursor<br />
</code><span id="more-317"></span></p>
<p>2. Configure the server to listen to all interfaces and allow queries from the local network (pico /etc/powerdns/recursor.conf)</p>
<p><code>allow-from=192.168.1.0/24<br />
local-address=0.0.0.0<br />
</code></p>
<p><em>Replace 192.168.1.0/24 with your local network or the network allowed to query the resolving NS server.</em></p>
<p>3. Restart the DNS server</p>
<p><code>/etc/init.d/pdns-recursor restart<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/installing-powerdns-recursor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing HAVP (HTTP Antivirus Proxy)</title>
		<link>http://www.debiantutorials.com/installing-havp-http-antivirus-proxy/</link>
		<comments>http://www.debiantutorials.com/installing-havp-http-antivirus-proxy/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 06:50:05 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[clamav]]></category>
		<category><![CDATA[havp]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=315</guid>
		<description><![CDATA[HAVP (HTTP Antivirus Proxy) is a proxy with a ClamAV anti-virus scanner. The main aims are continuous, non-blocking downloads and smooth scanning of dynamic and password protected HTTP traffic. Havp antivirus proxy has a parent and transparent proxy mode. It can be used with squid or standalone.
1. Install HAVP
apt-get install havp

2. Start HAVP if it [...]]]></description>
			<content:encoded><![CDATA[<p>HAVP (HTTP Antivirus Proxy) is a proxy with a ClamAV anti-virus scanner. The main aims are continuous, non-blocking downloads and smooth scanning of dynamic and password protected HTTP traffic. Havp antivirus proxy has a parent and transparent proxy mode. It can be used with squid or standalone.</p>
<p>1. Install HAVP</p>
<p><code>apt-get install havp<br />
</code><span id="more-315"></span></p>
<p>2. Start HAVP if it didn't start after the installation</p>
<p><code>/etc/init.d/havp start<br />
</code></p>
<p>It's ready, by default HAVP listens on port 8080. You can configure your web browser to use the server as a proxy.</p>
<p>You can customize the error pages by editing the html files in this directory: /etc/havp/templates/en/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/installing-havp-http-antivirus-proxy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Configuring port forwarding with rinetd</title>
		<link>http://www.debiantutorials.com/configuring-port-forwarding-with-rinetd/</link>
		<comments>http://www.debiantutorials.com/configuring-port-forwarding-with-rinetd/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 22:05:16 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[rinetd]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=313</guid>
		<description><![CDATA[inetd redirects TCP connections from one IP address and port to another. rinetd is a single-process server which handles any number of connections to the address/port pairs specified in the file /etc/rinetd.conf. Since rinetd runs as a single process using nonblocking I/O, it is able to redirect a large number of connections without a severe [...]]]></description>
			<content:encoded><![CDATA[<p>inetd redirects TCP connections from one IP address and port to another. rinetd is a single-process server which handles any number of connections to the address/port pairs specified in the file /etc/rinetd.conf. Since rinetd runs as a single process using nonblocking I/O, it is able to redirect a large number of connections without a severe impact on the machine. This makes it practical to run TCP services on machines inside an IP masquerading firewall.</p>
<p>1. Install rinetd</p>
<p><code>apt-get install rinetd<br />
</code><span id="more-313"></span></p>
<p>2. Add some forwarding rules (pico /etc/rinetd.conf)</p>
<p><code># bindadress    bindport  connectaddress  connectport<br />
  0.0.0.0       80        209.85.229.104  80  # HTTP<br />
  0.0.0.0       110       209.85.229.109  110 # POP3<br />
  0.0.0.0       143       209.85.229.109  143 # IMAP<br />
</code></p>
<p><em>These rules will forward all http, pop3 and imap connections to Google's web, pop3 and imap servers. It's just an example but it may make more sense to forward for example port 80 on a public IP address to the internal network to a server that does not have a public IP address.</em></p>
<p>3. Restart rinetd</p>
<p><code>/etc/init.d/rinetd restart<br />
</code></p>
<p>Now enter http://youserver in a web browser and you'll see Google search.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/configuring-port-forwarding-with-rinetd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
