El Servidor Perfecto - Ubuntu 11.10 [ISPConfig 3]
Este tutorial muestra cómo preparar un servidor Ubuntu 11.10 (Oneiric Ocelot) para la instalación de ISPConfig 3 y cómo instalar ISPConfig 3. ISPConfig 3 es un panel de control de alojamiento web que le permite configurar los siguientes servicios a través de un navegador web:Apache web servidor, servidor de correo Postfix, MySQL, servidor de nombres BIND o MyDNS, PureFTPd, SpamAssassin, ClamAV y muchos más.
Tenga en cuenta que esta configuración no funciona para ISPConfig 2 ! ¡Es válido solo para ISPConfig 3!
¡No emito ninguna garantía de que esto funcione para usted!
Manual de ISPConfig 3
Para aprender a usar ISPConfig 3, recomiendo descargar el Manual de ISPConfig 3.
En aproximadamente 300 páginas, cubre el concepto detrás de ISPConfig (administrador, revendedores, clientes), explica cómo instalar y actualizar ISPConfig 3, incluye una referencia para todos los formularios y campos de formulario en ISPConfig junto con ejemplos de entradas válidas y proporciona tutoriales para las tareas más comunes en ISPConfig 3. También explica cómo hacer que su servidor sea más seguro y viene con una sección de solución de problemas al final.
Aplicación ISPConfig Monitor para Android
Con la aplicación ISPConfig Monitor, puede verificar el estado de su servidor y averiguar si todos los servicios funcionan como se esperaba. Puede verificar los puertos TCP y UDP y hacer ping a sus servidores. Además de eso, puede usar esta aplicación para solicitar detalles de los servidores que tienen instalado ISPConfig (tenga en cuenta que la versión mínima instalada de ISPConfig 3 compatible con la aplicación ISPConfig Monitor es 3.0.3.3! ); estos detalles incluyen todo lo que sabe del módulo Monitor en el Panel de control de ISPConfig (por ejemplo, servicios, registros de correo y del sistema, cola de correo, información de CPU y memoria, uso del disco, cuota, detalles del sistema operativo, registro de RKHunter, etc.), y por supuesto , como ISPConfig tiene capacidad para varios servidores, puede verificar todos los servidores que están controlados desde su servidor maestro ISPConfig.
Para obtener instrucciones de uso y descarga, visite http://www.ispconfig.org/ispconfig-3/ispconfig-monitor-app-for-android/.
1 Requisitos
Para instalar dicho sistema, necesitará lo siguiente:
- el CD del servidor Ubuntu 11.10, disponible aquí:http://releases.ubuntu.com/releases/11.10/ubuntu-11.10-server-i386.iso (i386) o http://releases.ubuntu.com/releases /11.10/ubuntu-11.10-servidor-amd64.iso (x86_64)
- una conexión rápida a Internet.
2 Nota Preliminar
En este tutorial utilizo el nombre de host server1.example.com con la dirección IP 192.168.0.100 y la puerta de enlace 192.168.0.1. Estas configuraciones pueden diferir para usted, por lo que debe reemplazarlas cuando corresponda.
3 El Sistema Base
Inserte su CD de instalación de Ubuntu en su sistema y arranque desde él. Seleccione su idioma:

Luego seleccione Instalar Servidor Ubuntu:

Elige tu idioma de nuevo (?):

Luego seleccione su ubicación:



Si ha seleccionado una combinación poco común de idioma y ubicación (como inglés como idioma y Alemania como ubicación, como en mi caso), el instalador podría indicarle que no hay una configuración regional definida para esta combinación; en este caso, debe seleccionar la configuración regional manualmente. Selecciono en_US.UTF-8 aquí:

Elija una distribución de teclado (se le pedirá que presione algunas teclas y el instalador intentará detectar su distribución de teclado en función de las teclas que presionó):


El instalador comprueba el CD de instalación, su hardware y configura la red con DHCP si hay un servidor DHCP en la red:


