freeradius, grundlegend

Alle weiteren Dienste, die nicht in die drei oberen Foren gehören.
Antworten
b00n07
Beiträge: 3
Registriert: 31.08.2009 23:28:27

freeradius, grundlegend

Beitrag von b00n07 » 08.06.2010 00:37:23

Guten Abend,
Ich beschäftige mich jetzt seid ein paar Wochen mit RADIUS, hatte da auch ein System unter Windows laufen (TekRADIUS) da gab es auch keine Probleme, bis auf dieses eine das besagtes Windows viel zu instabil läuft.
Also wollte ich auf Debian mit dem freeradius umsteigen.
habe leider bereits bei der Testkonfiguration so meine Schwierigkeiten.
Habe einfach einmal die einfachste Konfiguration gemacht, um das ganze zu testen, dh. einen clienten (wäre eigentlich später mein NAS) in dem Fall einfach den localhost.
listen tut er eben auf die 127.0.0.1 auf dem port 1812, da ich von meinem eigenen Rechner aus den radtest starten will (später würde hier ebenfalls die IP des NAS stehen da diesser die authentication packets sendet). Und natürlich einen Testuser in der Datei user...

wenn ich nun meinen Radius im Debbugmodus starte ($ sudo /usr/sbin/freeradius -X) bekomme ich folgenden Fehler:
.......
Module: Checking session {...} for more modules to load
Module: Checking post-proxy {...} for more modules to load
Module: Checking post-auth {...} for more modules to load
}
}
radiusd: #### Opening IP addresses and Ports ####
listen {
type = "auth"
ipaddr = 127.0.0.1
port = 0
ERROR: Failed to open socket: cannot bind socket: Address already in use
/etc/freeradius/radiusd.conf[210]: Error binding to port for 127.0.0.1 port 1812

hier der vollständigheit halber noch meine clients.conf:

Code: Alles auswählen

# -*- text -*-
##
## clients.conf -- client configuration directives
##
##	$Id: clients.conf,v 1.13 2008/04/17 12:22:23 aland Exp $

#######################################################################
#
#  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.
#
#  '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.
#
#

#
#  Each client has a "short name" that is used to distinguish it from
#  other clients.
#
#  In version 1.x, this field was the IP address of the client.
#  In 2.0, the IP address is configured via the "ipaddr" or "ipv6addr"
#  fields.  For compatibility, the 1.x format is still accepted.
#
client localhost {
	#  Allowed values are:
	#	dotted quad (1.2.3.4)
	#       hostname    (radius.example.com)
	ipaddr = 127.0.0.1

	#  OR, you can use an IPv6 address, but not both
	#  at the same time.
#	ipv6addr = ::	# any.  ::1 == localhost

	#
	#  A note on DNS:  We STRONGLY recommend using IP addresses
	#  rather than host names.  Using host names means that the
	#  server will do DNS lookups when it starts, making it
	#  dependent on DNS.  i.e. If anything goes wrong with DNS,
	#  the server won't start!
	#
	#  The server also looks up the IP address from DNS once, and
	#  only once, when it starts.  If the DNS record is later
	#  updated, the server WILL NOT see that update.
	#

	#  One client definition can be applied to an entire network.
	#  e.g. 127/8 should be defined with "ipaddr = 127.0.0.0" and
	#  "netmask = 8"
	#
	#  If not specified, the default netmask is 32 (i.e. /32)
	#
	#  We do NOT recommend using anything other than 32.  There
	#  are usually other, better ways to acheive the same goal.
	#  Using netmasks of other than 32 can cause security issues.
	#
	#  You can specify overlapping networks (127/8 and 127.0/16)
	#  In that case, the smallest possible network will be used
	#  as the "best match" for the client.
	#
#	netmask = 32

	#
	#  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"
	#
	#  A note on security:  The security of the RADIUS protocol
	#  depends COMPLETELY on this secret!  We recommend using a
	#  shared secret that is composed of:
	#
	#	upper case letters
	#	lower case letters
	#	numbers
	#
	#  And is at LEAST 8 characters long, preferably 16 characters in
	#  length.  The secret MUST be random, and should not be words,
	#  phrase, or anything else that is recognizable.
	#
	#  The default secret below is only for testing, and should
	#  not be used in any real environment.
	#
	secret		= test

	#
	#  Old-style clients do not send a Message-Authenticator
	#  in an Access-Request.  RFC 5080 suggests that all clients
	#  SHOULD include it in an Access-Request.  The configuration
	#  item below allows the server to require it.  If a client
	#  is required to include a Message-Authenticator and it does
	#  not, then the packet will be silently discarded.
	#
	#  allowed values: yes, no
	require_message_authenticator = no

	#
	#  The short name is used as an alias for the fully qualified
	#  domain name, or the IP address.
	#
	#  It is accepted for compatibility with 1.x, but it is no
	#  longer necessary in 2.0
	#
#	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...

.....

prefix = /usr
exec_prefix = /usr
sysconfdir = /etc
localstatedir = /var
sbindir = ${exec_prefix}/sbin
logdir = /var/log/freeradius
raddbdir = /etc/freeradius
radacctdir = ${logdir}/radacct

#  Location of config and logfiles.
confdir = ${raddbdir}
run_dir = ${localstatedir}/run/freeradius

# Should likely be ${localstatedir}/lib/radiusd
db_dir = $(raddbdir)

.....

libdir = /usr/lib/freeradius

#  pidfile: Where to place the PID of the RADIUS server.
#
#  The server may be signalled while it's running by using this
#  file.
#
#  This file is written when ONLY running in daemon mode.
#
#  e.g.:  kill -HUP `cat /var/run/freeradius/freeradius.pid`
#
pidfile = ${run_dir}/freeradius.pid

......

user = freerad
group = freerad

....

max_request_time = 30

....

cleanup_delay = 5

...

#  Useful range of values: 256 to infinity
#
max_requests = 1024

#  listen: Make the server listen on a particular IP address, and send
#  replies out from that address. This directive is most useful for
#  hosts with multiple IP addresses on one interface.
#
#  If you want the server to listen on additional addresses, or on
#  additionnal ports, you can use multiple "listen" sections.
#
#  Each section make the server listen for only one type of packet,
#  therefore authentication and accounting have to be configured in
#  different sections.
#
#  The server ignore all "listen" section if you are using '-i' and '-p'
#  on the command line.
#
listen {
	#  Type of packets to listen for.
	#  Allowed values are:
	#	auth	listen for authentication packets
	#	acct	listen for accounting packets
	#	proxy   IP to use for sending proxied packets
	#	detail  Read from the detail file.  For examples, see
	#               raddb/sites-available/copy-acct-to-home-server
	#
	type = auth

	#  Note: "type = proxy" lets you control the source IP used for
	#        proxying packets, with some limitations:
	#
	#    * Only ONE proxy listener can be defined.
	#    * A proxy listener CANNOT be used in a virtual server section.
	#    * You should probably set "port = 0".
	#    * Any "clients" configuration will be ignored.

	#  IP address on which to listen.
	#  Allowed values are:
	#	dotted quad (1.2.3.4)
	#       hostname    (radius.example.com)
	#       wildcard    (*)
	ipaddr = 127.0.0.1

	#  OR, you can use an IPv6 address, but not both
	#  at the same time.
#	ipv6addr = ::	# any.  ::1 == localhost

	#  Port on which to listen.
	#  Allowed values are:
	#	integer port number (1812)
	#	0 means "use /etc/services for the proper port"
	port = 0

	#  Some systems support binding to an interface, in addition
	#  to the IP address.  This feature isn't strictly necessary,
	#  but for sites with many IP addresses on one interface,
	#  it's useful to say "listen on all addresses for eth0".
	#
	#  If your system does not support this feature, you will
	#  get an error if you try to use it.
	#
#	interface = eth0

	#  Per-socket lists of clients.  This is a very useful feature.
	#
	#  The name here is a reference to a section elsewhere in
	#  radiusd.conf, or clients.conf.  Having the name as
	#  a reference allows multiple sockets to use the same
	#  set of clients.
	#
	#  If this configuration is used, then the global list of clients
	#  is IGNORED for this "listen" section.  Take care configuring
	#  this feature, to ensure you don't accidentally disable a
	#  client you need.
	#
	#  See clients.conf for the configuration of "per_socket_clients".
	#
#	clients = per_socket_clients
}

.....

Ich hoffe wirklich mir kann jemand den Fehler erklären, ich weiß an dieser Stelle nicht mehr weiter. Danke im Vorraus und eine gute Nacht !

PS: habe auf den configs Teile weggelassen da es unwichtige Informationen sind, bzw standarteinstellungen an denen ich nichts geändert habe.
wichtig in der radiusd.conf ist eig nur der Part nach "listen".

Benutzeravatar
ThorstenS
Beiträge: 2875
Registriert: 24.04.2004 15:33:31

Re: freeradius, grundlegend

Beitrag von ThorstenS » 08.06.2010 09:00:31

Es ist nur wenige Ausgaben her, dass die c't einen umfangreichen Bericht zu freeradius unter debian/ubuntu veröffentlicht hat.
Ich würde die empfehlen das PDF für 2€ zu kaufen - imho lohnt sich das.

b00n07
Beiträge: 3
Registriert: 31.08.2009 23:28:27

Re: freeradius, grundlegend

Beitrag von b00n07 » 08.06.2010 11:45:39

Danke, das hört sich gut an, kannst du mir vlt einen link schicken wo man die Ausgaben der c't runterladen kann ? google hilft mir da gerade nicht so sehr.

b00n07
Beiträge: 3
Registriert: 31.08.2009 23:28:27

Re: freeradius, grundlegend

Beitrag von b00n07 » 08.06.2010 15:11:28

Ich wäre trotzdem dankbar wenn mir hier jemand helfen könnte .... es dauert wohl eine weile bis ich an die ausgabe der c't komme

Benutzeravatar
ThorstenS
Beiträge: 2875
Registriert: 24.04.2004 15:33:31

Re: freeradius, grundlegend

Beitrag von ThorstenS » 08.06.2010 15:21:07

Die Anleitung:
http://www.heise.de/kiosk/archiv/ct/2010/12/180_kiosk

Wenn du kein squeeze hast, magst du sicherlich noch das hier lesen, damit du SSL Verschlüsselung hast:
http://www.heise.de/kiosk/archiv/ct/2010/11/192_kiosk

kostet zusammen nur 0,70€ -

Antworten