Vous êtes sur la page 1sur 31

GNU General Public License

La Licencia Pblica General de GNU o ms conocida por su nombre en ingls GNU General Public License o simplemente sus siglas del ingls GNU GPL, es una licencia creada por la Free Software Foundation en 1989 (la primera versin), y est orientada principalmente a proteger la libre distribucin, modificacin y uso de software. Su propsito es declarar que el software cubierto por esta licencia es software libre y protegerlo de intentos de apropiacin que restrinjan esas libertades a los usuarios.

Ubuntu 11.04 [ISPConfig 3]


Este tutorial muestra cmo preparar un Ubuntu 11.04 (Natty Narwhal) del servidor para la instalacin de ISPConfig 3 , y cmo instalar ISPConfig 3. ISPConfig 3 es un panel de control de alojamiento web que te permite configurar los siguientes servicios a travs de un navegador web: servidor web Apache, servidor de correo Postfix, MySQL, servidor de nombres BIND o MyDNS, PureFTPd, SpamAssassin, ClamAV, y muchos ms. Por favor, tenga en cuenta que esta configuracin no funciona para ISPConfig 2 ! Es vlido para ISPConfig 3 slo! Para instalar el sistema se necesita lo siguiente: el servidor de Ubuntu 11.04 CD, disponible aqu: http://releases.ubuntu.com/releases/11.04/ubuntu-11.04server-i386.iso (i386) ohttp://releases.ubuntu.com/releases/11.04/ ubuntu-11.04-serveramd64.iso (x86_64)

una conexin rpida a Internet.

2 Nota preliminar
En este tutorial se utiliza el nombre de host server1.example.com con la direccin IP 192.168.0.100 y la puerta de enlace 192.168.0.1 . Estos valores pueden ser diferentes para usted, as que tienes que reemplazarlos en su caso.

3 El sistema base
Inserte el CD de instalacin de Ubuntu en tu sistema y arrancar desde l. Seleccione su idioma:

continuacin,

seleccione Instalar

Ubuntu

Elija su idioma nuevo (?)

Server :

Elija su idioma nuevo (?)

A continuacin, seleccione su ubicacin:

Si ha seleccionado una combinacin poco frecuente de la lengua y la ubicacin (como el Ingls como el idioma y Alemania, como la ubicacin, como en mi caso), el instalador le puede decir que no hay lugar definido para esta combinacin, en este caso manualmente. Puedo seleccionar es_ES.UTF-8 aqu: usted tiene para seleccionar la localizacin

Elija un diseo de teclado (se le pedir que pulsar unas pocas teclas, y el instalador intentar detectar la distribucin del teclado sobre la base de las teclas que presiona):

El programa de instalacin comprueba el CD de instalacin, su hardware y configura la red con DHCP si hay un servidor DHCP en la red:

Introduzca el nombre de host. En este ejemplo, mi sistema se llama server1.example.com , por lo que entrar en server1 :

Por favor, compruebe si el instalador detecta la zona horaria correcta. Si es as, seleccione S , de lo contrario no :

Ahora usted tiene que particionar el disco duro. Por razones de simplicidad selecciono Guiado - utilizar todo el disco y configurar LVM - esto crear un grupo de volmenes con dos volmenes lgicos, uno para el / sistema de archivos y otra para swap (por supuesto, el reparto es totalmente de usted - si sabes lo que ests haciendo, tambin puede configurar sus particiones de forma manual).

Seleccione el disco que desea crear una particin:

Cuando se le pida ? Escribe los cambios en los discos y configurar LVM , seleccione S :

Si ha seleccionado Guiado - utilizar todo el disco y configurar LVM , la herramienta de particionado crear un grupo de gran volumen que utiliza todo el espacio en disco. Ahora puede especificar qu parte de ese espacio en el disco debe ser utilizado por los volmenes lgicos para / y swap. No tiene sentido dejar un poco de espacio no utilizado de manera que pueda posteriormente ampliar sus volmenes lgicos existentes o crear otras nuevas - esto le da ms flexibilidad.

Cuando termine, pregunte Escribe discos? :