El servidor perfecto - Ubuntu 11.10 [ISPConfig 3] - Página 2
21 Instalar ISPConfig 3
Para instalar ISPConfig 3 desde la última versión publicada, 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 instalador configurará todos los servicios como Postfix, SASL, Courier, etc. por usted. No es necesaria una configuración manual como se requiere para ISPConfig 2 (guías de configuración perfectas).
[email protected]:/tmp/ispconfig3_install/install# php -q install.php
------------------- -------------------------------------------------- -----------
_____ ___________ _____ __ _ ____
|_ _/ ___| ___ \ / __ \ / _(_) /__ \
| | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ /
| | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ |
_| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \
\___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/
__/ |
|___/
-------------------------------------- ---------------------------------------------------------
>> Configuración inicial
Sistema operativo: Debian o versión compatible, desconocida.
A continuación, habrá algunas preguntas para la configuración principal, así que tenga cuidado.
Los valores predeterminados están entre [paréntesis] y se pueden aceptar con
Toque "salir" (sin las comillas) para detener el instalador.
Seleccionar idioma (en,de) [en]: <-- ENTER
Modo de instalación (estándar, experto) [estándar]: <-- ENTER
Nombre de host completo calificado (FQDN) del servidor, p. ej. servidor1.dominio.tld [servidor1.ejemplo.com]: <-- ENTRAR
MySQL server hostname [localhost]: <-- ENTRAR
MySQL raíz nombre de usuario [raíz]: <-- ENTRAR
Contraseña raíz de MySQL []: <-- sucontraseñarootsql
Base de datos de MySQL para crear [dbispconfig]: <-- ENTRAR
Juego de caracteres de MySQL [utf8]: <-- ENTRAR
Generar una clave privada RSA de 2048 bits
...+++
....................... ..........................................++++
escritura nueva clave privada para 'smtpd.key'
-----
Está a punto de solicitarle que ingrese información que se incorporará
a su solicitud de certificado.
Qué están a punto de ingresar es lo que se llama un nombre distinguido o un DN.
Hay bastantes campos, pero puede dejar algunos en blanco
Para algunos campos habrá un valor predeterminado,
Si ingresa '.', el campo quedará en blanco.
-----
Nombre del país (código de 2 letras) [AU]:<-- ENTRAR
Nombre del estado o provincia ( nombre completo) [Algún estado]: <-- ENTRAR
Nombre de la localidad (por ejemplo, ciudad) []: <-- ENTRAR
Nombre de la organización (por ejemplo, empresa) [Internet Widgits Pty Ltd]: <-- ENTRAR
Nombre de la unidad organizativa (por ejemplo, sección) []: <-- ENTRAR
Nombre común (por ejemplo, SU nombre) []: <-- ENTRAR
Dirección de correo electrónico []: <-- ENTRAR
Configurar Jailkit
Configurar SASL
Configurar PAM
Configurar Courier
Configurar Spamassassin
Configurar Amavisd
Configurar Getmail
Configurar Pureftpd
Configurar BIND
Configurar Apache
Configurar Vlogger
Configurar Aplicaciones vhost
Configurar Firewall
Instalar ISPConfig
Puerto ISPConfig [8080]: <-- ENTRAR
Configurar DBServer
Instalar ISPConfig crontab
no crontab para root
no crontab para getmail
Reiniciar servicios ...
En lugar de invocar scripts de inicio a través de /etc/init. d, utilice la utilidad service(8)
, p. service mysql restart
Como el script que está intentando invocar se ha convertido a un
trabajo Upstart, también puedes utilizar las utilidades stop(8) y luego start(8),
p. ej. detener mysql; iniciar mysql. La utilidad restart(8) también está disponible.
mysql stop/waiting
mysql start/running, process 2302
* Deteniendo Postfix Mail Transport Agent postfix
...hecho.
* Iniciando Postfix Mail Transport Agent postfix
...terminado.
* Deteniendo SASL Authentication Daemon saslauthd
...terminado.
* Iniciando SASL Authentication Daemon saslauthd
...hecho.
Deteniendo amavisd: amavisd-new.
Iniciando amavisd: amavisd-new.
* Deteniendo ClamAV daemon clamd
...hecho.
* Iniciando ClamAV daemon clamd
Bytecode: Security mode set to "TrustSigned".
...hecho.
* Deteniendo los servicios de autenticación de Courier authdaemond
...hecho.
* Iniciando Courier authentication services authdaemond
...terminado.
* Deteniendo Courier IMAP server imapd
...terminado.
* Iniciando Courier IMAP server imapd
...hecho.
* Deteniendo servidor IMAP-SSL de Courier imapd-ssl
...hecho.
* Iniciando servidor IMAP-SSL de Courier imapd-ssl
...hecho.
* Deteniendo servidor POP3 de Courier...
...hecho.
* Iniciando servidor POP3 de Courier.. .
...terminado.
* Deteniendo el servidor POP3-SSL de Courier...
...terminado.
* Iniciando el servidor POP3-SSL de Courier...
...hecho.
* Reiniciando servidor web apache2
... esperando .... ...hecho.
Reiniciando servidor ftp: Ejecutando: /usr/sbin/pure-ftpd -mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -8 UTF-8 -O clf:/var/log/pure-ftpd/transfer.log -D -H -b -A -E -u 1000 -Y 1 -B
Instalación completada.
[email protected]:/tmp/ispconfig3_install/install#
El instalador configura automáticamente todos los servicios subyacentes, por lo que no es necesaria una configuración manual.
Luego puede acceder a ISPConfig 3 en http://server1.example.com:8080/ o http://192.168.0.100:8080/. Inicie sesión con el nombre de usuario admin y la contraseña admin (debe cambiar la contraseña predeterminada después de su primer inicio de sesión):


