#
# clients.conf - client configuration directives
#
#######################################################################

#######################################################################
#
#  Definition of a RADIUS client (usually a NAS).
#
#  The information given here over rides anything given in the
#  'clients' file, or in the 'naslist' file.  The configuration here
#  contains all of the information from those two files, and allows
#  for more configuration items.
#
#  The "shortname" is be used for logging.  The "nastype", "login" and
#  "password" fields are mainly used for checkrad and are optional.
#

#
#  Defines a RADIUS client.  The format is 'client [hostname|ip-address]'
#
#  '127.0.0.1' is another name for 'localhost'.  It is enabled by default,
#  to allow testing of the server after an initial installation.  If you
#  are not going to be permitting RADIUS queries from localhost, we suggest
#  that you delete, or comment out, this entry.
#
#
#  Rules for Prefixes
#  ------------------
#  IPv6 prefixes MUST end with :: or IPv6 Address or hostname
#  IPv4 Prefixes MUST end with .0 or IPv4 Address or hostname
#  A hostname is a valid DNS lookup name
#
#  Valid Prefixes
#  --------------
#  For IPv4:
#    192.168.1.1/24
#    10.0/8 = 10.0.0.0/16 = 10.0.0.1/8    != 10/8 
#    192.168.1.1/32 = 192.168.1.1/0
#    hostname/32   = hostname/0  = hostname
#   (32 or 0 or NULL prefix lengths are treated same)
#
#  For IPv6:
#    fec0::/64
#    fec0::1/100
#    fec0::1/128  = fec0::1/0 = fec0::1 
#    hostname/128 = hostname/0 = hostname
#   (128 or 0 or NULL prefix lengths are treated same)
#
#  Invalid prefixes
#  ----------------
#  For IPv4:
#  1) 192.168/16 
#       (MUST end with .0)
#       (replace with 192.168.0/16 or 192.168.0.0/16 or 192.168.1.1/16)
#  2) 192.168
#       (No Prefix, so it is considered as hostname 
#         and also returns 192.0.0.168 instead of 192.168.0.0)
#
#  For IPv6:
#  1) fec0/16
#       (MUST end with ::)
#       (replace with fec0::/16 or fec0::1/16)
#  2) fec0::
#       (No prefix, so it is considered as hostname)
#

client 127.0.0.1 {
	#
	#  The shared secret use to "encrypt" and "sign" packets between
	#  the NAS and FreeRADIUS.  You MUST change this secret from the
	#  default, otherwise it's not a secret any more!
	#
	#  The secret can be any string, up to 8k characters in length.
	#
	#  Control codes can be entered vi octal encoding,
	#	e.g. "\101\102" == "AB"
	#  Quotation marks can be entered by escaping them,
	#	e.g. "foo\"bar"
	#
	secret		= RaDCNRSgreCentr1

	#
	#  The short name is used as an alias for the fully qualified
	#  domain name, or the IP address.
	#
	shortname	= localhost

	#
	# the following three fields are optional, but may be used by
	# checkrad.pl for simultaneous use checks
	#

	#
	# The nastype tells 'checkrad.pl' which NAS-specific method to
	#  use to query the NAS for simultaneous use.
	#
	#  Permitted NAS types are:
	#
	#	cisco
	#	computone
	#	livingston
	#	max40xx
	#	multitech
	#	netserver
	#	pathras
	#	patton
	#	portslave
	#	tc
	#	usrhiper
	#	other		# for all other types

	#
	nastype     = other	# localhost isn't usually a NAS...

	#
	#  The following two configurations are for future use.
	#  The 'naspasswd' file is currently used to store the NAS
	#  login name and password, which is used by checkrad.pl
	#  when querying the NAS for simultaneous use.
	#
#	login       = !root
#	password    = someadminpas
}

# IPv6 Client
#client ::1 {
#	secret		= testing123
#	shortname	= localhost
#}
#
# All IPv6 Site-local clients
#client fe80::/16 {
#	secret		= testing123
#	shortname	= localhost
#}

#client some.host.org {
#	secret		= testing123
#	shortname	= localhost
#}

#
#  You can now specify one secret for a network of clients.
#  When a client request comes in, the BEST match is chosen.
#  i.e. The entry from the smallest possible network.
#
#client 192.168.0.0/24 {
#	secret		= testing123-1
#	shortname	= private-network-1
#}
#
#client 192.168.0.0/16 {
#	secret		= testing123-2
#	shortname	= private-network-2
#}


#client 10.10.10.10 {
#	# secret and password are mapped through the "secrets" file.
#	secret      = testing123
#	shortname   = liv1
#       # the following three fields are optional, but may be used by
#       # checkrad.pl for simultaneous usage checks
#	nastype     = livingston
#	login       = !root
#	password    = someadminpas
#}

#######################################################################
#
#  Per-socket client lists.  The configuration entries are exactly
#  the same as above, but they are nested inside of a section.
#
#  You can have as many per-socket client lists as you have "listen"
#  sections, or you can re-use a list among multiple "listen" sections.
#
#per_socket_clients {
#	client 192.168.3.4 {
#		secret = testing123
#        }
#}

# Client local
client 147.173.1.27 {
        secret          = RaDCNRSgreCentr1
        shortname       = localhost
        nastype         = other
}

# Client EduoRam
client 195.220.94.130 {
        secret          = 361de1d213fe896b8894d987d05294d
        shortname       = localhost
        nastype         = other # Ce sera un client Radius
}

################################################################################
# Definition de tous les clients potentiel de Radius
# plutot que de definir tous les clients par leur adresse IP , il est possible 
# de definir une classe d'adresses, le secret partage par tous les equipements 
# NAS devront partager le meme secret.
################################################################################

#####################
###   LABO NANO   ###
#####################
# WIFI nano
client 192.168.64.64 {
        secret          = xxx
        shortname       = AP
        nastype         = other
}

# Serveur Chillispot Nano
client 147.173.70.0/24 {
        secret          = yyy
        shortname       = chillispot
        nastype         = other
}

client 192.168.64.80 {
        secret          = xxx
        shortname       = switch
        nastype         = cisco
}

#####################
###   LABO TEST   ###
#####################
# Switch labo TEST
client  192.168.240.11 {
        secret          = bidon
        shortname       = Switch
        nastype         = cisco
}
# Chillispot labo TEST
client 147.173.246.1 {
	secret		= PASSsecretRadius
        shortname       = chillispot
	nastype		= other
}
# Switch Cisco 
client 192.168.240.131 {
	secret		= xxx
        shortname       = switch
	nastype		= cisco
}
# Borne Wifi
client 192.168.240.240 {
	secret		= secretpartage
        shortname       = AP
	nastype		= other
}

#####################
### Salle de Conf ###
#####################
# Borne wifi
client 192.168.21.21 {
        secret          = xxx
        shortname       = Wifi
        nastype         = other
}

# Chillispot
client 147.173.21.130/25 {
        secret          = xxx
        shortname       = Chillispot
        nastype         = other
}

#####################
###  CLIENT TEST  ###
#####################
client 147.173.1.16 {
        secret          = secretpartage
        shortname       = LISTES
        nastype         = other
}
