Debian Tutorials Copy/Paste tutorials for Debian Linux

9Nov/091

Adding a sudoer to use sudo on Debian

Sudo allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.

1. Create a new user (optional)

adduser user1

30Oct/090

Installing Dovecot IMAP and POP daemon with MySql backend

Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written primarily with security in mind. Dovecot primarily aims to be a lightweight, fast and easy to set up open source mailserver.

It's assumed that you have already installed and configured Postfix according to this tutorial:
Installing Postfix with MySql backend and SASL for SMTP authentication

1. Install required packages

apt-get install dovecot-imapd dovecot-pop3d

25Oct/090

Installing Courier POP3 and IMAP daemon with MySql backend

The Courier mail transfer agent (MTA) is an integrated mail/groupware server based on open commodity protocols, such as ESMTP, IMAP, POP3, LDAP, SSL, and HTTP. Courier provides ESMTP, IMAP, POP3, webmail, and mailing list services within a single, consistent, framework. In this tutorial we'll only use the Courier POP3 and IMAP services.

It's assumed that you have already installed and configured Postfix according to this tutorial: Installing Postfix with MySql backend and SASL for SMTP authentication

1. Install required packages

apt-get install courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl

25Oct/094

Installing Postfix with MySql backend and SASL for SMTP authentication

Postfix is a free and open source mail transfer agent (MTA). It is intended as a fast, easy-to-administer, and secure alternative to the widely-used Sendmail MTA.

Install and configure Postfix

1. Install Postfix and SASL

apt-get install postfix postfix-mysql libsasl2-modules-sql sasl2-bin libsasl2-2 postfix-tls libpam-mysql
> Internet Site
> host.domain.com

15Oct/090

Automated backups to FTP server using rsync and curlftpfs

Using curlftpfs and FUSE, a ftp site is mapped to the local file system and rsync will backup files to the ftp server automatically.

1. Install required packages

apt-get install curlftpfs rsync

14Oct/090

Securing unencrypted traffic with stunnel

Stunnel can be used to provide secure encrypted connections for clients or servers that do not speak TLS or SSL natively. In this tutorial we'll secure Samba connection but you could use this for other services like SMTP, IMAP, POP3 etc.

If you are securing a service where the client supports encrypting like SMTP, IMAP and POP3 you can skip the client step.

Server

1. Install stunnel

apt-get install stunnel

13Oct/090

Installing and configuring Samba

Samba is a free software re-implementation of SMB/CIFS networking protocol providing file and print services for various Microsoft Windows clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a domain member. It can also be part of an Active Directory domain.

1. Install the base packages

apt-get install samba
> WORKGROUP (Type the workgroup you would like to use here)
> No

4Oct/090

MySql database replication (master/slave)

In this tutorial we'll create a simple one-way master/slave database replication. You must have at least one master and one slave but you can use multiple slaves.

Master

1. Configure master to listen on all ip addresses (pico /etc/mysql/my.cnf)

#bind-address = 127.0.0.1

30Sep/090

Port forwarding with iptables

In this tutorial we'll set up a simple port forwarding (NAT) using iptables.

1. Enable ip forward

echo "1" > /proc/sys/net/ipv4/ip_forward

26Sep/090

Installing ntop network monitoring tool

ntop is a network traffic probe that shows the network usage, similar to what the popular top Unix command does. ntop is based on libpcap and it has been written in a portable way in order to virtually run on every Unix platform and on Win32 as well.

ntop users can use a a web browser (e.g. netscape) to navigate through ntop (that acts as a web server) traffic information and get a dump of the network status. In the latter case, ntop can be seen as a simple RMON-like agent with an embedded web interface.

1. Install required packages

apt-get install ntop