Archive for September, 2007

Sep 28 2007

20 ways to Secure your Apache Configuration

Published by admin under Apache

This is a pretty good basic/intermediate Howto written by Pete Freitag, who  is a software engineer, and web developer from central New York.  The article is slightly outdated (after all, it was written in 2005), yet extremely useful for those who want to run their own Apache web server. Click here for the location of the tutorial.
The only thing that I would like to add, is that even seasoned sysadmins sometimes forget to implement basic stuff described in this tutorial. Go figure!

No responses yet

Sep 27 2007

How to set up Squirrelmail (Webmail)

Published by admin under Sendmail

Ok, so you installed and set up Sendmail and Dovecot and they are working in sync without any problems. What’s next?

Here comes webmail. If you don’t want a workhorse, nothing fancy (and sometimes confusing), your best bet is Squirrelmail - PHP based web application that runs on the Apache server and allows your users the ability to log in and read their email from any remote location through their favorite browser.  As I already mentioned, Squirrelmail supports only IMAP mailboxes (no POP3) . Yet, this webmail package has many extra plugin modules that have been written for it, and its simply a matter of downloading the plugin and running a configuration script; its that easy.

The package has two configuration files, one that enables the application for Apache and another containing the main PHP settings. The Apache configuration details an alias that points to the location of the main SquirrelMail directory, this would be viewed at http://localhost/webmail.

Location of the configuration file is at /etc/httpd/conf.d/squirrelmail.conf   And the main PHP configuration file is located at /etc/squirrelmail/config.php

The PHP settings are fairly easy to understand just by looking at them. You should only need to worry about the domain name ($domain), where the imap mailboxes are located ($imapServerAddress), and where to send outgoing emails for processing ($smtpServerAddress). If the webmail application is being run on the email server (like we’re doing), then leave the settings for localhost.

$domain                 = ‘example.com’;
$imapServerAddress      = ‘localhost’;
$imapPort               = 143;              <– plain IMAP protocol running on localhost (server)
$useSendmail            = true;
$smtpServerAddress      = ‘localhost’;
$smtpPort               = 25;
$sendmail_path          = ‘/usr/sbin/sendmail’;
$pop_before_smtp        = false;
$imap_server_type       = ‘uw’;

One of the big queries that always gets asked about any webmail system, is how to change the size of the file attachments users can send. Then look no further, this in fact is a PHP setting. You need to change the setting in the main PHP ini file, and it should be set to the same value the mail server is configured to accept.

Find the following separate 3 lines in the file /etc/php.ini and change the defaults to your desired size.

post_max_size = 30M
upload_max_filesize = 30M
memory_limit = 64M

That is all. You Squirrelmail should now be configured. Enjoy.

No responses yet

Sep 26 2007

How to format external USB Drive to Fat 32

Published by admin under Linux Administration

When I purchased my first external USB drive, I wanted immediately to add it to my Linux system.  Yet, no matter how hard I tried, rebooting my hard drive over and over again, Linux just did not want to automatically recognize my new, shiny USB drive.

I spent several hours on Internet searching for answers, but could not find an easy one. I just did not know what else I could do. Thank heaven for good friends! One of them helped me. And the answer was so easy, that I purchased 2 more external hard drives and added them to the same system.

Here is the answer. Type the following:

fdisk /dev/sda
Command (m for help): p

Disk /dev/sda: 128 MB, 128974848 bytes
4 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 248 * 512 = 126976 bytes

Device Boot      Start         End      Blocks   Id  System

Command: n  “Create new partition!”
p           “Create primary partition!”
Partition number (1-4): 1
First cylinder: (enter for default)
Last cylinder:  (enter for default)
Command: t
Hex code (type L to list codes): b
Command: “Make partition #1 active!”
Partition number (1-4): 1
Command: p

Disk /dev/sda: 128 MB, 128974848 bytes
4 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 248 * 512 = 126976 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1015      125829    b  FAT32

Command: w  “Write table to disk and exit!”

Format the USB drive with a FAT filesystem.

mkdosfs -F 32 /dev/sda1  “It will work with FAT32″

That is all there is to it, really…

No responses yet

Sep 21 2007

Free DNS Tools

Published by admin under DNS

After you completed reading the tutorial and successfully set up your DNS server, you start wondering how to tighten the security of your Bind and prepare against these nasty DNS attacks that you were reading about. Not to worry, a great site provides you with free DNS tools that will help you figure out who is “knocking at your door” in the middle of the night. Use these tools wisely.

No responses yet

Sep 21 2007

Bind Configuration

Published by admin under DNS

Another great Howto that describes how to configure quickly home-based DNS Server. In fact, it is more than a simple tutorial. The author goes to great pains to explain what DNS and Bind are, how to use DNS domains and a lot of other useful information. This may save you a lot of money, because I find this tutorial better than several books on DNS topics that I purchased.  And, trust me, these books were not cheap.

No responses yet

Sep 19 2007

How to configure Sendmail

Published by admin under Sendmail

I just love these quick Howto tutorials, especially if they make sense not only for a corporate sysadmin, but also for a regular guy with home DSL and one IP address who wants to run a decent e-mail server. Sendmail was always my preferred e-mail server among others. I tried Postfix, Qmail and Exim, each of them has its own benefits and drawbacks. Yet, Sendmail works for me fine for all those years.  Here is a very detailed tutorial that will set you up and running your own Sendmail server at no time.

No responses yet

Sep 19 2007

Linux commands

Published by admin under Terminal

If you need to find out quickly what a certain Linux/Unix command means, this manual comes really hand. It will provide you with all commands from A to Z, and will give you brief, but powerful explanation at no time.

No responses yet

Sep 18 2007

HowtoForge site tutorials

Published by admin under Linux Administration

I can not stress enough the importance of HowtoForge site where you can find almost anything on all Linux flavors, servers, desktops and e.t.c. The abundance of topics sometimes makes the site cluttered with information, and, sometimes, it is hard to find the issues that you are dealing with in a short time. Nevertheless, I highly recommend this site to any Linux/Unix enthusiast.

No responses yet

Sep 17 2007

This Magical Virtualmin

Published by admin under Linux Administration

If you want to have a gerat inexpensive web server administration tool for Web Hosting and virtual hosts, then you gotta choose Virtualmin. I like it because it can be integrated with Webmin and it can be used separately because it has its own web server. There is a free edition that you can try at webmin.com or you can go and download the paid edition for as cheap as $69.

There are some drawbacks, of course. Especially, for those sysadmins who are using Sendmail as a main e-mail server, because Virtualmin chose Postfix instead, for some unknown to me reasons. But there are some advantages as well, because Virtualadmin inclluded Postgres db server recently in addition to traditionally used MySQL. Anyways, it is for use to decide. Click here to download Virtualmin. There is also an interesting video and extensive documentation that you can go through.

(Here is an update. In its latest commercial and even GPL versions, you can use Sendmail instead of Postfix. You will have to do some adjustments in configuration, though. Virtualmin is getting pretty good and the pricing of the commercial version is still extremely inexpensive. Way to go!)

No responses yet

Sep 17 2007

Linux File System Quotas

Published by admin under Linux Administration

If you are running your own web hosting, it is important to know how to set file system quotas. If you service other companies or users through your email server, this skill will save you a lot of grief and space on your hard drive. Basically, setting right file system quotas allows sysadmin to allocate a maximum amount of disk space a user or group may use. It can be flexible in its adherence to the rules assigned and is applied per filesystem.

Read the rest in this nice tutorial that I found and used when I was setting up my own file system quotas for servers.  This site has other useful tutorials as well.

No responses yet

Next »