pulse S cuando se le los cambios en los

Posteriormente, las particiones se crean nuevas y formato:

Ahora el sistema base se va a instalar: Crear un usuario, por ejemplo, el usuario administrador con el nombre de usuario administrador (no utilice el nombre de usuario administrador , ya que es un nombre reservado en Ubuntu 11.04):

Yo no necesito un directorio privado encriptado, as que elige no aqu: A continuacin, el gestor de paquetes apt se configuran. Deje la lnea de proxy HTTP vaco a menos que usted est usando un servidor proxy para conectarse a Internet:

Estoy un poco pasada de moda y les gusta actualizar mis servidores manualmente para tener ms control, por lo tanto seleccione No hay actualizaciones automticas .Por supuesto, le toca a usted lo que usted seleccione aqu:

Necesitamos un DNS, el correo y servidor LAMP, pero sin embargo yo no seleccionar ninguno de ellos ahora, porque me gusta tener un control total sobre lo que se instala en mi sistema. Vamos a instalar los paquetes necesarios manualmente ms adelante. El nico artculo que seleccione aqu es servidor OpenSSH para que de inmediato se puede conectar al sistema con un cliente SSH como PuTTY despus de la instalacin ha finalizado:

La instalacin sigue:

El gestor de arranque GRUB se instala:

Seleccione S cuando se le solicite instalar el gestor de arranque GRUB en el registro de inicio maestro? :

La instalacin del sistema base ya est terminado. Retire el CD de instalacin de la unidad de CD y pulse Continuar para reiniciar el sistema:

En el siguiente paso ...

4 obtener privilegios de root

Despus del reinicio, puedes conectarte con tu nombre de usuario creado anteriormente (por ejemplo, administrador ).Porque tenemos que ejecutar todos los pasos de este tutorial con privilegios de root, se puede anteponer todos los comandos de este tutorial con la cadena de sudo , o nos convertimos en la raz en estos momentos escribiendo

