Eduroam : Différence entre versions

De Wiki iRENALA
(Configuration du serveur RADIUS)
(Configuration des clients)
 
(33 révisions intermédiaires par un utilisateur sont masquées)
Ligne 103 : Ligne 103 :
  
 
Pour les membres:
 
Pour les membres:
* le nom d'utilisateur sera votre''' '''adresse email:''' prenom.nom@<nom_domaine>.mg '''
+
* le nom d'utilisateur sera votre''' '''adresse email institutionnelle:''' prenom.nom@<nom_domaine>.mg '''
* le mot de passe sera votre mot de passe habituel (connexion à votre poste de travail, connexion au webmail, connexion distante, etc.)  
+
* le mot de passe sera votre mot de passe habituel (connexion à votre poste de travail, connexion au webmail, connexion à distante, etc.)  
  
  
Ligne 124 : Ligne 124 :
  
  
{| style="border-spacing:0;width:6.6979in;"
+
{| style="border-spacing:0;margin:auto;width:6.6979in;"
 
|-
 
|-
 
| style="border-top:0.05pt solid #000000;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;" | '''Équipement'''
 
| style="border-top:0.05pt solid #000000;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;" | '''Équipement'''
Ligne 143 : Ligne 143 :
 
|-
 
|-
 
|}
 
|}
 +
  
 
A part cette liste, nous aurons également besoin d'un serveur RADIUS pour gérer les authentifications, dont les spécifications sont:* Modèle en rack ou tour
 
A part cette liste, nous aurons également besoin d'un serveur RADIUS pour gérer les authentifications, dont les spécifications sont:* Modèle en rack ou tour
Ligne 153 : Ligne 154 :
 
= Architecture technique =
 
= Architecture technique =
 
[[Fichier:Eduroam.png |center| Infrastructure technique]]<br>
 
[[Fichier:Eduroam.png |center| Infrastructure technique]]<br>
== Configuration du serveur RADIUS ==
+
== Serveur RADIUS ==
'''Fichier''': /etc/freeradius/3.0/
+
=== Description du serveur ===
 +
* OS: Debian GNU/Linux 9.1 amd64
 +
* Radius: freeradius 3.0.12+dfsg-5
 +
 
 +
=== Configuration ===
 +
<u>Fichier</u>: /etc/freeradius/3.0/radiusd.conf
 +
prefix = /usr
 +
exec_prefix = /usr
 +
sysconfdir = /etc
 +
localstatedir = /var
 +
sbindir = ${exec_prefix}/sbin
 +
logdir = /var/log/freeradius
 +
raddbdir = /etc/freeradius
 +
radacctdir = ${logdir}/radacct
 +
name = freeradius
 +
confdir = ${raddbdir}
 +
modconfdir = ${confdir}/mods-config
 +
certdir = ${confdir}/certs
 +
cadir  = ${confdir}/certs
 +
run_dir = ${localstatedir}/run/${name}
 +
db_dir = ${raddbdir}
 +
libdir = /usr/lib/freeradius
 +
pidfile = ${run_dir}/${name}.pid
 +
correct_escapes = true
 +
max_request_time = 30
 +
cleanup_delay = 5
 +
max_requests = 16384
 +
hostname_lookups = no
 +
 +
log {
 +
  destination = files
 +
  colourise = yes
 +
  file = ${logdir}/radius.log
 +
  syslog_facility = daemon
 +
  stripped_names = no
 +
  auth = no
 +
  auth_badpass = no
 +
  auth_goodpass = no
 +
  msg_denied = "You are already logged in - access denied"
 +
}
 +
 +
checkrad = ${sbindir}/checkrad
 +
 +
security {
 +
  user = freerad
 +
  group = freerad
 +
  allow_core_dumps = no
 +
  max_attributes = 200
 +
  reject_delay = 1
 +
  status_server = yes
 +
}
 +
 +
proxy_requests  = yes
 +
$INCLUDE proxy.conf
 +
$INCLUDE clients.conf
 +
 +
thread pool {
 +
  start_servers = 5
 +
  max_servers = 32
 +
  min_spare_servers = 3
 +
  max_spare_servers = 10
 +
  max_requests_per_server = 0
 +
  auto_limit_acct = no
 +
}
 +
 +
modules {
 +
  $INCLUDE mods-enabled/
 +
}
 +
 +
instantiate {
 +
}
 +
 +
policy {
 +
  $INCLUDE policy.d/
 +
}
 +
 +
$INCLUDE sites-enabled/
 +
<u>Fichier</u>: /etc/freeradius/3.0/sites-enabled/default
 +
server default {
 +
listen {
 +
  type = auth
 +
  ipv4addr = *
 +
  port = 0
 +
  limit {
 +
        max_connections = 16
 +
        lifetime = 0
 +
        idle_timeout = 30
 +
  }
 +
}
 +
 +
listen {
 +
  ipv4addr = *
 +
  port = 0
 +
  type = acct
 +
  limit {
 +
  }
 +
}
 +
 +
authorize {
 +
  filter_username
 +
  preprocess
 +
  chap
 +
  mschap
 +
  digest
 +
  suffix
 +
  eap {
 +
  ok = return
 +
  }
 +
  files
 +
  -sql
 +
  -ldap
 +
  expiration
 +
  logintime
 +
  pap
 +
}
 +
 +
authenticate {
 +
  Auth-Type PAP {
 +
  pap
 +
  }
 +
  Auth-Type CHAP {
 +
  chap
 +
  }
 +
  Auth-Type MS-CHAP {
 +
  mschap
 +
  }
 +
  mschap
 +
  digest
 +
  eap
 +
}
 +
 +
preacct {
 +
  preprocess
 +
  acct_unique
 +
  suffix
 +
  files
 +
}
 +
 +
accounting {
 +
  detail
 +
  unix
 +
  -sql
 +
  exec
 +
  attr_filter.accounting_response
 +
}
 +
 +
session {
 +
}
 +
 +
post-auth {
 +
  update {
 +
  &reply: += &session-state:
 +
  }
 +
  -sql
 +
  exec
 +
  remove_reply_message_if_eap
 +
  Post-Auth-Type REJECT {
 +
  -sql
 +
  attr_filter.access_reject
 +
  eap
 +
  remove_reply_message_if_eap
 +
  }
 +
}
 +
 +
pre-proxy {
 +
}
 +
 +
post-proxy {
 +
  eap
 +
}
 +
}
 +
<u>Fichier</u>: /etc/freeradius/3.0/clients.conf
 +
client localhost {
 +
  ipaddr = 127.0.0.1
 +
  proto = *
 +
  secret = ***********
 +
  require_message_authenticator = no
 +
  limit {
 +
  max_connections = 16
 +
  lifetime = 0
 +
  idle_timeout = 30
 +
  }
 +
}
 +
 +
client uap {
 +
  ipaddr = 41.242.99.196
 +
  secret = ***********
 +
}
 +
 +
client serveur {
 +
        ipaddr = 41.242.96.38
 +
        secret = ***********
 +
        nastype = other
 +
}
 +
<u>Fichier</u>: /etc/freeradius/3.0/proxy.conf
 
  proxy server {
 
  proxy server {
 
   default_fallback = no
 
   default_fallback = no
 
  }
 
  }
 +
 
  home_server localhost {
 
  home_server localhost {
 
   type = auth
 
   type = auth
 
   ipaddr = 127.0.0.1
 
   ipaddr = 127.0.0.1
 
   port = 1812
 
   port = 1812
   secret = i-RENALA
+
   secret = *******
 
   response_window = 20
 
   response_window = 20
 
   zombie_period = 40
 
   zombie_period = 40
Ligne 171 : Ligne 367 :
 
   num_answers_to_alive = 3
 
   num_answers_to_alive = 3
 
   max_outstanding = 65536
 
   max_outstanding = 65536
 +
 
   coa {
 
   coa {
 
   irt = 2
 
   irt = 2
Ligne 177 : Ligne 374 :
 
   mrd = 30
 
   mrd = 30
 
   }
 
   }
 +
 
   limit {
 
   limit {
 
         max_connections = 16
 
         max_connections = 16
Ligne 184 : Ligne 382 :
 
   }
 
   }
 
  }
 
  }
 +
 
  home_server_pool my_auth_failover {
 
  home_server_pool my_auth_failover {
 
   type = fail-over
 
   type = fail-over
 
   home_server = localhost
 
   home_server = localhost
 
  }
 
  }
 +
 
  realm LOCAL {
 
  realm LOCAL {
 
  }
 
  }
 +
 
  home_server blackhole {
 
  home_server blackhole {
 
     virtual_server = blackhole
 
     virtual_server = blackhole
 
  }
 
  }
 +
 
  home_server_pool blackhole_pool {
 
  home_server_pool blackhole_pool {
 
     home_server = blackhole
 
     home_server = blackhole
 
     name = blackhole
 
     name = blackhole
 
  }
 
  }
 +
 
  realm NULL {
 
  realm NULL {
 
   auth_pool = blackhole_pool
 
   auth_pool = blackhole_pool
 
  }
 
  }
 +
 
  realm irenala.edu.mg {
 
  realm irenala.edu.mg {
 
  }
 
  }
 +
 
  home_server radsecproxy {
 
  home_server radsecproxy {
 
         type            = auth+acct
 
         type            = auth+acct
 
         ipaddr          = 127.0.0.1
 
         ipaddr          = 127.0.0.1
 
         port            = 11812
 
         port            = 11812
         secret          = radsec
+
         secret          = *******
 
         require_message_authenticator = yes
 
         require_message_authenticator = yes
 
         response_window = 20
 
         response_window = 20
Ligne 214 : Ligne 419 :
 
         num_answers_to_alive = 3
 
         num_answers_to_alive = 3
 
  }
 
  }
 +
 
  home_server_pool pool-eduroam-mg {
 
  home_server_pool pool-eduroam-mg {
 
   home_server = radsecproxy
 
   home_server = radsecproxy
 
    
 
    
 
  }
 
  }
 +
 
  realm  DEFAULT {
 
  realm  DEFAULT {
 
         auth_pool = pool-eduroam-mg
 
         auth_pool = pool-eduroam-mg
Ligne 223 : Ligne 430 :
 
  }
 
  }
  
== Configuration du serveur RadSec ==
+
== Serveur RadSec ==
 +
=== Description du serveur ===
 +
* OS: Debian GNU/Linux 9.1 amd64
 +
* RadSec: radsecproxy 1.6.8-1
 +
 
 +
=== Configuration ===
 +
La configuration ci-dessous suppose que RadSec est installé sur le serveur Radius.
 +
 
 +
<u>Fichier</u>:  /etc/radsecproxy.conf
 +
ListenUDP    *:11812
 +
LogLevel  5
 +
LogDestination  file:///var/log/radsecproxy.log
 +
tls default {
 +
  CACertificateFile /etc/ssl/radsecproxy/ca.crt
 +
  CertificateFile /etc/ssl/radsecproxy/radius.irenala.edu.mg.crt
 +
  CertificateKeyFile  /etc/ssl/radsecproxy/radius.irenala.edu.mg.key
 +
}
 +
 +
client localhost {
 +
  type udp
 +
  secret ******
 +
}
 +
 +
server localhost {
 +
  type udp
 +
  secret ******
 +
  statusserver on
 +
}
 +
 +
client nrps.irenala.edu.mg {
 +
  type tls
 +
  secret ******
 +
}
 +
 +
server nrps.irenala.edu.mg {
 +
  type tls
 +
  secret ******
 +
  statusserver on
 +
  certificatenamecheck off
 +
}
 +
 +
realm irenala.edu.mg {
 +
  server localhost
 +
}
 +
 +
realm * {
 +
  server nrps.irenala.edu.mg
 +
}
 +
 
 +
== Serveur proxy national ==
 +
=== Description du serveur ===
 +
* OS: Debian GNU/Linux 9.1 adm64
 +
* RadSec: radsecproxy 1.6.8-1
 +
=== Radsecproxy ===
 +
<u>Fichier</u>:  /etc/radsecproxy.conf
 +
LogLevel 5
 +
LogDestination file:///var/log/radsecproxy.log
 +
LoopPrevention on
 +
 +
tls default {
 +
  CACertificateFile /etc/ssl/radsecproxy/ca.crt
 +
  CertificateFile /etc/ssl/radsecproxy/nrps.irenala.edu.mg.crt
 +
  CertificateKeyFile /etc/ssl/radsecproxy/nrps.irenala.edu.mg.key
 +
}
 +
 +
client radius.irenala.edu.mg {
 +
type tls
 +
secret ******
 +
certificatenamecheck off
 +
}
 +
 +
server radius.irenala.edu.mg {
 +
  type tls
 +
  secret  ******
 +
  statusserver on
 +
}
 +
 +
realm irenala.edu.mg {
 +
server radius.irenala.edu.mg
 +
}
 +
 +
client radius.mgix.mg {
 +
type tls
 +
secret ******
 +
certificatenamecheck off
 +
}
 +
 +
server radius.mgix.mg {
 +
  type tls
 +
  secret  ******
 +
  statusserver on
 +
}
 +
 +
realm mgix.mg {
 +
server radius.mgix.mg
 +
}
 +
 +
client auth1.mg.auf.org {
 +
type tls
 +
secret ******
 +
certificatenamecheck off
 +
}
 +
 +
server auth1.mg.auf.org {
 +
  type tls
 +
  secret  ******
 +
  statusserver on
 +
}
 +
 +
realm auf.org {
 +
server auth1.mg.auf.org
 +
}
 +
 +
realm * {
 +
  replymessage "User unknown"
 +
}
 +
 
 +
=== Script de génération de certificats pour une institution ===
 +
<u>Fichier</u>: /etc/ssl/radsecproxy/generate-client.sh
 +
#!/bin/bash
 +
#  generate-client - Create client key-pair for MQTT signed by CA
 +
#
 +
#  The key is not encrypted so that the certificate can be used on
 +
#  embedded devices.
 +
 +
# Copyright 2015 Jerry Dunmire <jedunmire-AT-gmail>
 +
# All rights reserved.
 +
#
 +
# Redistribution and use in source and binary forms, with or without
 +
# modification, are permitted provided that the following conditions are met:
 +
#
 +
# 1. Redistributions of source code must retain the above copyright notice,
 +
# this list of conditions and the following disclaimer.
 +
# 2. Redistributions in binary form must reproduce the above copyright
 +
# notice, this list of conditions and the following disclaimer in the
 +
# documentation and/or other materials provided with the distribution.
 +
# 3. Neither the name of mosquitto nor the names of its
 +
# contributors may be used to endorse or promote products derived from
 +
# this software without specific prior written permission.
 +
#
 +
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 +
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 +
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 +
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 +
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 +
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 +
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 +
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 +
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 +
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 +
# POSSIBILITY OF SUCH DAMAGE.
 +
 +
#
 +
# Usage:
 +
#  ./generate-client.sh client_name
 +
#  creates client_name{key,crt}
 +
set -e
 +
 +
if [ -n "$1" ]; then
 +
  client="$1"
 +
else
 +
    echo "ERROR: missing client_name argument." >&2
 +
    echo "USAGE: $0 client_name" >&2
 +
    echo "exiting... " >&2
 +
    exit 1
 +
fi
 +
 +
[ -z "$USER" ] && USER=root
 +
 +
DIR=${TARGET:='.'}
 +
# CA_ORG set to match generate-CA.sh
 +
CA_ORG='/O=iRENALA/emailAddress=admin@irenala.edu.mg'
 +
CACERT=${DIR}/ca
 +
CLIENT="${DIR}/${client}"
 +
CLIENT_DN="/CN=${client}$CA_ORG"
 +
keybits=4096
 +
openssl=$(which openssl)
 +
 +
function maxdays() {
 +
  nowyear=$(date +%Y)
 +
  years=$(expr 2032 - $nowyear)
 +
  days=$(expr $years '*' 365)
 +
 +
  echo $days
 +
}
 +
 +
days=$(maxdays)
 +
 +
if [ ! -f $CACERT.crt ]
 +
then
 +
  echo "ERROR: Could not find CA certificate: $CACERT.crt" >&2
 +
  echo "Exiting..." >&2
 +
  exit 1
 +
fi
 +
 +
if [ ! -f $CLIENT.key ]
 +
then
 +
  echo "--- Creating client key and signing request"
 +
  echo "--- WARNING: key is not encrypted, keep it safe!"
 +
  $openssl genrsa -out $CLIENT.key $keybits
 +
  $openssl req -new \
 +
  -out $CLIENT.csr \
 +
  -key $CLIENT.key \
 +
  -subj "${CLIENT_DN}"
 +
  chmod 400 $CLIENT.key
 +
fi
 +
 +
if [ -f $CLIENT.csr -a ! -f $CLIENT.crt ]
 +
then
 +
  echo "--- Creating and signing client certificate"
 +
  $openssl x509 -req \
 +
  -in $CLIENT.csr \
 +
  -CA $CACERT.crt \
 +
  -CAkey $CACERT.key \
 +
  -CAserial "${DIR}/ca.srl" \
 +
  -out $CLIENT.crt \
 +
  -days $days \
 +
  -extensions client_cert \
 +
  -addtrust clientAuth
 +
 +
  chmod 444 $CLIENT.crt
 +
fi
 +
 
 +
<u>REMARQUE</u>: Une fois le certificat généré, les deux fichiers '''.key''' et '''.crt''' seront envoyés à l'institution avec le fichier '''ca.crt''' pour configurer leur instance de Radsec.
  
== Configuration du serveur proxy national ==
+
= Configuration des clients =
 +
== Microsoft Windows ==
 +
== GNU/Linux ==
 +
== Android ==
 +
== IOS ==

Version actuelle en date du 27 août 2017 à 14:01

Description du projet

Le projet eduroam (http://www.eduroam.org), est un projet européen dont l'objectif est de permettre à tout personnel d'établissement participant au projet (universités, écoles d'ingénieurs, etc.), de toujours pouvoir se connecter à Internet lors d'un déplacement chez un autre établissement membre d'eduroam, ce avec son identifiant/mot de passe usuel. Typiquement, un chercheur en déplacement pourra donc se connecter à Internet et aux éventuels services proposés par l'établissement qui l'accueil (tous ne proposent pas nécessairement les mêmes services), par exemple à partir d'un point d'accès sans fil (Wi-Fi) de l'université qui l'accueille.

eduroam se propose de développer cela en minimisant les coûts et les démarches de déploiement, c'est à dire en simplifiant au maximum la coordination des universités ou centres de recherche, tout en assurant un service sécurisé de qualité.

De nombreux pays sont d' ores et déjà membres du projet, qui maintenant s'étend au delà de l'Europe (à l'heure actuelle 26 pays européens ainsi que Taïwan et l'Australie), et donc dans un futur proche de nombreux établissements de l'enseignement supérieur proposeront le service offert par eduroam, dont nous à Madagascar.

Principe de fonctionnement

  • L'utilisateur se connecte avec le(s) même(s) identifiant/mot de passe/certificat que sur son site d'origine
  • Système d'authentification réparti reposant sur une hiérarchie de serveurs RADIUS
  • Le serveur racine est géré par TERENA (Amsterdam)
  • Le serveur national au niveau du proxy sera géré par i RENALA
Infrastructure eduroam

Utilisation de eduroam en interne

Les avantages

Si eduroam est initialement destiné à être utilisé lors de vos déplacements, vous avez tout intérêt à l'utiliser dans l'enceinte de l'établissement:* La connexion à eduroam est chiffrée. La sécurité des échanges est donc renforcée.

  • La connexion à eduroam vous dispense de vous réauthentifier sur le portail captif à chaque utilisation.
  • Il est sans doute préférable de tester cette configuration dans nos murs plutôt que lors de votre déplacement pendant lequel, de fait, vous n'aurez pas accès à internet pour lire les documentations correspondantes .…


Les inconvénients

La configuration d'eduroam peut être plus fastidieuse (postes Windows) que l'utilisation des réseaux wifi actuels. Cependant, un manuel de configuration sera élaboré afin d'assister les utilisateurs pour se connecter à eduroam.

Charte

L'utilisation de ce service imposera le respect d'une charte qui va être mis à la disposition des utilisateurs aussitôt que le service sera fonctionnel.

Elle engagera à :

  • Mettre en œuvre un service d'authentification conforme aux spécifications techniques
  • En tant qu'établissement de rattachement :
    • Informer ses utilisateurs : existence du service, manière d'y accéder, respect des règles d'utilisation des réseaux visités
    • Offrir une assistance technique aux utilisateurs
  • En tant qu'établissement visité :
    • Mettre en œuvre le service au travers de points d'accès sans fil
    • Informer les visiteurs sur l'existence du service et ses conditions d'utilisation
  • Sécurité du service :
    • Chiffrement de bout en bout des données d'authentification
    • Chiffrement efficace sur les points d'accès sans fil
    • Sécurité des serveurs RADIUS
    • Traces : pouvoir identifier l'utilisateur d'une adresse IP à un moment donné

Spécifications techniques

  • Nom de domaine (realm RADIUS) : en principe un domaine DNS, doit se terminer par « .mg »
  • Radio : 802.11b/g/n
  • SSID : « eduroam », diffusé
  • Authentification : 802.1X + EAP-TLS, TTLS ou PEAP (à l'exclusion de tout autre)
  • Chiffrement du lien radio : AES ou TKIP
  • Offre d'un service DHCP aux clients
  • Protection du réseau d'accueil vis-à-vis de l'extérieur en utilisant un parefeu
  • Services réseau accessibles
    • Il ne devrait pas y avoir de filtrage en sortie
    • A défaut, les services suivants doivent être autorisés :
      • HTTP, HTTPS
      • DNS
      • ICMP (echo request, echo reply)
      • IPsec (ESP, AH, IKE)
      • OpenVPN
      • SSH
      • POPs, IMAPs
      • NTP
      • SMTP


Le tableau suivant définit les prérequis réseau pour eduroam:


Propriétés générales Propriétés IEEE 802.11
NAS IPv6 IPv4 WEP WPA WPA2 SSIDs
802.1X Autorisé Autorisé WEP non-autorisé

WPA non-autorisé pour les nouvelles installations

Autorisé eduroam

Accès au service

Identifiants

Pour les membres:

  • le nom d'utilisateur sera votre adresse email institutionnelle: prenom.nom@<nom_domaine>.mg
  • le mot de passe sera votre mot de passe habituel (connexion à votre poste de travail, connexion au webmail, connexion à distante, etc.)


Modalités d'accès

Doit être ouvert automatiquement à la création du compte informatique de la personne.

Public concerné

  • Invités
  • Étudiants
  • Personnels d'établissement
  • Enseignants
  • Chercheurs

Équipements nécessaires pour la mise en œuvre

Le tableau ci-dessous fournit un exemple de liste d’équipements nécessaires pour mettre en place eduroam :


Équipement Modèle Spécification
Point d'accès sans fil Cisco Aironet 2700 Series
Ubiquiti UniFi Pro
Support des normes 802.11 et 802.1X
Switch Cisco Catalyst 2960 Series Support de la technologie VLAN
Routeur Cisco 2900 Series ISR
Mikrotik Routerboard


A part cette liste, nous aurons également besoin d'un serveur RADIUS pour gérer les authentifications, dont les spécifications sont:* Modèle en rack ou tour

  • Double alimentation
  • Carte réseau Ethernet ou GigabitEthernet supportant la technologie VLAN
  • Disque dur en RAID, de capacité supérieure à 60Go, cette valeur depend du système d’exploitation ainsi que des options de logs (traces)
  • Mémoire RAM 1 Go
  • Microprocesseur 1.0 GHz

Architecture technique

Infrastructure technique

Serveur RADIUS

Description du serveur

  • OS: Debian GNU/Linux 9.1 amd64
  • Radius: freeradius 3.0.12+dfsg-5

Configuration

Fichier: /etc/freeradius/3.0/radiusd.conf

prefix = /usr
exec_prefix = /usr
sysconfdir = /etc
localstatedir = /var
sbindir = ${exec_prefix}/sbin
logdir = /var/log/freeradius
raddbdir = /etc/freeradius
radacctdir = ${logdir}/radacct
name = freeradius
confdir = ${raddbdir}
modconfdir = ${confdir}/mods-config
certdir = ${confdir}/certs
cadir   = ${confdir}/certs
run_dir = ${localstatedir}/run/${name}
db_dir = ${raddbdir}
libdir = /usr/lib/freeradius
pidfile = ${run_dir}/${name}.pid
correct_escapes = true
max_request_time = 30
cleanup_delay = 5
max_requests = 16384
hostname_lookups = no

log {
 destination = files
 colourise = yes
 file = ${logdir}/radius.log
 syslog_facility = daemon
 stripped_names = no
 auth = no
 auth_badpass = no
 auth_goodpass = no
 msg_denied = "You are already logged in - access denied"
}

checkrad = ${sbindir}/checkrad

security {
 user = freerad
 group = freerad
 allow_core_dumps = no
 max_attributes = 200
 reject_delay = 1
 status_server = yes
}

proxy_requests  = yes
$INCLUDE proxy.conf
$INCLUDE clients.conf

thread pool {
 start_servers = 5
 max_servers = 32
 min_spare_servers = 3
 max_spare_servers = 10
 max_requests_per_server = 0
 auto_limit_acct = no
}

modules {
 $INCLUDE mods-enabled/
}

instantiate {
}

policy {
 $INCLUDE policy.d/
}

$INCLUDE sites-enabled/

Fichier: /etc/freeradius/3.0/sites-enabled/default

server default {
listen {
 type = auth
 ipv4addr = *
 port = 0
 limit {
       max_connections = 16
       lifetime = 0
       idle_timeout = 30
 }
}

listen {
 ipv4addr = *
 port = 0
 type = acct
 limit {
 }
}

authorize {
 filter_username
 preprocess
 chap
 mschap
 digest
 suffix
 eap {
  ok = return
 }
 files
 -sql
 -ldap
 expiration
 logintime
 pap
}

authenticate {
 Auth-Type PAP {
  pap
 }
 Auth-Type CHAP {
  chap
 }
 Auth-Type MS-CHAP {
  mschap
 }
 mschap
 digest
 eap
}

preacct {
 preprocess
 acct_unique
 suffix
 files
}

accounting {
 detail
 unix
 -sql
 exec
 attr_filter.accounting_response
}

session {
}

post-auth {
 update {
  &reply: += &session-state:
 }
 -sql
 exec
 remove_reply_message_if_eap
 Post-Auth-Type REJECT {
  -sql
  attr_filter.access_reject
  eap
  remove_reply_message_if_eap
 }
}

pre-proxy {
}

post-proxy {
 eap
}
}

Fichier: /etc/freeradius/3.0/clients.conf

client localhost {
 ipaddr = 127.0.0.1
 proto = *
 secret = ***********
 require_message_authenticator = no
 limit {
  max_connections = 16
  lifetime = 0
  idle_timeout = 30
 }
}

client uap {
 ipaddr = 41.242.99.196
 secret = ***********
}

client serveur {
        ipaddr = 41.242.96.38
        secret = ***********
        nastype = other
}

Fichier: /etc/freeradius/3.0/proxy.conf

proxy server {
 default_fallback = no
}

home_server localhost {
 type = auth
 ipaddr = 127.0.0.1
 port = 1812
 secret = *******
 response_window = 20
 zombie_period = 40
 revive_interval = 120
 status_check = status-server
 check_interval = 30
 check_timeout = 4
 num_answers_to_alive = 3
 max_outstanding = 65536

 coa {
  irt = 2
  mrt = 16
  mrc = 5
  mrd = 30
 }

 limit {
       max_connections = 16
       max_requests = 0
       lifetime = 0
       idle_timeout = 0
 }
}

home_server_pool my_auth_failover {
 type = fail-over
 home_server = localhost
}

realm LOCAL {
}

home_server blackhole {
    virtual_server = blackhole
}

home_server_pool blackhole_pool {
    home_server = blackhole
    name = blackhole
}

realm NULL {
 auth_pool = blackhole_pool
}

realm irenala.edu.mg {
}

home_server radsecproxy {
        type            = auth+acct
        ipaddr          = 127.0.0.1
        port            = 11812
        secret          = *******
        require_message_authenticator = yes
        response_window = 20
        zombie_period   = 40
        status_check    = status-server
        check_interval  = 20
        num_answers_to_alive = 3
}

home_server_pool pool-eduroam-mg {
 home_server = radsecproxy
 
}

realm  DEFAULT {
       auth_pool = pool-eduroam-mg
       nostrip
}

Serveur RadSec

Description du serveur

  • OS: Debian GNU/Linux 9.1 amd64
  • RadSec: radsecproxy 1.6.8-1

Configuration

La configuration ci-dessous suppose que RadSec est installé sur le serveur Radius.

Fichier: /etc/radsecproxy.conf

ListenUDP    *:11812
LogLevel  5
LogDestination   file:///var/log/radsecproxy.log
tls default {
 CACertificateFile /etc/ssl/radsecproxy/ca.crt
 CertificateFile /etc/ssl/radsecproxy/radius.irenala.edu.mg.crt
 CertificateKeyFile  /etc/ssl/radsecproxy/radius.irenala.edu.mg.key
}

client localhost {
 type udp
 secret ******
}

server localhost {
 type udp
 secret ******
 statusserver on
}

client nrps.irenala.edu.mg {
 type tls
 secret ******
}

server nrps.irenala.edu.mg {
 type tls
 secret ******
 statusserver on
 certificatenamecheck off
}

realm irenala.edu.mg {
  server localhost
}

realm * {
  server nrps.irenala.edu.mg
}

Serveur proxy national

Description du serveur

  • OS: Debian GNU/Linux 9.1 adm64
  • RadSec: radsecproxy 1.6.8-1

Radsecproxy

Fichier: /etc/radsecproxy.conf

LogLevel		5
LogDestination		file:///var/log/radsecproxy.log
LoopPrevention		on

tls default {
 CACertificateFile /etc/ssl/radsecproxy/ca.crt
 CertificateFile 	/etc/ssl/radsecproxy/nrps.irenala.edu.mg.crt
 CertificateKeyFile 	/etc/ssl/radsecproxy/nrps.irenala.edu.mg.key
}

client radius.irenala.edu.mg {
	type	tls
	secret	******
	certificatenamecheck off
}

server radius.irenala.edu.mg {
  type tls
  secret  ******
  statusserver on
}

realm irenala.edu.mg {
	server radius.irenala.edu.mg
}

client radius.mgix.mg {
	type	tls
	secret	******
	certificatenamecheck off
}

server radius.mgix.mg {
  type tls
  secret  ******
  statusserver on
}

realm mgix.mg {
	server radius.mgix.mg
}

client auth1.mg.auf.org {
	type	tls
	secret	******
	certificatenamecheck off
}

server auth1.mg.auf.org {
  type tls
  secret  ******
  statusserver on
}

realm auf.org {
	server auth1.mg.auf.org
}

realm * {
  replymessage "User unknown"
}

Script de génération de certificats pour une institution

Fichier: /etc/ssl/radsecproxy/generate-client.sh

#!/bin/bash
#  generate-client - Create client key-pair for MQTT signed by CA
#
#  The key is not encrypted so that the certificate can be used on
#  embedded devices.

# Copyright 2015 Jerry Dunmire <jedunmire-AT-gmail>
# All rights reserved.
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of mosquitto nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
# 
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

#
# Usage:
#   ./generate-client.sh client_name
#  creates client_name{key,crt}
set -e

if [ -n "$1" ]; then
 client="$1"
else
   echo "ERROR: missing client_name argument." >&2
   echo "USAGE: $0 client_name" >&2
   echo "exiting... " >&2
   exit 1
fi

[ -z "$USER" ] && USER=root

DIR=${TARGET:='.'}
# CA_ORG set to match generate-CA.sh
CA_ORG='/O=iRENALA/emailAddress=admin@irenala.edu.mg'
CACERT=${DIR}/ca
CLIENT="${DIR}/${client}"
CLIENT_DN="/CN=${client}$CA_ORG"
keybits=4096
openssl=$(which openssl)

function maxdays() {
 nowyear=$(date +%Y)
 years=$(expr 2032 - $nowyear)
 days=$(expr $years '*' 365)

 echo $days
}

days=$(maxdays)

if [ ! -f $CACERT.crt ]
then
 echo "ERROR: Could not find CA certificate: $CACERT.crt" >&2
 echo "Exiting..." >&2
 exit 1
fi

if [ ! -f $CLIENT.key ]
then
 echo "--- Creating client key and signing request"
 echo "--- WARNING: key is not encrypted, keep it safe!"
 $openssl genrsa -out $CLIENT.key $keybits
 $openssl req -new \
  -out $CLIENT.csr \
  -key $CLIENT.key \
  -subj "${CLIENT_DN}"
 chmod 400 $CLIENT.key
fi

if [ -f $CLIENT.csr -a ! -f $CLIENT.crt ]
then
 echo "--- Creating and signing client certificate"
 $openssl x509 -req \
  -in $CLIENT.csr \
  -CA $CACERT.crt \
  -CAkey $CACERT.key \
  -CAserial "${DIR}/ca.srl" \
  -out $CLIENT.crt \
  -days $days \
 -extensions client_cert \
  -addtrust clientAuth

 chmod 444 $CLIENT.crt
fi

REMARQUE: Une fois le certificat généré, les deux fichiers .key et .crt seront envoyés à l'institution avec le fichier ca.crt pour configurer leur instance de Radsec.

Configuration des clients

Microsoft Windows

GNU/Linux

Android

IOS