Séquence 8 - Bases des réseaux - suite Jean.Saquet@info.unicaen.fr, Gaetan.Richard@info.unicaen.fr



Documents pareils
Module 7 : Configuration du serveur WEB Apache

TP HTTP. Université Pierre Mendès France U.F.R. Sciences de l Homme et de la Société Master IC²A

Instructions Mozilla Thunderbird Page 1

Préparation d un serveur Apache pour Zend Framework

WEB page builder and server for SCADA applications usable from a WEB navigator

Les serveurs WEBUne introduction

Configuration du serveur Web Apache. Master 1 STIC-Informatique 1

REPARTITION DE CHARGE LINUX

SERVEUR HTTP Administration d apache

Installation d un hébergement Web à domicile

Installation GLPI-OCSNG-SSL Linux Debian Sarge

Sécurité des systèmes d exploitation

Ocs Inventory et GLPI s appuie sur un serveur LAMP. Je vais donc commencer par installer les paquets nécessaires.

DOCUMENTATION - FRANCAIS... 2

Gestion des prestations Volontaire

How to Login to Career Page

Instructions pour mettre à jour un HFFv2 v1.x.yy v2.0.00

Quick Start Guide This guide is intended to get you started with Rational ClearCase or Rational ClearCase MultiSite.

DOCUMENTATION - FRANCAIS... 2

Contents Windows

Supervision et infrastructure - Accès aux applications JAVA. Document FAQ. Page: 1 / 9 Dernière mise à jour: 15/04/12 16:14

Procédure d'installation

WiFi Security Camera Quick Start Guide. Guide de départ rapide Caméra de surveillance Wi-Fi (P5)

Application Form/ Formulaire de demande

that the child(ren) was/were in need of protection under Part III of the Child and Family Services Act, and the court made an order on

Présentation. Protocole FTP. Initiation. Proftpd

Utiliser une WebCam. Micro-ordinateurs, informations, idées, trucs et astuces

APPENDIX 6 BONUS RING FORMAT

2011 Hakim Benameurlaine 1

Les techniques de la télémaintenance

Imprimantes et partage réseau sous Samba avec authentification Active Directory

Principe de TrueCrypt. Créer un volume pour TrueCrypt

TABLE DES MATIERES A OBJET PROCEDURE DE CONNEXION

Installation UpdatEngine serveur (CentOs apache2 / MySQL)

Administration réseau sous Linux

1 Configuration des Fichiers Hosts, Hostname, Resolv.conf

Administration Linux - FTP

calls.paris-neuroscience.fr Tutoriel pour Candidatures en ligne *** Online Applications Tutorial

VTP. LAN Switching and Wireless Chapitre 4

Notice Technique / Technical Manual

UE5A Administration Réseaux LP SIRI

Règles et paramètres d'exploitation de Caparmor 2 au 11/12/2009. Pôle de Calcul Intensif pour la mer, 11 Decembre 2009

TP LINUX : LINUX-SAMBA SERVEUR DE FICHIERS POUR UTILISATEURS WINDOWS

Nouveautés printemps 2013

Serveur Subversion Debian GNU/Linux

TP Service HTTP Serveur Apache Linux Debian

RULE 5 - SERVICE OF DOCUMENTS RÈGLE 5 SIGNIFICATION DE DOCUMENTS. Rule 5 / Règle 5

Practice Direction. Class Proceedings

et Active Directory Ajout, modification et suppression de comptes, extraction d adresses pour les listes de diffusion

PUPPET. Romain Bélorgey IR3 Ingénieurs 2000

Tutoriel compte-rendu Mission 1

3615 SELFIE. HOW-TO / GUIDE D'UTILISATION

Micro-ordinateurs, informations, idées, trucs et astuces utiliser le Bureau à distance

Vanilla : Virtual Box

Déploiement d OCS 1.02 RC2 sous Debian Etch 64

Academic Project. B2- Web Development. Resit Project. Version 1.0 Last update: 24/05/2013 Use: Students Author: Samuel CUELLA

Maîtriser Apache. Benjamin Drieu. version

Once the installation is complete, you can delete the temporary Zip files..

Mon Service Public - Case study and Mapping to SAML/Liberty specifications. Gaël Gourmelen - France Telecom 23/04/2007

