Date post: | 30-Oct-2014 |
Category: |
Documents |
Upload: | jesus-alvarado |
View: | 52 times |
Download: | 6 times |
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
1
Servicios de red enGNU/Linux
Diseño e implementación
Alvarado Bastida JesúsBlancas Juárez Verónica Yurem
27/10/2012
La implementación de los servicios de red necesarios para el control y monitorización dela misma con ayuda de tecnologías basadas en una infraestructura GNU/Linux, no soloofrece una potente y flexible infraestructura TI, si no, también una gran ventajacompetitiva por su flexibilidad y bajo coste
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
2
Copyright (C) 2012 Jesus Alvarado Bastida.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
3
OBJETIVO
Realizar la configuración de los servicios de DHCP y DNS en una red local sobre máquinasseparadas
RESUMEN EJECUTIVO
Teniendo una gran variedad de dispositivos en el mercado capaces de realizar estasfunciones y mas (como es el caso de los Modem/Router/Gateway 2Wire, entre otros),surge la pregunta ¿Por que realizar la implementación de estos servicios uno mismo?, larespuesta es muy simple, es posible que ningún dispositivo se adapte a las necesidadesespecificas del proyecto en cuestión, que los requerimientos técnicos o funcionalescambien constantemente de tal forma que el dispositivo elegido no pueda adaptarse a losnuevos requerimientos, o bien, se requiera de un cambio mayor dejando la red inaccesibledurante un periodo de tiempo inadmisible, y en el mayor de los casos, la implementaciónde equipo especializado excede el presupuesto y las características necesitadas, así comola necesidad de capacitación y adquisición de dispositivos o software adicional.
Este tipo de solución es ideal para PyMEs que por su naturaleza, requieren de una soluciónde red rápida, accesible, segura, totalmente configurable y escalable con forme cambiansus necesidades, ya que los requerimientos de una PyME cambian constantemente enperiodos cortos de tiempo, por lo cual apegarse a un dispositivo caro y estrictoocasionaría retrasos y perdida de tiempo.
Un servidor DHCP tiene como función el enviar a todos los equipos usuarios de la red losparámetros de configuración necesarios para conectarse y comunicarse dentro de la redde forma efectiva, de tal forma que a cada uno de ellos, se les asigne una dirección IPúnica dentro de la red de forma transparente para el usuario, y de igual forma reserveaquellas direcciones que deben permanecer estáticas.
Un servidor DNS se encarga de traducir nombres de direcciones (URL) que son utilizadaspara la identificación de sitios con su correspondiente dirección IP, facilitando así a losusuarios en acceso a servicios.
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
4
OBJETIVO 2
RESUMEN EJECUTIVO 2
INTRODUCCIÓN 6
CONCEPTOS BÁSICOS 6
Gateway 6
NAT (Network Address Translation)7
Firewall 7
NETFILTER 7
Iptables 7
DNS (Domain Name System) 8
DHCP 9
WEB 9
APACHE 9
HTTP 10
WPA 10
WPA2 10
DIAGRAMA DE RED 11
MEMORIA TÉCNICA 11
Gateway/Firewall 11
Paso 1: Instalar los paquetes 11
Paso 2: Configurar la NIC 11
Paso 3: Configuramos dnsmask 11
Paso 4: Modificar las reglas de iptables 12
servidor DHCP 12
Paso 1: Instalación 12
Paso 2: Configuración de la NIC 13
Paso 3: Configuración del servicio 14
Paso 4: Iniciar el servicio 16
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
5
Paso 5: Configuración de los clientes 16
servidor DNS 17
Paso 1: Instalación 17
Paso 2: Configurar el servicio 18
Paso 3: Configurar zonas 19
Paso 4: Reiniciar el servicio DNS 21
Paso 5: DNS secundario 21
Paso 6: Iniciando del servicio con DNS secundario 22
servidor WEB 22
Paso 1: Configuración de la NIC 22
Paso 2: Reiniciar la NIC 23
Paso 3: Instalación 23
Paso 4: Configurar puertos del servidor 24
Paso 5: Agregar y configurar el sitio principal24
Paso 6: Activar el sitio 26
Paso 7: Instalación de MySQL 27
Paso 8: Acceso a la base de datos 27
Paso 9: Instalación de un Blog Wordpress27
Paso 10: Configurar el Blog 28
Paso 11: Crear la base de datos 28
Paso 12: Finalizar la configuración 29
Paso 13: Configurar usuario admin 29
Paso 14: Eliminar el instalador 29
Paso 15: Creación de un alias para el Blog 29
Paso 16: Leventando el sitio 30
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
6
Paso 17: Instalación del AppServer Tomcat 30
Paso 18: Configuración del Firewall 31
Paso 19: Firewall como servicio 32
Configuración inalámbrica 32
Pruebas realizadas 32
BIBLIOGRAFÍA 33
INDICE 38
GNU Free Documentation License 39
0. PREAMBLE 39
1. APPLICABILITY AND DEFINITIONS 39
2. VERBATIM COPYING 41
3. COPYING IN QUANTITY 41
4. MODIFICATIONS 42
5. COMBINING DOCUMENTS 43
6. COLLECTIONS OF DOCUMENTS 43
7. AGGREGATION WITH INDEPENDENT WORKS44
8. TRANSLATION 44
9. TERMINATION 44
10. FUTURE REVISIONS OF THIS LICENSE 45
11. RELICENSING 45
ADDENDUM: How to use this License for your documents46
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
7
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
8
INTRODUCCIÓN
La creciente demanda de control de la información en ambientes laborales, educativos ydomésticos demanda un correcto control de las redes de datos implicadas, para ello, esnecesario de dispositivos o equipos capaces de administrar, monitorear y controlar la redde datos y los servicios que en esta son consumidos, sin embargo, estos suelen ser caros,por lo cual en la mayoría de los casos tienden a ser prohibitivos, por lo cual un usuario conlos suficientes conocimiento podría optar por crear sus propios servidores estrictamentecon las capacidades necesarias que satisfagan sus necesidades específicas, sin que estosignifique una inversión demasiado grande. En el caso de una PyME, es común encontrarequipos de computo considerados obsoletos, o bien, desechados por la adquisición denuevo equipo, con un valor contable despreciable, los cuales quedan olvidados enbodegas o rematados a precios de libro contable, sin embargo, estos equipos pueden seraprovechados para realizar las labores de administración, monitorización y difusión deservicios de red como son DHCP, DNS, LDAP, entre otros.
CONCEPTOS BÁSICOS
Gateway
La puerta de enlace o Default Gateway es el nodo que dota a los hosts de una red de unacceso hacia una red exterior. La puerta de enlace por defecto es la ruta por defecto que sele asigna a un equipo. A través de ese nodo se envía cualquier paquete dirigido a cualquierred que no se encuentre en la tabla del enrutamiento del equipo.
El Default Gateway es la interfaz del router conectada a la red local, y a través de la cual seaccede a otras redes.
La dirección IP del host y la del Default Gateway deben pertenecer a la misma red osubred.
Los equipos terminales utilizan la máscara de subred para comparar la porción de red desu dirección IP con la red de destino de los paquetes que deben enviar.
Si la dirección de destino pertenece a la red local, entonces utiliza ARP para completar elencabezado de la trama.
Si la dirección de destino no pertenece a la red local, entonces el paquete debe enviarse alGateway para que sea enviado a la red de destino. (Default Gateway, 2012)
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
9
NAT (Network Address Translation)
Se encarga de traducir un conjunto de peticiones de varios equipos dentro de una red, loscuales son vistos por otra red externa como un solo equipo con una IP asignada paracomunicaciones, visto desde dentro de la red, un conjunto de equipos utiliza una mismadirección IP para comunicarse con el exterior, de forma similar los equipos situados en elexterior solo ven una dirección IP, pero no todos los equipos dentro de ella, el servicio NAT,se encarga de enviar los paquetes a quien los solicito dentro de la red. (Fábian, Prácticasde servicios en red y aplicaciones WEB)
Firewall
Un firewall es un dispositivo, o conjunto de ellos, que está configurado para impedir elacceso no autorizado a una determinada zona de una red o dispositivo, pero que al mismotiempo permite el paso a aquellas comunicaciones autorizadas.
La implementación puede ser de software o de hardware, y ambas tienen dos posiblespolíticas a la hora de aplicarse:
• Política restrictiva, que es aquella que impide todo el tráfico salvo el autorizadoexpresamente en la configuración
• Política permisiva, que permite el paso de toda comunicación salvo la expresamenteprohibida
Un firewall de host se encarga únicamente de la protección de un equipo en particular,filtrando única y exclusivamente los paquetes y conexiones estrictamente necesarios,un firewall de red lo hace para toda una red, re direccionando, filtrando y controlandolos paquetes y comunicaciones desde y hacia la red interna (Izaskun)
NETFILTER
Es un componente del núcleo Linux encargado de la manipulación de paquetes de red, quepermite:
• Filtrado de paquetes• Traducción de direcciones (NAT)• Modificación de paquetes (Iptables)
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
10
Iptables
Es una herramienta/aplicación (forma parte del proyecto NETFILTER) que hace uso de lainfraestructura que ofrece NETFILTER para construir y configurar firewalls, permite:
Definir políticas de filtrado, de NAT y realizar logs
Remplaza a herramientas anteriores: IFWADMIN, IPCHAINS
Puede usar las capacidades de seguimiento de conexiones NETFILTER para definirfirewalls con estado (Iptables)
DNS (Domain Name System)
El servidor DNS es el encargado de convertir las direcciones IP en nombres de dominio deinternet. Se encarga de traducir la dirección que escribimos en un navegador web en unadirección IP que es con lo que funciona el protocolo TCP/IP. Por ejemplo, cuandoescribimos en el navegador “www.google.com”, el servidor DNS va a traducir estenombre por unos de los servidores de Google, por ejemplo 209.85.229.104 suelenconfigurar dos direcciones de servidor DNS, por si falla uno de ellos. Si no configuramos elservidor DNS, solo podríamos navegar por internet en caso de que supiésemos lasdirecciones IP de los sitios que deseamos visitar. Los ISP suelen tener servidores DNS adisposición de sus clientes.
De esta forma, es posible identificar a un equipo de red con un nombre de dominio, comopor ejemplo “google.com”, o bien un subdominio como “mail.google.com”, se ofrece unagran ventaja en comparación con su equivalente numérico, permitiendo identificarclaramente el servidor, y en la mayoría de los casos, el tipo de servidor, es decir4, unservidor “smtp.dominio.com” puede suponerse como un servidor de correo electrónico
El servicio DNS realiza traducciones entre direcciones IP y de nombres de ordenadores.Está definido en los RFC 1034 y 1035. La base de datos de DNS es distribuida, es decir, suinformación está almacenada en varias máquinas. De hecho, la base de datos de DNSsigue una estructura jerárquica, donde cada nivel tiene uno o varios dominios. Existe unnodo raíz identificado por un “.”, del que cuelgan varios TLD (Top Level Domain) comocom, edu, org, etc. De los TLD cuelgan a su vez otros dominios. (Izaskun)
Un servidor DNS almacena información de nombres y direcciones IP de algunas máquinasen un archivo. A un conjunto de máquinas se le llama zona, y se dice que el servidor tieneautoridad sobre dicha zona. (Fábian, Prácticas de servicios en red y aplicaciones WEB)
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
11
DHCP
El protocolo DHCP (Dynamic Host Configuration Protocol) tiene como propósitoproporcionar una dirección IP y una máscara a todo periférico de red (estación de trabajo,servidor u otro) que la pida. Según la configuración, hay otros parámetros que también sonimportantes y que se transmitirán al mismo tiempo: las direcciones IP de la puerta deenlace determinada, los servidores DNS que deben utilizarse, los servidores WINS y elsufijo de dominio por citar algunos de los principales. 1
Cuando un dispositivo se conecta a la red, y quiere que un servidor DHCP le entrega unadirección IP debe enviar su solicitud mediante un mensaje de broadcast al pueto 67. Todoslos servidores DHCP que reciben la solicitud le contestan proponiéndole una IP. El clienteelige una de ellas, y se lo comunica al servidor escogido, el cual se la confirma con el restode los datos, y período de validez. Los mensajes que se intercambian el servidor y elcliente son:
• DHCPDISCOVER. Mensaje de broadcast del cliente para buscar servidores DHCP• DHCPOFFER. Mensaje del servidor con la propuesta de configuración• DHCPREQUEST. Mensaje del cliente con la propuesta aceptada• DHCPACK. Mensaje del servidor con la confirmación de los datos• DHCPNAK. Mensaje del servidor indicando la expiración de validez• DHCPRELEASE. Mensaje del cliente indicando que libera la dirección asignada
El protocolo DCHP utiliza para la comunicación servidor-cliente los puertos UDP 67 para elservidor y 68 para el cliente. (Fábian, Prácticas de servicios en red y aplicaciones WEB)
WEB
Permite la publicación de contenidos y aplicaciones que pueden ejecutarse, o visualizarsecon ayuda de un web browser, un ejemplo de esto es el servidor Apache, con el cual esposible la difusión de contenido con documentos HTML, HTML, XHTML; adicionalmente,las capacidades pueden ser aumentadas con la inclusión de otras tecnologías yherramientas como sin ASP, Servlets, PHP, Ruby on rails y AJAX, entre otros.
APACHE
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
12
Servidor HTTP Apache. Es un software libre, servidor HTTP de código abierto paraplataformas Unix (BSD, GNU/Linux, etc.) Windows, Macintosh y otras, que implantara elprotocolo HTTP/1.1 y la noción de sitio virtual. El servidor Apache se desarrolla dentro delproyecto HTTP Server (httpd) de la Apache Software Foundation. (Apache Foundation,2012)
HTTP
HTTP es el protocolo de Transferencia de Hipertexto definido en el RFC 2616 y que estábasado en el modelo cliente-servidor. Cuando un cliente solicita una página mediante unnavegador a un servidor, éste le entrega documentos en texto plano, estructuradomediante el lenguaje de etiquetas HTML. Ésta solicitud se puede realizar mediante tresmétodos: GET, HEAD Y POST.
WPA
WPA es un estándar que opera a nivel MAC y está basado en un borrador del estándar IEEE802.11i. Aunque WPA tiene algunas carencias que el definitivo IEEE 802.11i no tiene.
Los aspectos que se intentan optimizar mediante el uso de WPA son el proceso deautentificación y el de cifrado.
Las principales características de WPA son las siguientes:
Distribución dinámica de claves
Utilización más robusta del vector de inicialización (mejora la confidencialidad)
Nuevas técnicas de integridad y auntenticación (aplicable en entornos residenciales yempresariales)
Actualización de equipamento radio a WPA mediante software
WPA2
WPA hace referencia a los borradores del estándar 802.11i mientras que WPA2 es laversión normalizada, WPA2 implementa todos los elementos obligatorios del estándar
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
13
802.11I y utiliza AES como algoritmo de cifrado, la seguridad es mejor que la de WEP
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
14
DIAGRAMA DE RED
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
15
MEMORIA TÉCNICA
Gateway/Firewall
Paso 1: Instalar los paquetes
root$ aptitude install dnsmasq iptables-persistent
Paso 2: Configurar la NIC
Configurar las interfaces de red, en este caso, se van a requerir de dos interfaces de red,una de ellas estará conectada al servicio de internet, y la otra a la red local
root$ nano /etc/network/interfaces
allow-hotplug lopre-up iptables-restore < /etc/iptables.rulesallow-hotplug eth1iface eth1 inet dhcpallow-hotplug eth2iface eth2 inet staticaddress 10.0.50.254network 10.0.50.0broadcast 10.0.50.255netmask 255.255.255.0
Paso 3: Configuramos dnsmask
root$ nano /etc/dnsmasq.conf
interface=eth2listen-address=127.0.0.1domain=picudos.orgdhcp-range=10.0.50.1,10.0.50.40,12hroot$ nano /etc/sysctl.confnet.ipv4.ip_forward=1
Paso 4: Modificar las reglas de iptables
root$ nano gw.sh
#!/bin/sh
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
16
echo 1 > /proc/sys/net/ipv4/ip_forwardiptables -t nat -Fiptables -t nat –Ziptables –Fiptables –Ziptables –P INPUT ACCEPTiptables –P OUTPUT ACCEPTiptables –P FORWARD ACCEPTiptables –A FORWARD –I eth1 –o eth2 –m state –state ESTABLISHED,RELATED –j ACCEPTiptables –A POSTROUTING –t nat –s 10.0.50.0/16 –o eth1 –j SNAT –to-source192.168.43.11iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth1 -j DNAT --to 10.0.50.3iptables -t nat -A POSTROUTING -s 10.0.50.0/16 -o eth1 -j MASQUERADE
Ejecutar como root
root$ ./gw.sh
Paso 5: Reiniciar el equipo
root$ shutdown –r now
Servidor DHCP
Paso 1: Instalación
Como root:
root$ aptitude install dhcp3-server
En caso de obtener el siguiente mensaje, responder: Y
No se satisfacen las dependenc ias de los siguientes paquetes: isc-dhcp-client: Depende: isc-dhcp-common (= 4.1.1-P1-15+squeeze2) pero se va a instalar 4.1.1-P1-15+squeeze8.Las acciones siguientes resolverán estas dependencias Eliminar los paque tes siguientes:1) isc-dhcp-client2) network-manager3) network-manager-gnome Dejar las siguientes dependencias sin resolver:4) gnome recomienda network-manager-gnome (>= 0.8)¿Acepta esta solución? [Y/n/q/ ?]
Se procederá a la descarga e instalación de los paquetes
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
17
Paso 2: Configuración de la NIC
Como root, modificar el archivo /etc/network/interfaces
root$ nano /etc/network/interfaces
"/etc/network/interfaces"
# This file describes the network inte rfaces available on your system# and how to activate them. For more information, see interfaces(5).# The loopback network interfaceauto loiface lo inet loopback#AGREGADO PARA DHCP#ethX, la X debe ser cambiada por el número apropiado según la NICallow-hotplug eth0auto eth0iface eth0 inet staticaddress 10.0.50.1 #Dirección del servidor DHCPnetmask 255.255.255.0 #Mascara de subrednetwork 10.0.30.0broadcast 10.0.50.255 Gateway 10.0.50.254
----------------------------------------------------Guardar (Ctrl + O) y cerrar eldocumento (Ctrl + X)
Paso 3: Configuración del servicio
Antes de comenzar con la configuración del servicio, es necesario asegurarse de que esteno se esté ejecutando
root$ /etc/init.d/isc-dhcp-server stop
Las configuraciones del servidor DHCP se encuentran en el archivo:"/etc/dhcp/dhcp.conf"
Es recomendable realizar una copia de seguridad de este
root$ cp -rv /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bk
El archivo de configuración quedaría de la siguiente forma
root$ nano /etc/dhcp/dhcpd.conf
authoritative; #Obliga la reconfigur ación automatica de clientesddns-domainname "picudos.org";#Dominio de actualización del DNSddns-update-style interim; #Método de actualización del DNSddns-updates on; #Actualización de DNS por DHCP
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
18
one-lease-per-client on; #Acepta solicitud de reasignaciónoption domain-name "picudos.org"; #Dominio de redoption domain-name-servers 10.0.50.2; #Servidor(es) DNSoption routers 10.0.50.254; #Gatewayoption broadcast-address 10.0.50.255; #Broadcast#Definición de una subredsubnet 10.0.50.0 netmask 255.255.255.0{ #IP de la red y mascara de subred
range 10.0.50.1 10.0.50.254; #Rango de direcciones IPdefault-lease-time 14400; #Tiempo de asignación en segundosmax-lease-time 172800; #Tiempo máximo de asignación en segundos
}#Direcciones reservadas según MAChost DHCP-Server{
server-name "dhcp.picudos.org"; #Nombre del hosthardware ethernet 08:00:27:B0:6E6F; #MAC del hostfixed-address 10.0.50.1; #Direccion asignada
}
----------------------------------------------------
Guardar (Ctrl + O) y cerrar el documento (Ctrl + X)
Paso 4: Iniciar el servicio
Una vez con el archivo de configuración listo, es necesario levantar la interfaz de red y elservicio
root$ /etc/init.d/networking restart
Ahora, el servicio de DHCP
root$ /etc/init.d/isc-dhcp-server start
o, tambien
root$ /etc/init.d/isc-dhcp-server restart
Paso 5: Configuración de los clientes
Modificar el archivo "/etc/network/interfaces"
root$ nano /etc/network/interfaces
# This file describes the network inte rfaces available on your system# and how to activate them. For more i nformation, see interfaces(5).# The loopback network interfaceauto lo
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
19
iface lo inet loopback#AGREGADO PARA DHCP#ethX, la X debe ser cambiada por el número apropiado según la NICallow-hotplug eth0auto eth0iface eth0 inet dhcp
root$ /etc/init.d/networking restart
Verificar con ifconfig
root$ ifconfig
servidor DNS
Paso 1: Instalación
Como root, realizar la instalación de los paquetes necesarios
root$ aptitude install bind9
Es posible que se requiera la descarga o eliminación de paquetes, en dado caso, responderde forma afirmativa
Paso 2: Configurar el servicio
En este caso, se supone que el servidor DNS es un servidor primario con una IP estática
Editar el archivo nano /etc/bind/named.conf.options
root$ nano nano /etc/bind/named.conf.options
"/etc/bind/named.conf.options"
options {directory "/var/cache/bind";// If there is a firewall between you and nameservers you want// to talk to, you may need to fix the firewall to allow multiple// ports to talk. See http://www.kb.cert.org/vuls/id/800113// If your ISP provided one or more IP addresses for stable
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
20
// nameservers, you probably want to use them as forwarders.// Uncomment the following block, and insert the addresses replacing// the all-0's placeholder.forwarders { 100.10.0.3; 100.10.0.7;};auth-nxdomain no; # conform to RFC1035listen-on-v6 { any; };
};
Paso 3: Configurar zonas
Para la configuración de un DNS primario con dominio picudos.org, editar"/etc/bind/named.conf.local"
zone "picudos.org" { type master; file "/etc/bind/db.picudos.org"; allow-transfer { none; }; allow-query { any; };};
Crear el archivo "/etc/bind/db.picudos.org" definido con anterioridad en la zona DNS queserá creado
;; archivo BIND para zona picudos.org;$TTL 604800@ IN SOA picudos.org. hostmaster.picudos.org. (
1 ; Serial 1200 ; Refresh 300 ; Retry 2419200 ; Expire 1200 ) ; Negative Cache TTL
picudos.org. IN NS ns1.picudos.org. ;NameServer 1picudos.org. IN NS ns2.picudos.org. ;NAmeServer 2 (En caso de existir)picudos.org. IN MX 1 mx1.picudos.org.picudos.org. IN MX 2 mx2.picudos.com.localhost IN A 127.0.0.1 ;loopbackpicudos.org. IN A 10.0.50.2 ;La misma IP que NS1ns1 IN A 10.0.50.2 ;Servidor DNS primarions2 IN A 10.0.50.4 ;Servidor DNS Secundariomx1 IN A 10.0.50.2mx2 IN A 10.0.50.4www IN A 10.0.50.3 ;Servidor WEB
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
21
smtp IN A 10.0.50.11 ;Servidor de correo electrónico
Guardar (Ctrl + O) y cerrar (Ctrtl + X)
TTL indica el tiempo que debe de transcurrir antes de una actualización
Serial es utilizado para llevar un control de cambios
Refresh Tiempo para que se realice la actualización en los DNS secundarios
Retry es el tiempo que deben esperar los DNS secundarios si no hay respuesta
Expire es el tiempo en el que el servidor DNS expira por falta de actualización
NS1 debe ser siempre el servidor DNS primario, en caso de solo tener uno, NS1 y NS2pueden ser el mismo
MX son los registros Mail eXchanger para el dominio
Es necesario tener el puerto TCP 53 y UDP 53 abierto
Paso 4: Reiniciar el servicio DNS
root$ /etc/init.d/bind9 restart
Paso 5: DNS secundario
En este caso, es necesario que en el DNS primario NS2 tenga la IP de la máquina que tieneel servicio de DNS secundario en "named.conf.local", agregar o modificar en el DNSprimario
zone "picudos.org" {type master;file "/etc/bind/db.ficticio.cl";allow-query { any; };allow-transfer { 100.0.50.4; };
};
En este archivo se indica la IP del DNS secundario mediante allow-transfer
Dentro del archivo "named.conf.local" en el DNS secundario
zone "picudos.org" {type slave;file "/etc/bind/db.ficticio.cl";allow-query { any; };masters { 100.0.50.2; };
};
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
22
Esta vez con la IP del DNS primario
Paso 6: Iniciando del servicio con DNS secundario
Asignar los permisos necesarios en NS2
root$ chmod g+ws /etc/bind
Reiniciar ambos servicios NS1 y NS2
root$ /etc/init.d/bind9 restart
servidor WEB
Paso 1: Configuración de la NIC
En este caso en particular, se le ha asignado al servidor WEB, la dirección IP 10.0.50.3
root$ nano /etc/network/interfaces
auto lo iface lo inet loopbackallow-hotplug eth1auto eth1iface eth1 inet staticaddress 10.0.50.3network 10.0.50.0broadcast 10.0.50.255netmask 255.255.255.0gateway 10.0.50.254
Paso 2: Reiniciar la NIC
root$ /etc/init.d/networking restart
Se comprueba que las configuraciones tienen éxito con
root$ ifconfig
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
23
en caso de que la interfaz no esta leventada
root$ ifup eth1
Paso 3: Instalación
Se instalaran los paquetes “apache2-mpm-worker”, “apache2-utils”, “apache2-common”,“apache2.2-bin”
root$ aptitude install apache2-mpm-worker apache2-utils apache2.2-common
apache2.2-bin
Si la instalación finaliza sin ningún problema, tendremos instalado un servidor websencillo, el cual podemos probar al abrir en nuestro explorador la URL http://localhost , obien, http://localhost:80 , y de igual forma con http://127.0.0.1
Se muestra una página parecida a la que se muestra a continuación
http://blog.signified.com.au/wp-content/uploads/apache224-install-10.png
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
24
Paso 4: Configurar puertos del servidor
Para agregar, eliminar o modificar los puertos usuados por Apache, tenemos que modificarel archivo /etc/apache2/ports.conf ,por defecto, se tiene solo habilitado el puerto 80 paratodos los virtual host
NameVirtualHost *:80Listen 80
Si se realiza un cambio en este archivo, se debe hacer de igualforma, para/etc/apache2/sites-enabled/000-default
Paso 5: Agregar y configurar el sitio principal
Para agregar un sitio al servidor, en este caso “picudos.org”, se debe crear el archivo“picudos.org” dentro del directorio /etc/apache2/sites-available/picudos.org , es posiblecrear tantos servidores virtuales como sean necesarios, ya sea con un nombre de dominio,o bien, con una dirección IP
root$ nano /etc/apache2/sites-available/picudos.org
En este archivo, deberá crearse una descripción del servidor virtual, parecida a la siguiente
<VirtualHost *:80> ServerAdmin [email protected] ServerName www.picudos.org ServerAlias www.picudos.org DocumentRoot /var/www/picudos.org/public_html/ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>
Donde:
<VirtualHost *:80> Indica el Puerto a escuchar
ServerAdmin Correo electrónico del administrador del sitio
ServerAlias El dominio que hace referencia al servicio
DocumentRoot Ubicación de los archivos (contenido WEB)
ErrorLog Archivo donde se registraran todos los eventos de error
CustomLog Log de eventos del servicio
Dentro de este archivo, es posible activar el soporte para scripts, como es el caso del Perl,
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
25
en cuyo caso, se agregarían las siguientes líneas
Options ExecCGIAddHandler cgi-script .pl
Los directorios para almacenar los sitios y los archivos de log deberán ser creados a mano
root$ mkdir –p /var/www/picudos.org/public_html/
root$ mkdir –p /var/www/picudos.org/logs/
Se deberán modificar de igual forma, los archivos para el servicio por default
root$ nano /etc/apache2/sites-available/default
<VirtualHost *:80>ServerAdmin [email protected]
DocumentRoot /var/www/picudos.org/public_html<Directory />
Options FollowSymLinksAllowOverride None</Directory>ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<Directory “ /usr/lib/cgi-bin/”>
AllowOverride NoneOptions +ExecCGI –MultiViews + SymLinksIfOwnerMatch
Order allow,denyAllow from all
</Directory>ErrorLog ${APACHE_LOG_DIR}/error.logLogLevel warnCustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>
Paso 6: Activar el sitio
A continuación es necesario activar los sitios, para lo cual se hace uso del comando
root$ a2ensite picudos.org
Reiniciamos el servidor Apache
root$ /etc/init.d/apache2 restart
Recargamos la configuración
root$ /etc/init.d/apache2 reload
Instalación manual de módulos
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
26
Paso 7: Instalación de MySQL
Como root, ejecutar el siguiente comando para su instalación
root$ aptitude install mysql-server
Se pedirá que se ingrese la contraseña para el usuario root, este será el administrador dela base de datos, en este caso el usuario root para la base de datos, no es el mismo que elusuario root del sistema.
Paso 8: Acceso a la base de datos
Para acceder a la base de datos tecleamos el siguiente comando
root$ mysql –h localhost –u root –p
Nos pedirá la contraseña, la ingresamos
Para salir
mysql> \q
Paso 9: Instalación de un Blog Wordpress
Descargamos los archivos necesarios de http://wordpress.org/download/, con lo cualtendremos un archivo llamado wordpress-3.4.2.tar.gz, el cual podría cambiar dependiendode la versión disponible hasta el momento.
Bajamos el archivo
root$ wget http://wordpress.org/latest.tar.gz
Extraer los archivos
root$ tar –xvf lastest.tar.gz
root$ cd wordpress
Crear la carpeta /var/www/picudos.org/public_html/blog
root$ mkdir –p /var/www/picudos.org/public_html/blog
Copiar los archivos de Wordpress
root$ cp –rvf worpress/* /var/www/picudos.org/public_html/blog
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
27
Paso 10: Configurar el Blog
Aparecerá una pantalla, como la que se muestra a continuación, indicando que no se tieneuna configuración correcta para el archivo wp-config.php
<<<IMAGEN: wordpress1>>>
Se debe dar click en el botón Create config file, seguir los pasos que se indican.
Para la conexión a la base de datos, se tienen los siguientes campos
Database Name – Nombre de la base de datosque usara Wordpress, el nombre lo eleginosnosotros
User Name – Usuario con el cual accedera Wordpress a la base de datos, lo masrecomendable es crear uno nuevo, sin embargo, se puede usar al usuario root
Password – La contraseña del usuario root (el usuario root de la base de datos, no la delroot del sistema)
Database Host – Es la ubicación del servidor de base de datos, debido a que en nuestrocaso es la misma maquina, es valido poner localhost
Table Prefix – Se utiliza para ofrecer la posibilidad de utilizar la misma base de datos paradiferentes aplicaciones o varios blogs, diferenciando las tablas de cada uno por un prefijodiferente, por convención, este no debe ser mayor a 5 caracteres y terminar en guión bajo
<<<IMAGEN wordpress2 >>
Al dar click en siguiente nos apoarecera un mensaje indicando que no es posibleconectarse a la base de datos, esto es debido a que aún no existe, debemos crearla, paraesto.
Paso 11: Crear la base de datos
Conectarse al servidor de base de datos
root$ mysql –h localhost –u root –p
Nos pedirá que ingresemos el password y después de eso, estamos conectados a la basede datos.
mysql> créate database wordpress;
Salimos con \q
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
28
Paso 12: Finalizar la configuración
Volviendo a la página de wordpress, presionamos F5
Es posible que el directorio donde debe guardarse el archivo wp-config.php no tenga losprivilegios necesarios, de ser así, se nos pedirá que lo creemos de forma manual, copiar eltexto que la pagina nos da y crearlo
root$ cd /var/www/picudos.org/public_html/blog
root$ gedit wp-config.php
Pegar el texto y guardar
root$ chgrp –Rv www-data *
Paso 13: Configurar usuario admin
Desde el navegador, ingresamos a http:/localhost/blog y seguimos los pasos hayindicados y el blog estará listo para ser usado
Paso 14: Eliminar el instalador
Renombramos al archivo install.php por seguridad
root$ mv wp-admin/install.php wp-admin/00_.php
Paso 15: Creación de un alias para el Blog
root$ cd /etc/apache2/sites-available
root$ nano blog.picudos.org
<VirtualHost *:80> ServerAdmin [email protected] ServerName blog.picudos.org ServerAlias blog.picudos.org DocumentRoot /var/www/picudos.org/public_html/ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>
Paso 16: Levantando el sitio
root$ a2ensite blog.picudos.org
Se deberá agregar correctamente el registro de blog.picudos.org al DNS
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
29
root$ /etc/init.d/apache2 restart
root$ /etc/init.d/apache2 reload
<<IMAGEN wordpress3>>
Paso 17: Instalación del AppServer Tomcat
Como root, instalar los paquetes para el servidor Tomcat 6 con el siguiente comando
root$ aptitude install authbind java-common libcommons-dbcp-java
libcommons-pool-java libecj-java libtomcat6-java tomvat6-common tomcat6-admin
tomcat6 examples tomcat6-user
El servidor de aplicaciones Tomcat 6, se ejecutara como si fuese un servidor web, peroeste escuchara peticiones en el puerto 8080, si la instalación tuvo éxito, se tendrá, al igualque en Apache, una pagina web en http://localhost:8080 como la siguiente
http://sukharevd.net/files/blog/java2ee/tomcat-ff-it-works.png
Paso 18: Configuración del Firewall
Se utiliza iptables para la configuración del firewall, el cual tiene como política por defectoel rechazar toda conexión entrante o saliente.
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
30
Crear el script que configurara al firewalll
root$ nano firewall.sh
#!/bin/sh##FIREWALLiptables –P INPUT DROPiptables –P OUTPUT DROPiptables –P FORWARD DROPiptables –Fiptables –F INPUTiptables –F OUTPUTiptables –F FORWARDiptables –F –t mangleiptables –Xiptables –A INPUT –I lo –j ACCEPTiptables –a OUTPUT –o lo –j ACCEPTiptables –A FORWARD –I eth2 –o eth2 –j ACCEPTiptables –A INPUT –p icmp –icmp-type echo-request –j ACCEPTiptables –A OUTPUT –p icmp –icmp-type echo-reply –j ACCEPTiptables –A INPUT –p tcp --dport 80 –I eth2 –j ACCEPTiptables –A OUTPUT –p tcp --sport 80 –o eth2 –j ACCEPTiptables –A INPUT –p tcp --dport 8080 –I eth2 –j ACCEPTiptables –A OUTPUT –p tcp --sport 8080 –o eth2 –j ACCEPTiptables –A INPUT –p udp --dport 53 –I eth2 –j ACCEPTiptables –A OUTPUT –p tcp --sport 53 –o eth2 –j ACCEPT
Paso 19: Firewall como servicio
CONFIGURACIÓN INALÁMBRICA
PRUEBAS REALIZADAS
Prueba de conexión en red
Prueba de asignación de direcciones
Prueba de resolución de nombres
Prueba de sitios web
Prueba de firewall de servidor
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
31
Prueba de enmascaramiento de red
Prueba de port forward
Prueba de firewall de red
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
32
BIBLIOGRAFÍA
Linux Config. (17 de 1 de 2001). Recuperado el 15 de 10 de 2012, de Linux DNS serverBIND configuration: http://linuxconfig.org/linux-dns-server-bind-configuration
Recopilatorio de ayuda para redes. (19 de 02 de 2009). Recuperado el 15 de 10 de 2012, deConfigurar DNS en Ubuntu Server:http://ayudaredes.wordpress.com/2009/02/19/38
3.1.3. Servidor DNS - Servidor Debian Squeeze. (26 de 10 de 2012). Recuperado el 30 de10 de 2012, de http://servidordebian.wikidot.com/squeeze-es:intranet-dns-server
Default Gateway. (10 de 2012). Recuperado el 26 de 10 de 2012, dehttp://librosnetworking.blogspot.mx/2012/10/default-gateway.html
Slice of Linux. (21 de 04 de 2012). Recuperado el 15 de 10 de 2012, de Instalar y configurarun servidor DNS con Ubuntu Server paso a paso:http://sliceoflinux.wordpress.com/2010/04/21/instalar-y-configurar-un-servidor-dns-con-ubuntu-server-paso-a-paso/
Apache Foundation. (2012). Apache. Recuperado el 30 de 10 de 2012, dehttp://httpd.apache.org/docs/2.4
Barbone, V. A. (10 de 2001). Facultad de Ingeniería - Montevideo, Uruguay. Recuperado el15 de 10 de 2012, de http://iie.fing.edu.uy/~vagonbar/debian/dns.htm
CentOS. (s.f.). CentOS. Recuperado el 10 de 10 de 2012, de Configuring a DHCP Server:http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-dhcp-configuring-server.html
Comunidad de software libre. (2012). Comunidad de Software Libre. Recuperado el 30 de10 de 2012, de Com-SL:http://www.com-sl.org/configuración-servidor-dns-linux-debian.html
Debian Admin. (s.f.). Change hostname or Server name of a Linux Machine. Recuperado el5 de 10 de 2012, dehttp://www.debianadmin.com/change-hostname-or-server-name-of-a-linux-machine.html
Debian. (s.f.). Debian. Recuperado el 15 de 10 de 2012, de Wiki: http://wiki.debian.org
Fábian, V. P. (s.f.). Prácticas de servicios en red y aplicaciones WEB.
Fábian, V. P. (s.f.). Prácticas de servicios en red y aplicaciones WEB.
IES San Clemente. (s.f.). IES San Clemente. Recuperado el 16 de 10 de 2012, deConfiguración de DHCP Server en Debian - Manuais Referencia Departamento
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
33
Infoirmática:http://informatica.iessanclemente.net/manuais/index.php/Configuraci%C3%B3n_de_DHCP_Server_en_Debian
Iptables. (s.f.). Recuperado el 26 de 10 de 2012, dehttp://ccia.ei.uvigo.es/docencia/ssi/iptables.pdf
Izaskun, P. (s.f.). Redes WLAN, Fundamentos y aplicaciones de seguridad. Marcombo.
Javier, G. P. (10 de 2012). RFC-ES. Recuperado el 15 de 10 de 2012, dehttp://www.rfc-es.org/rfc/rfc1034-es.txt
Linux para todos. (s.f.). Recuperado el 18 de 10 de 2012, de Servidor de nombres dedominio (DNS) en Ubuntu - Base de Conocimiento -:http://www.linuxparatodos.net//web/comunidad/base-de-conocimientos//wiki/Base%20Conocimiento/Servidor%20de%20Nombres%20de%20Dominio%20(DNS)%20en%20Ubuntu
NEILD Sébastian, D. T. (s.f.). Windows Server 2008 R2, Administración avanzda. EdicionesENI.
pfabrega, P. P. (2003). Recuperado el 15 de 10 de 2012, dehttp://dns.bdat.net/dhcp/x84.html
Philippe, F. (s.f.). Windows Server 2008. Los servicios de red TCP/IP. ENI.
Purificación, A. L. (s.f.). Seguridad Informática. Informática y comunicaciones. Editex.
Rodil Jiménez Irene, P. d. (s.f.). Operaciones auxiliares con tecnologías de la información yla comubnicación. Editorial Parainfo.
Server Fault. (s.f.). Server Fault. Recuperado el 10 de 10 de 2012, de Linux - How can I listmy open ports on Debian?:http://serverfault.com/questions/357323/how-can-i-list-my-open-ports-on-debian
Servidor Protocolo de Configuración Dinámica de Host (DHCP) - Base de Conocimiento -.(s.f.). Recuperado el 10 de 10 de 2012, dehttp://www.linuxparatodos.net//web/comunidad/base-de-conocimiento/-/wiki/Base%20de%20Conocimiento/Servidor%20Protocolo%20de%20Configuraci%c3%b3n%20Din%c3%a1mica%20de%20Host%20(DHCP)#section-Servidor+Protocolo+de+Configuraci_C3_B3n+Din_C3_A1mica+de+Host+_2
Sivianes Castillo Francisco, S. A. (s.f.). Servicioes en Red, sistemas Informáticos y Redes.Paraninfo.
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
34
Solusan. (s.f.). Solusan. Recuperado el 5 de 10 de 2012, de /etc/network/interfaces de unplumazo: http://www.solusan.com/etcnetworkinterfaces-de-un-plumazo.html
The Linux Documentation Project. (s.f.). DHCP Server Setup. Recuperado el 10 de 10 de2012, de http://tldp.org/HOWTO/DHCP/x369.html
Ubuntu es. (06 de 08 de 2007). [Howto] Servidor DNS | Ubuntu-es. Recuperado el 15 de 10de 2012, de http://www.ubuntu-es.org/node/58688#.UHeGPYoUfLU
Ubuntu. (s.f.). Ubuntu Forums. Recuperado el 10 de 10 de 2012, dehttp://ubuntuforums.org/showthread.php?t=1209620
wikidot. (s.f.). Servidor DHCP - Servidor Debian Squeeze. Recuperado el 10 de 10 de 2012,de http://servidordebian.wikidot.com/squeeze-es:intranet-dhcp-server
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
35
INDICE
A
APACHE 11
B
BIBLIOGRAFÍA 31
C
CONCEPTOS BÁSICOS 7
Configuración de la NIC 15
Configuración de los clientes 17
Configuración del servicio 15
D
Database Host 26
Database Name 26
DCHP 10
Default Gateway 7, 31
DHCP 2, 7, 10, 15, 16, 17, 32, 33
DHCPACK 10
DHCPDISCOVER 10
DHCPNAK 10
DHCPOFFER 10
DHCPRELEASE 10
DHCPREQUEST 10
DIAGRAMA DE RED 12
DNS 2, 7, 9, 10, 16, 18, 19, 20, 32, 34
DNS (Domain Name System) 9
DNS secundario 20
E
Expire 20
F
Firewall 8
G
Gateway 7
H
HTTP 11
I
IEEE 802.11i 11
Instalación 14, 18
Instalación y configuración de un servidor DHCP14
Instalación y configuración de un servidor DNS 18
INTRODUCCIÓN 7
iptables 3, 13, 14, 29, 30, 32
Iptables 9
M
Mail eXchanger 20
MEMORIA TÉCNICA 13
MX 20
N
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
36
NAT 8, 9
NAT (Network Address Translation) 8
NETFILTER 8, 9
NS1 20
P
Password 26
Pruebas realizadas 30
R
Refresh 20
Retry 20
RFC 2616 11
S
Serial 20
T
Table Prefix 26
TTL 20
U
User Name 26
W
WEB 10, 19, 31
WPA 11
WPA2 11
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
37
GNU FREE DOCUMENTATION LICENSE
Version 1.3, 3 November 2008Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.<http://fsf.org/>Everyone is permitted to copy and distribute verbatim copies of this licensedocument, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other functional anduseful document "free" in the sense of freedom: to assure everyone the effectivefreedom to copy and redistribute it, with or without modifying it, eithercommercially or noncommercially. Secondarily, this License preserves for the authorand publisher a way to get credit for their work, while not being consideredresponsible for modifications made by others.This License is a kind of "copyleft", which means that derivative works of thedocument must themselves be free in the same sense. It complements the GNUGeneral Public License, which is a copyleft license designed for free software.We have designed this License in order to use it for manuals for free software,because free software needs free documentation: a free program should come withmanuals providing the same freedoms that the software does. But this License is notlimited to software manuals; it can be used for any textual work, regardless ofsubject matter or whether it is published as a printed book. We recommend thisLicense principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that contains anotice placed by the copyright holder saying it can be distributed under the terms ofthis License. Such a notice grants a world-wide, royalty-free license, unlimited induration, to use that work under the conditions stated herein. The "Document",below, refers to any such manual or work. Any member of the public is a licensee,and is addressed as "you". You accept the license if you copy, modify or distribute thework in a way requiring permission under copyright law.A "Modified Version" of the Document means any work containing the Document ora portion of it, either copied verbatim, or with modifications and/or translated intoanother language.A "Secondary Section" is a named appendix or a front-matter section of theDocument that deals exclusively with the relationship of the publishers or authors ofthe Document to the Document's overall subject (or to related matters) and containsnothing that could fall directly within that overall subject. (Thus, if the Document isin part a textbook of mathematics, a Secondary Section may not explain anymathematics.) The relationship could be a matter of historical connection with thesubject or with related matters, or of legal, commercial, philosophical, ethical orpolitical position regarding them.
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
38
The "Invariant Sections" are certain Secondary Sections whose titles are designated,as being those of Invariant Sections, in the notice that says that the Document isreleased under this License. If a section does not fit the above definition ofSecondary then it is not allowed to be designated as Invariant. The Document maycontain zero Invariant Sections. If the Document does not identify any InvariantSections then there are none.The "Cover Texts" are certain short passages of text that are listed, as Front-CoverTexts or Back-Cover Texts, in the notice that says that the Document is releasedunder this License. A Front-Cover Text may be at most 5 words, and a Back-CoverText may be at most 25 words.A "Transparent" copy of the Document means a machine-readable copy, representedin a format whose specification is available to the general public, that is suitable forrevising the document straightforwardly with generic text editors or (for imagescomposed of pixels) generic paint programs or (for drawings) some widely availabledrawing editor, and that is suitable for input to text formatters or for automatictranslation to a variety of formats suitable for input to text formatters. A copy madein an otherwise Transparent file format whose markup, or absence of markup, hasbeen arranged to thwart or discourage subsequent modification by readers is notTransparent. An image format is not Transparent if used for any substantial amountof text. A copy that is not "Transparent" is called "Opaque".Examples of suitable formats for Transparent copies include plain ASCII withoutmarkup, Texinfo input format, LaTeX input format, SGML or XML using a publiclyavailable DTD, and standard-conforming simple HTML, PostScript or PDF designedfor human modification. Examples of transparent image formats include PNG, XCFand JPG. Opaque formats include proprietary formats that can be read and editedonly by proprietary word processors, SGML or XML for which the DTD and/orprocessing tools are not generally available, and the machine-generated HTML,PostScript or PDF produced by some word processors for output purposes only.The "Title Page" means, for a printed book, the title page itself, plus such followingpages as are needed to hold, legibly, the material this License requires to appear inthe title page. For works in formats which do not have any title page as such, "TitlePage" means the text near the most prominent appearance of the work's title,preceding the beginning of the body of the text.The "publisher" means any person or entity that distributes copies of the Documentto the public.A section "Entitled XYZ" means a named subunit of the Document whose title eitheris precisely XYZ or contains XYZ in parentheses following text that translates XYZ inanother language. (Here XYZ stands for a specific section name mentioned below,such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To"Preserve the Title" of such a section when you modify the Document means that itremains a section "Entitled XYZ" according to this definition.The Document may include Warranty Disclaimers next to the notice which statesthat this License applies to the Document. These Warranty Disclaimers areconsidered to be included by reference in this License, but only as regardsdisclaiming warranties: any other implication that these Warranty Disclaimers mayhave is void and has no effect on the meaning of this License.
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
39
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either commercially ornoncommercially, provided that this License, the copyright notices, and the licensenotice saying this License applies to the Document are reproduced in all copies, andthat you add no other conditions whatsoever to those of this License. You may notuse technical measures to obstruct or control the reading or further copying of thecopies you make or distribute. However, you may accept compensation in exchangefor copies. If you distribute a large enough number of copies you must also followthe conditions in section 3.You may also lend copies, under the same conditions stated above, and you maypublicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have printedcovers) of the Document, numbering more than 100, and the Document's licensenotice requires Cover Texts, you must enclose the copies in covers that carry, clearlyand legibly, all these Cover Texts: Front-Cover Texts on the front cover, andBack-Cover Texts on the back cover. Both covers must also clearly and legiblyidentify you as the publisher of these copies. The front cover must present the fulltitle with all words of the title equally prominent and visible. You may add othermaterial on the covers in addition. Copying with changes limited to the covers, aslong as they preserve the title of the Document and satisfy these conditions, can betreated as verbatim copying in other respects.If the required texts for either cover are too voluminous to fit legibly, you should putthe first ones listed (as many as fit reasonably) on the actual cover, and continue therest onto adjacent pages.If you publish or distribute Opaque copies of the Document numbering more than100, you must either include a machine-readable Transparent copy along with eachOpaque copy, or state in or with each Opaque copy a computer-network locationfrom which the general network-using public has access to download usingpublic-standard network protocols a complete Transparent copy of the Document,free of added material. If you use the latter option, you must take reasonablyprudent steps, when you begin distribution of Opaque copies in quantity, to ensurethat this Transparent copy will remain thus accessible at the stated location until atleast one year after the last time you distribute an Opaque copy (directly or throughyour agents or retailers) of that edition to the public.It is requested, but not required, that you contact the authors of the Document wellbefore redistributing any large number of copies, to give them a chance to provideyou with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under theconditions of sections 2 and 3 above, provided that you release the Modified Versionunder precisely this License, with the Modified Version filling the role of theDocument, thus licensing distribution and modification of the Modified Version to
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
40
whoever possesses a copy of it. In addition, you must do these things in the ModifiedVersion:
• A. Use in the Title Page (and on the covers, if any) a title distinct from that of theDocument, and from those of previous versions (which should, if there were any, belisted in the History section of the Document). You may use the same title as aprevious version if the original publisher of that version gives permission.
• B. List on the Title Page, as authors, one or more persons or entities responsible forauthorship of the modifications in the Modified Version, together with at least fiveof the principal authors of the Document (all of its principal authors, if it has fewerthan five), unless they release you from this requirement.
• C. State on the Title page the name of the publisher of the Modified Version, as thepublisher.
• D. Preserve all the copyright notices of the Document.• E. Add an appropriate copyright notice for your modifications adjacent to the other
copyright notices.• F. Include, immediately after the copyright notices, a license notice giving the public
permission to use the Modified Version under the terms of this License, in the formshown in the Addendum below.
• G. Preserve in that license notice the full lists of Invariant Sections and required CoverTexts given in the Document's license notice.
• H. Include an unaltered copy of this License.• I. Preserve the section Entitled "History", Preserve its Title, and add to it an item
stating at least the title, year, new authors, and publisher of the Modified Version asgiven on the Title Page. If there is no section Entitled "History" in the Document,create one stating the title, year, authors, and publisher of the Document as givenon its Title Page, then add an item describing the Modified Version as stated in theprevious sentence.
• J. Preserve the network location, if any, given in the Document for public access to aTransparent copy of the Document, and likewise the network locations given in theDocument for previous versions it was based on. These may be placed in the"History" section. You may omit a network location for a work that was published atleast four years before the Document itself, or if the original publisher of the versionit refers to gives permission.
• K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title ofthe section, and preserve in the section all the substance and tone of each of thecontributor acknowledgements and/or dedications given therein.
• L. Preserve all the Invariant Sections of the Document, unaltered in their text and intheir titles. Section numbers or the equivalent are not considered part of the sectiontitles.
• M. Delete any section Entitled "Endorsements". Such a section may not be included inthe Modified Version.
• N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict intitle with any Invariant Section.
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
41
• O. Preserve any Warranty Disclaimers.If the Modified Version includes new front-matter sections or appendices that qualifyas Secondary Sections and contain no material copied from the Document, you mayat your option designate some or all of these sections as invariant. To do this, addtheir titles to the list of Invariant Sections in the Modified Version's license notice.These titles must be distinct from any other section titles.You may add a section Entitled "Endorsements", provided it contains nothing butendorsements of your Modified Version by various parties—for example, statementsof peer review or that the text has been approved by an organization as theauthoritative definition of a standard.You may add a passage of up to five words as a Front-Cover Text, and a passage of upto 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the ModifiedVersion. Only one passage of Front-Cover Text and one of Back-Cover Text may beadded by (or through arrangements made by) any one entity. If the Documentalready includes a cover text for the same cover, previously added by you or byarrangement made by the same entity you are acting on behalf of, you may not addanother; but you may replace the old one, on explicit permission from the previouspublisher that added the old one.The author(s) and publisher(s) of the Document do not by this License givepermission to use their names for publicity for or to assert or imply endorsement ofany Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this License,under the terms defined in section 4 above for modified versions, provided that youinclude in the combination all of the Invariant Sections of all of the originaldocuments, unmodified, and list them all as Invariant Sections of your combinedwork in its license notice, and that you preserve all their Warranty Disclaimers.The combined work need only contain one copy of this License, and multipleidentical Invariant Sections may be replaced with a single copy. If there are multipleInvariant Sections with the same name but different contents, make the title of eachsuch section unique by adding at the end of it, in parentheses, the name of theoriginal author or publisher of that section if known, or else a unique number. Makethe same adjustment to the section titles in the list of Invariant Sections in the licensenotice of the combined work.In the combination, you must combine any sections Entitled "History" in the variousoriginal documents, forming one section Entitled "History"; likewise combine anysections Entitled "Acknowledgements", and any sections Entitled "Dedications". Youmust delete all sections Entitled "Endorsements".
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents releasedunder this License, and replace the individual copies of this License in the variousdocuments with a single copy that is included in the collection, provided that youfollow the rules of this License for verbatim copying of each of the documents in all
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
42
other respects.You may extract a single document from such a collection, and distribute itindividually under this License, provided you insert a copy of this License into theextracted document, and follow this License in all other respects regarding verbatimcopying of that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate andindependent documents or works, in or on a volume of a storage or distributionmedium, is called an "aggregate" if the copyright resulting from the compilation isnot used to limit the legal rights of the compilation's users beyond what theindividual works permit. When the Document is included in an aggregate, thisLicense does not apply to the other works in the aggregate which are not themselvesderivative works of the Document.If the Cover Text requirement of section 3 is applicable to these copies of theDocument, then if the Document is less than one half of the entire aggregate, theDocument's Cover Texts may be placed on covers that bracket the Document withinthe aggregate, or the electronic equivalent of covers if the Document is in electronicform. Otherwise they must appear on printed covers that bracket the wholeaggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may distribute translationsof the Document under the terms of section 4. Replacing Invariant Sections withtranslations requires special permission from their copyright holders, but you mayinclude translations of some or all Invariant Sections in addition to the originalversions of these Invariant Sections. You may include a translation of this License,and all the license notices in the Document, and any Warranty Disclaimers, providedthat you also include the original English version of this License and the originalversions of those notices and disclaimers. In case of a disagreement between thetranslation and the original version of this License or a notice or disclaimer, theoriginal version will prevail.If a section in the Document is Entitled "Acknowledgements", "Dedications", or"History", the requirement (section 4) to Preserve its Title (section 1) will typicallyrequire changing the actual title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except as expresslyprovided under this License. Any attempt otherwise to copy, modify, sublicense, ordistribute it is void, and will automatically terminate your rights under this License.However, if you cease all violation of this License, then your license from aparticular copyright holder is reinstated (a) provisionally, unless and until thecopyright holder explicitly and finally terminates your license, and (b) permanently,if the copyright holder fails to notify you of the violation by some reasonable meansprior to 60 days after the cessation.
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
43
Moreover, your license from a particular copyright holder is reinstated permanentlyif the copyright holder notifies you of the violation by some reasonable means, this isthe first time you have received notice of violation of this License (for any work)from that copyright holder, and you cure the violation prior to 30 days after yourreceipt of the notice.Termination of your rights under this section does not terminate the licenses ofparties who have received copies or rights from you under this License. If yourrights have been terminated and not permanently reinstated, receipt of a copy ofsome or all of the same material does not give you any rights to use it.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of the GNU FreeDocumentation License from time to time. Such new versions will be similar in spiritto the present version, but may differ in detail to address new problems or concerns.See http://www.gnu.org/copyleft/.Each version of the License is given a distinguishing version number. If theDocument specifies that a particular numbered version of this License "or any laterversion" applies to it, you have the option of following the terms and conditionseither of that specified version or of any later version that has been published (not asa draft) by the Free Software Foundation. If the Document does not specify a versionnumber of this License, you may choose any version ever published (not as a draft)by the Free Software Foundation. If the Document specifies that a proxy can decidewhich future versions of this License can be used, that proxy's public statement ofacceptance of a version permanently authorizes you to choose that version for theDocument.
11. RELICENSING
"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World WideWeb server that publishes copyrightable works and also provides prominentfacilities for anybody to edit those works. A public wiki that anybody can edit is anexample of such a server. A "Massive Multiauthor Collaboration" (or "MMC")contained in the site means any set of copyrightable works thus published on theMMC site."CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 licensepublished by Creative Commons Corporation, a not-for-profit corporation with aprincipal place of business in San Francisco, California, as well as future copyleftversions of that license published by that same organization."Incorporate" means to publish or republish a Document, in whole or in part, as partof another Document.An MMC is "eligible for relicensing" if it is licensed under this License, and if allworks that were first published under this License somewhere other than this MMC,and subsequently incorporated in whole or in part into the MMC, (1) had no covertexts or invariant sections, and (2) were thus incorporated prior to November 1,2008.The operator of an MMC Site may republish an MMC contained in the site under
GNU Free Docu
mentatio
n License
Version 1.3, 3
Nove
mber 2008 http
://www.gnu.org/co
pyleft/
fdl.htm
l
44
CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC iseligible for relicensing.
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of the License inthe document and put the following copyright and license notices just after the titlepage:
Copyright (C) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the"with … Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other combination of thethree, merge those two alternatives to suit the situation.If your document contains nontrivial examples of program code, we recommendreleasing these examples in parallel under your choice of free software license, suchas the GNU General Public License, to permit their use in free software.