El sistema ahora está listo para ser utilizado.
21.1 Manual ISPConfig 3
Para aprender a usar ISPConfig 3, recomiendo descargar el Manual de ISPConfig 3.
En aproximadamente 300 páginas, cubre el concepto detrás de ISPConfig (administrador, revendedores, clientes), explica cómo instalar y actualizar ISPConfig 3, incluye una referencia para todos los formularios y campos de formulario en ISPConfig junto con ejemplos de entradas válidas y proporciona tutoriales para las tareas más comunes en ISPConfig 3. También explica cómo hacer que su servidor sea más seguro y viene con una sección de solución de problemas al final.
21.2 Aplicación ISPConfig Monitor para Android
Con la aplicación ISPConfig Monitor, puede verificar el estado de su servidor y averiguar si todos los servicios funcionan como se esperaba. Puede verificar los puertos TCP y UDP y hacer ping a sus servidores. Además de eso, puede usar esta aplicación para solicitar detalles de los servidores que tienen instalado ISPConfig (tenga en cuenta que la versión mínima instalada de ISPConfig 3 compatible con la aplicación ISPConfig Monitor es 3.0.3.3! ); estos detalles incluyen todo lo que sabe del módulo Monitor en el Panel de control de ISPConfig (por ejemplo, servicios, registros de correo y del sistema, cola de correo, información de CPU y memoria, uso del disco, cuota, detalles del sistema operativo, registro de RKHunter, etc.), y por supuesto , como ISPConfig tiene capacidad para varios servidores, puede verificar todos los servidores que están controlados desde su servidor maestro ISPConfig.
Para obtener instrucciones de uso y descarga, visite http://www.ispconfig.org/ispconfig-3/ispconfig-monitor-app-for-android/.
22 Notas Adicionales
22.1 OpenVZ
Si el servidor Ubuntu que acaba de configurar en este tutorial es un contenedor OpenVZ (máquina virtual), debe hacer esto en el sistema host (supongo que el ID del contenedor OpenVZ es 101; reemplácelo con el VPSID correcto en su sistema):
VPSID=101
for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE
do
vzctl set $VPSID --capability ${CAP}:on --save
done
23 Enlaces
- Ubuntu:http://www.ubuntu.com/
- ISPConfig:http://www.ispconfig.org/
El Servidor Perfecto - Ubuntu 11.10 [ISPConfig 3] - Página 3
19 Instalar fail2ban
Esto es opcional pero recomendado, porque el monitor ISPConfig intenta mostrar el registro fail2ban:
apt-get install fail2ban
Para hacer que fail2ban monitoree PureFTPd, SASL y Courier, cree el archivo /etc/fail2ban/jail.local:
vi /etc/fail2ban/jail.local
[pureftpd] enabled = true port = ftp filter = pureftpd logpath = /var/log/syslog maxretry = 3 [sasl] enabled = true port = smtp filter = sasl logpath = /var/log/mail.log maxretry = 5 [courierpop3] enabled = true port = pop3 filter = courierpop3 logpath = /var/log/mail.log maxretry = 5 [courierpop3s] enabled = true port = pop3s filter = courierpop3s logpath = /var/log/mail.log maxretry = 5 [courierimap] enabled = true port = imap2 filter = courierimap logpath = /var/log/mail.log maxretry = 5 [courierimaps] enabled = true port = imaps filter = courierimaps logpath = /var/log/mail.log maxretry = 5 |
[Definition] failregex = .*pure-ftpd: \(.*@<HOST>\) \[WARNING\] Authentication failed for user.* ignoreregex = |
# 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 = |
# 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 = |
# 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 = |
# 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 = |
[...]
<Directory /usr/share/squirrelmail>
Options FollowSymLinks
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_admin_flag allow_url_fopen Off
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/squirrelmail/tmp
php_admin_value open_basedir /usr/share/squirrelmail:/etc/squirrelmail:/var/lib/squirrelmail:/etc/hostname:/etc/mailname:/var/spool/squirrelmail
php_flag register_globals off
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
# access to configtest is limited by default to prevent information leak
<Files configtest.php>
order deny,allow
deny from all
allow from 127.0.0.1
</Files>
</Directory>
[...] |
Alias /squirrelmail /usr/share/squirrelmail Alias /webmail /usr/share/squirrelmail [...] |
[...] <VirtualHost 1.2.3.4:80> DocumentRoot /usr/share/squirrelmail ServerName webmail.example.com </VirtualHost> |
[...] # 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 [...] |
[...] CN=server1.example.com [...] |
[...] CN=server1.example.com [...] |
[...] #application/x-ruby rb [...] |
[...] STANDALONE_OR_INETD=standalone [...] VIRTUALCHROOT=true [...] |
# /etc/fstab: static file system information. # # Use 'blkid' 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=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 1 # /boot was on /dev/sda1 during installation UUID=6fbce377-c3d6-4eb3-8299-88797d4ad18d /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 |
#*/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 |
# 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 |
127.0.0.1 localhost.localdomain localhost 192.168.0.100 server1.example.com 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 |
# # deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ dists/oneiric/main/binary-i386/ # deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ dists/oneiric/restricted/binary-i386/ # deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ oneiric main restricted #deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ dists/oneiric/main/binary-i386/ #deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ dists/oneiric/restricted/binary-i386/ #deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)]/ oneiric main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://de.archive.ubuntu.com/ubuntu/ oneiric main restricted deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://de.archive.ubuntu.com/ubuntu/ oneiric-updates main restricted deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric-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/ oneiric universe deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric universe deb http://de.archive.ubuntu.com/ubuntu/ oneiric-updates universe deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric-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/ oneiric multiverse deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric multiverse deb http://de.archive.ubuntu.com/ubuntu/ oneiric-updates multiverse deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric-updates multiverse ## 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/ oneiric-backports main restricted universe multiverse deb-src http://de.archive.ubuntu.com/ubuntu/ oneiric-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu oneiric-security main restricted deb-src http://security.ubuntu.com/ubuntu oneiric-security main restricted deb http://security.ubuntu.com/ubuntu oneiric-security universe deb-src http://security.ubuntu.com/ubuntu oneiric-security universe deb http://security.ubuntu.com/ubuntu oneiric-security multiverse deb-src http://security.ubuntu.com/ubuntu oneiric-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 oneiric partner # deb-src http://archive.canonical.com/ubuntu oneiric 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 third-party ## developers who want to ship their latest software. # deb http://extras.ubuntu.com/ubuntu oneiric main # deb-src http://extras.ubuntu.com/ubuntu oneiric main |





