Installation et configuration d Apache sous Linux RedHat 7.1. Pascal AUBRY Ambroise DIASCORN IFSIC Université de Rennes 1

MELTING POTES, LA SECTION INTERNATIONALE DU BELLASSO (Association étudiante de lʼensaparis-belleville) PRESENTE :

Gérer ses environnements de développement avec Vagrant RMLL 2012

TP n 2 : Installation et administration du serveur ProFTP. Partie 1 : Fonctionnement du protocole FTP (pas plus de 15min)

Le serveur Web : Apache

Acce s aux applications informatiques Supply Chain Fournisseurs

First Nations Assessment Inspection Regulations. Règlement sur l inspection aux fins d évaluation foncière des premières nations CONSOLIDATION

Outils d'analyse de la sécurité des réseaux. HADJALI Anis VESA Vlad

Dans l'épisode précédent

TD4 - Supervision et métrologie des réseaux. 1 Supervision des applications et services réseaux et des ressources locales

REMBO Version 2.0. Mathrice 2004 DESCRIPTION MISE EN OEUVRE CONCLUSION.

Installer un domaine DNS

Compléter le formulaire «Demande de participation» et l envoyer aux bureaux de SGC* à l adresse suivante :

Contrôle d'accès Access control. Notice technique / Technical Manual

AMENDMENT TO BILL 32 AMENDEMENT AU PROJET DE LOI 32

Installation d'un Contrôleur Principal de Domaine SAMBA 4

France SMS+ MT Premium Description

Exemple PLS avec SAS

DOCUMENTATION MODULE BLOCKCATEGORIESCUSTOM Module crée par Prestacrea - Version : 2.0

CYBERGATE -TP-APACHE_2.DOC

Surveillance de Scripts LUA et de réception d EVENT. avec LoriotPro Extended & Broadcast Edition

CONFIGURATION DU SERVEUR DE MAILS EXIM. par. G.Haberer, A.Peuch, P.Saade

PPE Installation d un serveur FTP

Comment avoir le logiciel? Le serveur web APACHE peut être téléchargé gratuitement du site web de APACHE:

TP LINUX : MISE EN PLACE DU SERVEUR DE MESSAGERIE QMAIL

DOCUMENTATION - FRANCAIS... 2

titre : CENTOS_CUPS_install&config Système : CentOs 5.7 Technologie : Cups Auteur : Charles-Alban BENEZECH

INSTALLATION DE WINDOWS 2000 SERVER POUR BCDI3. par. G.Haberer, A.Peuch, P.Saadé

The new consumables catalogue from Medisoft is now updated. Please discover this full overview of all our consumables available to you.

MANUEL MARKETING ET SURVIE PDF

CONVENTION DE STAGE TYPE STANDART TRAINING CONTRACT

SERVEUR DÉDIÉ DOCUMENTATION

Les Portfolios et Moodle Petit inventaire

Linux et le Shell. Francois BAYART. Atelier du samedi 20 Novembre

GIGABIT PCI DESKTOP ADAPTER DGE-530T. Quick Installation Guide+ Guide d installation+

Le passé composé. C'est le passé! Tout ça c'est du passé! That's the past! All that's in the past!

Chapitre VIII : Journalisation des événements

Apache 2.4 Installation et configuration

Transcription:

Université de CAEN U.F.R. de Sciences Licence d informatique Semestre 5- EI51 - Réseau Séquence 8 - Bases des réseaux - suite Jean.Saquet@info.unicaen.fr, Gaetan.Richard@info.unicaen.fr 1 Introduction Le T.P. prévoit l installation d un serveur FTP, d un serveur de mail et tous les tests associés. Ce texte à essentiellement pour but de bien comprendre l organisation d un système Linux, ainsi que de regarder les fichiers de configuration des serveurs, afin de préparer le T.P. Il donne également quelques renseignements sur la configuration du serveur web Apache. Les deux premières sections rappellent les grandes lignes de l organisation de l arborescence des fichiers et de la configuration réseau. La section suivante indique comment maintenir une distribution Linux Dabian. Les dernières sections présentent Proftp et ses fichiers de configuration, ainsi que les principes d un serveur de mail et la configuration d Apache. 2 Organisation d une distribution Linux Une distribution Linux est définie au travers d un arborescence, telle que : la configuration des services et du système est définie dans /etc/ Les répertoires utilisateurs sont généralement définis dans /home/ le répertoire du super-utilisateur est défini dans /root/ les périphériques sont définis dans /dev/ le noyau de démarrage est installé dans /boot/ les programmes, de manière générale, sont installés dans /usr/ 3 Configuration d un réseau La configuration réseau dépend des fichiers suivants : la configuration réseau se fait dans le fichier /etc/network/interfaces la configuration du client dhcp se fait dans /etc/dhclient.conf le DNS s inscrit dans /etc/resolv.conf le nom de la machine s inscrit dans /etc/hostname la correspondances statiques de noms d hôtes se fait dans /etc/hosts 4 Maintenance d un système Linux La maintenance d un système Linux repose sur la commande apt-get. Cette commande peut être appelée à partir des commandes de plus haut niveau dselect, aptitude et synaptic. Les deux premières fonctionnent en mode texte et la troisième en mode graphique. Les programmes sont organisés sous forme de paquets avec notion de dépendance entre paquets lorsqu un programme dépend d un autre pour son bon fonctionnement. Comment installer un paquet : apt-get install <nom du paquet> Si un paquet n est pas trouvé car <nom du paquet> ne correspond pas à la véritable dénomination du paquet, alors, il est possible de le rechercher de 2 manières : 1

si apt-file est installé : apt-file search <nom du paquet> (pour l installer : apt-get install apt-file, suivi de apt-file update) interrogation à http ://www.debian.org/distrib/packages apt-get install <nom du paquet> Pour mettre à jour la liste des paquets disponibles, exécutez la commande : apt-get update 5 Exemple de service : Proftpd 5.1 Installation Le service s installe comme suit : apt-get install proftpd Son accessibilité peut être testée en mode utilisateur identifié à partir d un poste de travail, avec le client ftp commande-ligne ou bien un logiciel graphique tel que gftp. 5.2 Configuration Le fichier de configuration se situe dans /etc/proftpd.conf. Il est fourni en annexe A. Essayez d expliquer le rôle des lignes proposées. 6 Serveur de mail Une installation de serveur de mail doit comporter au moins un MTA (Mail Transfer Agent) associé à un domaine Internet. Il utilise le protocole smtp pour dialoguer avec un client qui lui envoie des mails, ainsi que pour les communications avec les MTA des autres domaines. Normalement, la machine qui supporte ce MTA est déclarée dans un enregistrement MX du DNS du domaine (nous ne le ferons pas ici pour des domaines qui n ont pas d existence officielle). En annexe B, le fichier qui enregistre la configuration d Exim. Chaque variable correspond à la réponse à une question posée lors de l installation ou la ré-installation d exim. Essayez de préciser leur rôle. L application historique mail permet à un utilisateur de dialoguer avec le MTA. Afin d offrir à l utilisateur des interfaces plus évoluées, nous installerons un serveur pop, un webmail. Par ailleurs, nous testerons également la récupération de courriers d autres domaines, les relais inter-domaines,... 7 serveur Apache En annexe C, quelques extraits du fichier de configuration d Apache. Essayez de comprendre quelles sont les fonctionnalités configurées et leurs possibilités. 8 Annexe A : fichier de configuration de Proftp This is a basic ProFTPD configuration file (rename it to proftpd.conf for actual use. It establishes a single server and a single anonymous login. It assumes that you have a user/group "nobody/nogroup" and "ftp" for normal operation and anon. ServerName "Debian" ServerType standalone 2