sudo su (Usted puede tambin permitir la entrada de root mediante la ejecucin de sudo passwd root y dando raz una contrasea. A continuacin, puede directamente acceder como root, pero esto es mal visto por los desarrolladores de Ubuntu y la comunidad por varias razones. Vase http://ubuntuforums.org/showthread.php?t=765414 .)

5 Para instalar el servidor SSH (Opcional)


Si usted no ha instalado el servidor OpenSSH durante la instalacin del sistema, puede hacerlo ahora: apt-get install ssh openssh-server A partir de ahora usted puede usar un cliente SSH como PuTTY y conectarse desde su estacin de trabajo a su servidor de Ubuntu 11.04, y siga los pasos restantes de este tutorial.

6 Instalar vim-nox (Opcional)


Voy a usar vi como mi editor de texto en este tutorial. El valor por defecto vi el programa tiene un comportamiento extrao en Ubuntu y Debian, para solucionar este problema, se instala vim-nox : apt-get install vim-nox (Usted no tiene que hacer esto si usted utiliza un editor de texto diferente, como joe o nano.)

7 Configurar la red
Debido a que el instalador de Ubuntu ha configurado nuestro sistema para obtener los parmetros de red a travs de DHCP, tenemos que cambiar eso ahora, porque un servidor debe tener una direccin IP esttica. Editar el archivo /etc/network/interfaces y ajustarlo a sus necesidades (en este ejemplo de configuracin voy a utilizar la direccin IP 192.168.0.100 ): vi /etc/network/interfaces

# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0

iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1
A continuacin, reinicie su red: /etc/init.d/networking restart A continuacin, edite /etc/hosts . Hacer que se vea como esto: vi /etc/hosts

127.0.0.1 192.168.0.100

localhost.localdomain server1.example.com

localhost server1

# The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Ahora ejecute eco server1.example.com> /etc/host /etc/init.d/hostname restart A continuacin, ejecute hostname hostname-f Ambos deben mostrar server1.example.com ahora.

8 Editar el archivo /etc/apt/sources.list y actualizar la instalacin de Linux


Editar el archivo /etc/apt/sources.list . Puede comentar o eliminar el CD de instalacin del archivo y asegrese de que el universo y multiverso repositorios estn habilitadas. Se debe tener este aspecto: vi /etc/apt/sources.list

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://de.archive.ubuntu.com/ubuntu/ natty main restricted

deb-src http://de.archive.ubuntu.com/ubuntu/ natty main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://de.archive.ubuntu.com/ubuntu/ natty-updates main restricted deb-src http://de.archive.ubuntu.com/ubuntu/ natty-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://de.archive.ubuntu.com/ubuntu/ natty universe deb-src http://de.archive.ubuntu.com/ubuntu/ natty universe deb http://de.archive.ubuntu.com/ubuntu/ natty-updates universe deb-src http://de.archive.ubuntu.com/ubuntu/ natty-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://de.archive.ubuntu.com/ubuntu/ natty multiverse deb-src http://de.archive.ubuntu.com/ubuntu/ natty multiverse deb http://de.archive.ubuntu.com/ubuntu/ natty-updates multiverse deb-src http://de.archive.ubuntu.com/ubuntu/ natty-updates multiverse ## Uncomment the following two lines to add software from the 'backports' ## repository. ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. # deb http://de.archive.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse

# deb-src http://de.archive.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu natty-security main restricted deb-src http://security.ubuntu.com/ubuntu natty-security main restricted deb http://security.ubuntu.com/ubuntu natty-security universe deb-src http://security.ubuntu.com/ubuntu natty-security universe deb http://security.ubuntu.com/ubuntu natty-security multiverse deb-src http://security.ubuntu.com/ubuntu natty-security multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu natty partner # deb-src http://archive.canonical.com/ubuntu natty partner ## Uncomment the following two lines to add software from Ubuntu's ## 'extras' repository. ## This software is not part of Ubuntu, but is offered by thirdparty ## developers who want to ship their latest software. # deb http://extras.ubuntu.com/ubuntu natty main # deb-src http://extras.ubuntu.com/ubuntu natty main
A continuacin, ejecute apt-get update para actualizar la base de datos de paquetes apt apt-get upgrade para instalar las ltimas actualizaciones (si las hay). Si usted ve que un nuevo ncleo se instala como parte de las actualizaciones, debe reiniciar el sistema despus: reboot

9 Cambiar el shell por defecto


/bin/sh es un enlace simblico a /bin/dash , sin embargo tenemos que /bin/bash , no /bin/dash . Por lo tanto, haga lo siguiente: dpkg-reconfigure dash

Use dash as the default system shell (/bin/sh)? <-- No Utilice el tablero como el shell por defecto del sistema (/bin/sh)? <- No Si no lo hace, en la instalacin de ISPConfig se producir un error.

10 Desactivar AppArmor
AppArmor es una extensin de seguridad (similar a SELinux) que debe proporcionar mayor seguridad. En mi opinin no lo necesitan para configurar un sistema seguro, y por lo general causa ms problemas que ventajas (pensar en ello despus de haber hecho una semana de la solucin de problemas debido a algn servicio no estaba funcionando como se esperaba, y entonces saber que todo estaba bien, slo AppArmor fue la causa del problema). Por lo tanto puedo desactivarlo (esto es una necesidad si usted quiere instalar ISPConfig ms adelante). Podemos desactivar de esta manera: /etc/init.d/apparmor stop update-rc.d -f apparmor remove apt-get remove apparmor apparmor-utils

11 Sincronizar el reloj del sistema


Es una buena idea para sincronizar el reloj del sistema con un servidor NTP (network time protocol) del servidor a travs de Internet. Basta con ejecutar apt-get install ntp ntpdate y la hora del sistema siempre estar en sincrona.

12 Instalar Postfix, Courier, saslauthd, MySQL, rkhunter, binutils

Podemos instalar Postfix, Courier, saslauthd, MySQL, rkhunter, y binutils con un solo comando:

apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courierauthdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl getmail4 rkhunter binutils maildrop

Se le pedir a las siguientes preguntas: New password for the MySQL "root" user: <-- yourrootsqlpassword Repeat password for the MySQL "root" user: <-- yourrootsqlpassword General type of mail configuration: <-- Internet Site System mail name: <-- server1.example.com Create directories for web-based administration? <-- No SSL certificate required <-- Ok

Nueva contrasea para el MySQL usuario "root": <- yourrootsqlpassword Repite el password de MySQL para el usuario "root": <- yourrootsqlpassword

Tipo general de configuracin de correo: <- Sitio de Internet Sistema de nombre de correo: <- server1.example. com Crea los directorios de administracin basada en web? <- No se requiere certificado SSL <- Ok

Queremos que MySQL escuche en todas las interfaces, no solo localhost, editamos /etc/mysql/my.cnf y comentar la lnea bind-address = 127.0.0.1 : vi /etc/mysql/my.cnf

por

lo

tanto,

[...] # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. #bind-address = 127.0.0.1 [...]
Luego reinicie MySQL: / Etc / init.d / mysql restart Ahora compruebe que la red est habilitada. Ejecutar netstat-tap | grep mysql La salida debera tener este aspecto: root@server1:~# netstat -tap | grep mysql tcp 0 0 *:mysql root@server1:~#

*:*

LISTEN

9990/mysqld

Durante la instalacin, los certificados SSL para IMAP y POP3 SSL SSL se crean con el nombre de host localhost . Para cambiar esto para el correcto nombre de host ( server1.example.com en este tutorial), elimine los certificados de

cd /etc/courier rm-f /etc/courier/imapd.pem rm-f /etc/courier/pop3d.pem ... y modificar los dos archivos siguientes, reemplace CN=localhost con el CN=server1.example.com (tambin se puede modificar los valores de otros, si es necesario): vi /etc/courier/imapd.cnf

[...] CN=server1.example.com [...]

vi /etc/courier/pop3d.cnf

[...] CN=server1.example.com [...]


A continuacin, volver a crear los certificados de ... mkimapdcert mkpop3dcert ... y reinicie Courier-IMAP-SSL y Courier-POP3 SSL: /etc/init.d/courier-imap-ssl restart /etc/init.d/courier-pop-ssl restart

13 Instalar Amavisd-new, SpamAssassin, y ClamAV


Para instalar amavisd-new, SpamAssassin, ClamAV, y se corre

apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl

El programa de instalacin utiliza ISPConfig 3 amavisd que se carga la biblioteca de SpamAssassin filtro interno, para que podamos dejar de SpamAssassin para liberar algo de memoria RAM:

/etc/init.d/spamassassin stop update-rc.d -f spamassassin remove

14 Install Apache2, PHP5, phpMyAdmin, FCGI, suExec, Pear, And mcrypt


Apache 2, PHP5, phpMyAdmin, FCGI, suexec, pera, y mcrypt puede ser instalado de la siguiente manera:

apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libruby libapache2-mod-ruby

Ver la siguiente pregunta: Web server to reconfigure automatically: <-- apache2 Configure database for phpmyadmin with dbconfig-common? <-- No

reconfigurar automticamente: <- apache2 Configurar la base de datos de phpmyadmin con dbconfig-comn? <- No A continuacin, ejecute el comando siguiente para activar el de mdulos de Apache suexec , reescritura , ssl , acciones , y se incluyen (adems de DAV , dav_fs y auth_digest si desea utilizar WebDAV):

a2enmod suexec rewrite ssl actions include a2enmod dav_fs dav auth_digest

Reiniciar Apache despus:

/etc/init.d/apache2 restart

Si usted desea recibir archivos con la extensin de Ruby . rb en sus sitios web creados a travs de ISPConfig, debe comentar la lnea application/x-rb rub en /etc/mime.types :

vi /etc/mime.types

[...] #application/x-ruby [...]

rb

(Esto es necesario slo para RB. archivos, los archivos con la extensin de Ruby rbx. trabajar fuera de la caja.)
Reinicia Apache despus: /etc/init.d/apache2 restart

15 Instalar PureFTPd y cuotas


PureFTPd y la cuota se puede instalar con el siguiente comando:

apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool

Editar el archivo /etc/default/pure-ftpd-common... vi /etc/default/pure-ftpd-common

... y asegrese de que el modo de inicio se establecestandalone y un conjunto VIRTUALCHROOT=true:

[...] STANDALONE_OR_INETD=standalone [...] VIRTUALCHROOT=true [...]


Ahora podemos configurar PureFTPd para permitir sesiones FTP y TLS. FTP es un protocolo muy inseguro, porque todas las contraseas y los datos de todos se transfieren en texto claro. Mediante el uso de TLS, toda la comunicacin puede ser encriptada, lo que hace FTP mucho ms seguro. Si desea permitir a FTP y sesiones TLS, ejecute

echo 1> /etc/pure-ftpd/conf/TLS

Con el fin de utilizar TLS, debemos crear un certificado SSL. Yo lo cree en /etc/ssl/private/ , por lo tanto, creo que el primer directorio: mkdir -p /etc/ssl/private/

Despus, podemos generar el certificado SSL de la siguiente manera:

openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem

Country Name (2 letter code) [AU]: <-- Enter your Country Name (e.g., "DE"). State or Province Name (full name) [Some-State]: <-- Enter your State or Province Name. Locality Name (eg, city) []: <-- Enter your City. Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter your Organization Name (e.g., the name of your company). Organizational Unit Name (eg, section) []: <-- Enter your Organizational Unit Name (e.g. "IT Department"). Common Name (eg, YOUR name) []: <-- Enter the Fully Qualified Domain Name of the system (e.g. "server1.example.com"). Email Address []: <-- Enter your Email Address. Cambiar los permisos del certificado SSL:

chmod 600 /etc/ssl/private/pure-ftpd.pem

a continuacin reinice PureFTPd:

/etc/init.d/pure-ftpd-mysql restart

Editar /etc/fstab.

Mira se parece a esto (he aadido ,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 a la particin con el punto de montaje /): vi /etc/fstab

# /etc/fstab: static file system information. # # Use 'blkid -o value -s UUID' to print the universally unique identifier # for a device; this may be used with UUID= as a more robust way to name # devices that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 /dev/mapper/server1-root / ext4 errors=remountro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 1 # /boot was on /dev/sda1 during installation UUID=deae7cd1-b106-47aa-9a7c-512f046d2ebf /boot ext2 defaults 0 2 /dev/mapper/server1-swap_1 none swap sw 0 0 /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
Para habilitar cuotas, ejecute los siguientes comandos:

mount -o remount / quotacheck -avugm quotaon -avug

16 Instalacin de BIND DNS Server


BIND se puede instalar de la siguiente manera:

apt-get install bind9 dnsutils

17 Install Vlogger, Webalizer, And AWstats


Vlogger, webalizer y AWstats pueden ser instalados de la siguiente manera:

apt-get install vlogger webalizer awstats geoip-database Abrir /etc/cron.d/awstats vi /etc/cron.d/awstats

... y comentar los dos trabajos de cron en este archivo:

#*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh # Generate static reports: #10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh

18 Install Jailkit
Jailkit slo es necesario si desea usuarios chroot SSH. Se puede instalar de la siguiente manera ( importante: Jailkit debe estar instalado antes de ISPConfig - no se puede instalar despus! ): apt-get install build-essential autoconf automake1.9 libtool flex bison debhelper cd /tmp wget http://olivier.sessink.nl/jailkit/jailkit-2.14.tar.gz tar xvfz jailkit-2.14.tar.gz cd jailkit-2.14 ./debian/rules binary cd .. dpkg -i jailkit_2.14-1_*.deb rm -rf jailkit-2.14*

19 Install fail2ban
Esto es opcional pero recomendable, ya que el monitor ISPConfig intenta mostrar el registro de fail2ban:

apt-get install fail2ban

Para hacer fail2ban monitor de PureFTPd, SASL, y Courier, cree el archivo / etc/fail2ban/jail.local :

vi /etc/fail2ban/jail.local

[pureftpd] enabled port filter logpath maxretry [sasl] enabled port filter logpath maxretry = = = = = true smtp sasl /var/log/mail.log 5 = = = = = true ftp pureftpd /var/log/syslog 3

[courierpop3] enabled port filter logpath maxretry = = = = = true pop3 courierpop3 /var/log/mail.log 5

[courierpop3s] enabled port filter logpath maxretry = = = = = true pop3s courierpop3s /var/log/mail.log 5

[courierimap] enabled port filter logpath maxretry = = = = = true imap2 courierimap /var/log/mail.log 5

[courierimaps] enabled port filter logpath maxretry = = = = = true imaps courierimaps /var/log/mail.log 5

A continuacin, cree los siguientes cinco archivos de filtro:

vi /etc/fail2ban/filter.d/pureftpd.conf

[Definition] failregex = .*pure-ftpd: \(.*@<HOST>\) \[WARNING\] Authentication failed for user.* ignoreregex =
vi /etc/fail2ban/filter.d/courierpop3.conf

# Fail2Ban configuration file # # $Revision: 100 $ # [Definition] # Option: failregex # Notes.: regex to match the password failures messages in the logfile. The # host must be matched by a group named "host". The tag "<HOST>" can # be used for standard IP/hostname matching and is only an alias for # (?:::f{4,6}:)?(?P<host>\S+) # Values: TEXT # failregex = pop3d: LOGIN FAILED.*ip=\[.*:<HOST>\] # Option: ignoreregex # Notes.: regex to ignore. If this regex matches, the line is ignored. # Values: TEXT

# ignoreregex =
vi /etc/fail2ban/filter.d/courierpop3s.conf

# Fail2Ban configuration file # # $Revision: 100 $ # [Definition] # Option: failregex # Notes.: regex to match the password failures messages in the logfile. The # host must be matched by a group named "host". The tag "<HOST>" can # be used for standard IP/hostname matching and is only an alias for # (?:::f{4,6}:)?(?P<host>\S+) # Values: TEXT # failregex = pop3d-ssl: LOGIN FAILED.*ip=\[.*:<HOST>\] # Option: ignoreregex # Notes.: regex to ignore. If this regex matches, the line is ignored. # Values: TEXT # ignoreregex =
vi /etc/fail2ban/filter.d/courierimap.conf

# Fail2Ban configuration file # # $Revision: 100 $ # [Definition] # Option: failregex # Notes.: regex to match the password failures messages in the logfile. The # host must be matched by a group named "host". The

tag "<HOST>" can # be used for standard IP/hostname matching and is only an alias for # (?:::f{4,6}:)?(?P<host>\S+) # Values: TEXT # failregex = imapd: LOGIN FAILED.*ip=\[.*:<HOST>\] # Option: ignoreregex # Notes.: regex to ignore. If this regex matches, the line is ignored. # Values: TEXT # ignoreregex =
vi /etc/fail2ban/filter.d/courierimaps.conf

# Fail2Ban configuration file # # $Revision: 100 $ # [Definition] # Option: failregex # Notes.: regex to match the password failures messages in the logfile. The # host must be matched by a group named "host". The tag "<HOST>" can # be used for standard IP/hostname matching and is only an alias for # (?:::f{4,6}:)?(?P<host>\S+) # Values: TEXT # failregex = imapd-ssl: LOGIN FAILED.*ip=\[.*:<HOST>\] # Option: ignoreregex # Notes.: regex to ignore. If this regex matches, the line is ignored. # Values: TEXT # ignoreregex =
Reiniciar fail2ban :

/etc/init.d/fail2ban restart

20 Install SquirrelMail
Para instalar el cliente de correo web de SquirrelMail, ejecute

apt-get install squirrelmail

a continuacin cree el siguiente enlace..

ln -s /usr/share/squirrelmail/ /var/www/webmail

... y configure SquirrelMail:

squirrelmail-configure

Tenemos que decir a SquirrelMail que estamos utilizando Courier-IMAP/-POP3: SquirrelMail Configuration : Read: config.php (1.4.0) --------------------------------------------------------Main Menu -1. Organization Preferences 2. 3. 4. 5. 6. 7. 8. 9. Server Settings Folder Defaults General Options Themes Address Books Message of the Day (MOTD) Plugins Database

10. Languages D. C S Q Set pre-defined settings for specific IMAP servers Turn color on Save data Quit

Command >> <-- D

SquirrelMail Configuration : Read: config.php ---------------------------------------------------------

While we have been building SquirrelMail, we have discovered some preferences that work better with some servers that don't work so well with others. If you select your IMAP server, this option will set some pre-defined settings for that server. Please note that you will still need to go through and make sure everything is correct. This does not change everything. There are only a few settings that this will change. Please select your IMAP server: bincimap = Binc IMAP server courier cyrus dovecot exchange = Courier IMAP server = Cyrus IMAP server = Dovecot Secure IMAP server = Microsoft Exchange IMAP server

hmailserver = hMailServer macosx = Mac OS X Mailserver mercury32 uw gmail = Mercury/32 = University of Washington's IMAP server = IMAP access to Google mail (Gmail) accounts

quit = Do not change anything Command >> <-- courier

SquirrelMail Configuration : Read: config.php --------------------------------------------------------While we have been building SquirrelMail, we have discovered some preferences that work better with some servers that don't work so well with others. If you select your IMAP server, this option will set some pre-defined settings for that server. Please note that you will still need to go through and make sure everything is correct. This does not change everything. only a few settings that this will change. Please select your IMAP server: bincimap courier cyrus dovecot = Binc IMAP server = Courier IMAP server = Cyrus IMAP server = Dovecot Secure IMAP server There are

exchange = Microsoft Exchange IMAP server hmailserver = hMailServer macosx mercury32 uw quit = Mac OS X Mailserver = Mercury/32 = University of Washington's IMAP server = Do not change anything

Command >> courier imap_server_type = courier default_folder_prefix = INBOX. trash_folder = Trash sent_folder = Sent draft_folder = Drafts show_prefix_option = false default_sub_of_inbox = false show_contain_subfolders_option = false optional_delimiter = . delete_folder = true Press any key to continue... <-- ENTER

SquirrelMail Configuration : Read: config.php (1.4.0) --------------------------------------------------------Main Menu -1. 2. 3. 4. 5. 6. 7. 8. Organization Preferences Server Settings Folder Defaults General Options Themes Address Books Message of the Day (MOTD) Plugins

9. Database 10. Languages D. C S Q Set pre-defined settings for specific IMAP servers Turn color on Save data Quit

Command >> <-- S

SquirrelMail Configuration : Read: config.php (1.4.0) --------------------------------------------------------Main Menu -1. Organization Preferences 2. 3. 4. 5. 6. Server Settings Folder Defaults General Options Themes Address Books

7. 8. 9.

Message of the Day (MOTD) Plugins Database

10. Languages D. C S Q Set pre-defined settings for specific IMAP servers Turn color on Save data Quit

Command >> S Data saved in config.php Press enter to continue... <-- ENTER

SquirrelMail Configuration : Read: config.php (1.4.0) --------------------------------------------------------Main Menu -1. Organization Preferences 2. 3. 4. 5. 6. 7. 8. 9. Server Settings Folder Defaults General Options Themes Address Books Message of the Day (MOTD) Plugins Database

10. Languages D. C S Q Set pre-defined settings for specific IMAP servers Turn color on Save data Quit

Command >> <-- Q Despus se puede accede a SquirrelMail de la siguiente forma. http://server1.example.com/webmail or http://192.168.0.100/webmail:

21 Install ISPConfig 3
Para instalar ISPConfig 3 de la ltima versin liberada, haga lo siguiente:

cd /tmp wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz tar xfz ISPConfig-3-stable.tar.gz cd ispconfig3_install/install/ el siguiente paso es ejecutar

php -q install.php

Esto iniciar el instalador de ISPConfig 3. El programa de instalacin configura todos los servicios como Postfix, SASL, Courier, etc para usted. Una configuracin manual que se requiere para ISPConfig 2 (guas perfectos de ajuste) no es necesario. root@server1:/tmp/ispconfig3_install/install# php -q install.php

-------------------------------------------------------------------------------_____ ___________ _____ |_ _/ ___| ___ \ / __ \ | | \ `--.| |_/ / | / | | `--. \ __/ | | _| |_/\__/ / | \___/\____/\_| __ _ / _(_) ____ /__ \ _/ / |_ |

\/ ___ _ __ | |_ _ __ _ / _ \| '_ \| _| |/ _` |

| \__/\ (_) | | | | | | | (_| | ___\ \ \____/\___/|_| |_|_| |_|\__, | \____/ __/ | |___/

--------------------------------------------------------------------------------

>> Initial configuration Operating System: Debian 6.0 (Squeeze/Sid) or compatible Following will be a few questions for primary configuration so be careful. Default values are in [brackets] and can be accepted with <ENTER>. Tap in "quit" (without the quotes) to stop the installer.

Select language (en,de) [en]: <-- ENTER Installation mode (standard,expert) [standard]: <-- ENTER Full qualified hostname (FQDN) of the server, eg server1.domain.tld <-- ENTER MySQL server hostname [localhost]: <-- ENTER MySQL root username [root]: <-- ENTER MySQL root password []: <-- yourrootsqlpassword MySQL database to create [dbispconfig]: <-- ENTER MySQL charset [utf8]: <-- ENTER Generating a 2048 bit RSA private key ....+++ ..+++ writing new private key to 'smtpd.key' ----You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----Country Name (2 letter code) [AU]: <-- ENTER State or Province Name (full name) [Some-State]: <-- ENTER Locality Name (eg, city) []: <-- ENTER Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- ENTER Organizational Unit Name (eg, section) []: <-- ENTER Common Name (eg, YOUR name) []: <-- ENTER Email Address []: <-- ENTER Configuring Jailkit Configuring SASL Configuring PAM [server1.example.com]:

Configuring Courier Configuring Spamassassin Configuring Amavisd Configuring Getmail Configuring Pureftpd Configuring BIND Configuring Apache Configuring Vlogger Configuring Apps vhost Configuring Firewall Installing ISPConfig ISPConfig Port [8080]: <-- ENTER Configuring DBServer Installing ISPConfig crontab no crontab for root no crontab for getmail Restarting services ... Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql restart Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the stop(8) and then start(8) utilities, e.g. stop mysql ; start mysql. The restart(8) utility is also available. mysql stop/waiting mysql start/running, process 27585 * Stopping Postfix Mail Transport Agent postfix ...done. * Starting Postfix Mail Transport Agent postfix ...done. * Stopping SASL Authentication Daemon saslauthd ...done. * Starting SASL Authentication Daemon saslauthd ...done. Stopping amavisd: amavisd-new. Starting amavisd: amavisd-new. * Stopping ClamAV daemon clamd ...done. * Starting ClamAV daemon clamd ...done. * Stopping Courier authentication services authdaemond ...done. * Starting Courier authentication services authdaemond ...done. * Stopping Courier IMAP server imapd ...done. * Starting Courier IMAP server imapd ...done.

* Stopping Courier IMAP-SSL server imapd-ssl ...done. * Starting Courier IMAP-SSL server imapd-ssl ...done. * Stopping Courier POP3 server... ...done. * Starting Courier POP3 server... ...done. * Stopping Courier POP3-SSL server... ...done. * Starting Courier POP3-SSL server... ...done. * Restarting web server apache2 ... waiting . ...done. Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pureftpd/db/mysql.conf -l pam -E -Y 1 -8 UTF-8 -H -A -O clf:/var/log/pure-ftpd/transfer.log D -b -u 1000 -B Installation completed. root@server1:/tmp/ispconfig3_install/install# El programa de instalacin configura automticamente todos los servicios bsicos, por lo que no es necesaria la configuracin manual. Despus se puede acceder a ISPConfig 3 bajo http://server1.example.com:8080/ o http://192.168.0.100:8080/ . Inicie sesin con el nombre de usuario administrador y la contrasea de administrador (que debe cambiar la contrasea por defecto despus de su primer inicio de sesin):

El sistema est ahora listo para ser utilizado.

Vous aimerez peut-être aussi