DeferWelcome off MultilineRFC2228 on DefaultServer on ShowSymlinks on AllowOverwrite on TimeoutNoTransfer 600 TimeoutStalled 600 TimeoutIdle 1200 DisplayLogin DisplayFirstChdir ListOptions welcome.msg.message "-l" DenyFilter \*.*/ Uncomment this if you are using NIS or LDAP to retrieve passwords: PersistentPasswd off Uncomment this if you would use TLS module: TLSEngine on Uncomment this if you would use quota module: Quotas on Uncomment this if you would use ratio module: Ratios on Port 21 is the standard FTP port. Port 21 To prevent DoS attacks, set the maximum number of child processes to 30. If you need to allow more than 30 concurrent connections at once, simply increase this value. Note that this ONLY works in standalone mode, in inetd mode you should use an inetd server that allows you to limit maximum number of processes per service (such as xinetd) MaxInstances 30 Set the user and group that the server normally runs at. User nobody Group nogroup <Directory /*> Umask 022 is a good standard umask to prevent new files and dirs (second parm) from being group and world writable. Umask 022 022 Normally, we want files to be overwriteable. AllowOverwrite off A basic anonymous configuration, no upload directories. <Anonymous ~ftp> User ftp Group nogroup We want clients to be able to login with "anonymous" as well as "ftp" UserAlias anonymous ftp 3

RequireValidShell off Limit the maximum number of anonymous logins MaxClients 20 We want welcome.msg displayed at login, and.message displayed in each newly chdired directory. DisplayLogin welcome.msg DisplayFirstChdir.message Limit WRITE everywhere in the anonymous chroot <Directory *> <Limit WRITE> DenyAll </Limit> Uncomment this if you re brave. <Directory incoming> Umask 022 is a good standard umask to prevent new files and dirs (second parm) from being group and world writable. Umask 022 022 <Limit READ WRITE> DenyAll </Limit> <Limit STOR> AllowAll </Limit> </Anonymous> 9 Annexe B : exim4 /etc/exim4/update-exim4.conf.conf Edit this file and /etc/mailname by hand and execute update-exim4.conf yourself or use dpkg-reconfigure exim4-config Please note that this is _not_ a dpkg-conffile and that automatic changes to this file might happen. The code handling this will honor your local changes, so this is usually fine, but will break local schemes that mess around with multiple versions of the file. update-exim4.conf uses this file to determine variable values to replace the DEBCONFsomethingDEBCONF strings in the configuration template files. Most settings found in here do have corresponding questions in the Debconf configuration, but not all of them. This is a Debian specific file dc_eximconfig_configtype= local dc_other_hostnames= coing.info.unicaen.fr dc_local_interfaces= 127.0.0.1 dc_readhost= dc_relay_domains= 4

dc_minimaldns= false dc_relay_nets= dc_smarthost= CFILEMODE= 644 dc_use_split_config= false dc_hide_mailname= dc_mailname_in_oh= true 10 Annexe C : extrait du fichier de configuration d Apache httpd.conf -- Apache HTTP server configuration file Based upon the NCSA server configuration files originally by Rob McCool. This is the main Apache server configuration file. It contains the configuration directives that give the server its instructions. See <URL:http://httpd.apache.org/docs/> for detailed information about the directives. Do NOT simply read the instructions in here without understanding what they do. They re here only as hints or reminders. If you are unsure consult the online docs. You have been warned. The configuration directives are grouped into three basic sections: 1. Directives that control the operation of the Apache server process as a whole (the global environment ). 2. Directives that define the parameters of the main or default server, which responds to requests that aren t handled by a virtual host. These directives also provide default values for the settings of all virtual hosts. 3. Settings for virtual hosts, which allow Web requests to be sent to different IP addresses or hostnames and have them handled by the same Apache server process. Section 1: Global Environment ServerType is either inetd, or standalone. Inetd mode is only supported on Unix platforms. ServerType standalone ServerRoot: The top of the directory tree under which the server s configuration, error, and log files are kept. NOTE! If you intend to place this on an NFS (or otherwise network) mounted filesystem then please read the LockFile documentation (available at <URL:http://www.apache.org/docs/mod/core.htmllockfile>); you will save yourself a lot of trouble. ServerRoot "/usr" Timeout: The number of seconds before receives and sends time out. Timeout 300 KeepAlive: Whether or not to allow persistent connections (more than 5

one request per connection). Set to "Off" to deactivate. KeepAlive On Limit on total number of servers running, i.e., limit on the number of clients who can simultaneously connect --- if this limit is ever reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW. It is intended mainly as a brake to keep a runaway server from taking the system with it as it spirals down... MaxClients 150 Note: The order in which modules are loaded is important. Don t change the order below without expert advice. Example: LoadModule foo_module libexec/mod_foo.so LoadModule includes_module libexec/httpd/mod_include.so LoadModule autoindex_module libexec/httpd/mod_autoindex.so LoadModule dir_module libexec/httpd/mod_dir.so LoadModule cgi_module libexec/httpd/mod_cgi.so LoadModule imap_module libexec/httpd/mod_imap.so LoadModule alias_module libexec/httpd/mod_alias.so LoadModule userdir_module libexec/httpd/mod_userdir.so LoadModule php4_module libexec/httpd/libphp4.so ClearModuleList AddModule mod_include.c AddModule mod_autoindex.c AddModule mod_alias.c AddModule mod_dir.c AddModule mod_cgi.c AddModule mod_imap.c AddModule mod_userdir.c AddModule mod_php4.c Section 2: Main server configuration Port: The port to which the standalone server listens. For ports < 1023, you will need httpd to be run as root initially. Port 80 User www Group www ServerName allows you to set a host name which is sent back to clients for your server if it s different than the one the program would get (i.e., use "www" instead of the host s real name). ServerName new.host.name DocumentRoot: The directory out of which you will serve your documents. By default, all requests are taken from this directory, but symbolic links and aliases may be used to point to other locations. DocumentRoot "/Library/WebServer/Documents" Each directory to which Apache has access, can be configured with respect to which services and features are allowed and/or disabled in that directory (and its subdirectories). First, we configure the "default" to be a very restrictive set of permissions. <Directory /> Options FollowSymLinks 6

AllowOverride None This should be changed to whatever you set DocumentRoot to. <Directory "/Library/WebServer/Documents"> This may also be "None", "All", or any combination of "Indexes", "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews". Options Indexes FollowSymLinks MultiViews Controls who can get stuff from this server. Order allow,deny Allow from all UserDir: The name of the directory which is appended onto a user s home directory if a ~user request is received. <IfModule mod_userdir.c> UserDir Sites Control access to UserDir directories. The following is an example for a site where these directories are restricted to read-only. <Directory /Users/*/Sites> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec ExecCGI <Limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </Limit> <LimitExcept GET POST OPTIONS PROPFIND> Order deny,allow Deny from all </LimitExcept> DirectoryIndex: Name of the file or files to use as a pre-written HTML directory index. Separate multiple entries with spaces. <IfModule mod_dir.c> DirectoryIndex index.html DefaultType is the default MIME type the server will use for a document if it cannot otherwise determine one, such as from filename extensions. If your server contains mostly text or HTML documents, "text/plain" is a good value. If most of your content is binary, such as applications or images, you may want to use "application/octet-stream" instead to keep browsers from trying to display binary files as though they are text. DefaultType text/plain <IfModule mod_alias.c> ScriptAlias: This controls which directories contain server scripts. ScriptAliases are essentially the same as Aliases, except that documents in the realname directory are treated as applications and run by the server when requested rather than as documents sent to the client. 7

The same rules about trailing "/" apply to ScriptAlias directives as to Alias. ScriptAlias /cgi-bin/ "/Library/WebServer/CGI-Executables/" "/Library/WebServer/CGI-Executables" should be changed to whatever your ScriptAli ased CGI directory exists, if you have that configured. <Directory "/Library/WebServer/CGI-Executables"> AllowOverride None Options None Order allow,deny Allow from all End of aliases. To use CGI scripts: AddHandler cgi-script.cgi Section 3: Virtual Hosts VirtualHost: If you want to maintain multiple domains/hostnames on your machine you can setup VirtualHost containers for them. Most configurations use only name-based virtual hosts so the server doesn t need to worry about IP addresses. This is indicated by the asterisks in the directives below. Please see the documentation at <URL:http://www.apache.org/docs/vhosts/> for further details before you try to setup virtual hosts. You may use the command line option -S to verify your virtual host configuration. Use name-based virtual hosting. NameVirtualHost *:80 VirtualHost example: Almost any Apache directive may go into a VirtualHost container. The first VirtualHost section is used for requests without a known server name. <VirtualHost *:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot /www/docs/dummy-host.example.com ServerName dummy-host.example.com ErrorLog logs/dummy-host.example.com-error_log CustomLog logs/dummy-host.example.com-access_log common </VirtualHost> <IfModule mod_php4.c> If php is turned on, we repsect.php and.phps files. AddType application/x-httpd-php.php AddType application/x-httpd-php-source.phps Since most users will want index.php to work we also automatically enable index.php <IfModule mod_dir.c> DirectoryIndex index.html index.php 8