⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ser_radius.sgml

📁 SIP Express Router, Linux下的SIP代理服务器,小巧实用,开发测试VoIP设备和应用的必备.
💻 SGML
📖 第 1 页 / 共 2 页
字号:
<!-- $Id: ser_radius.sgml,v 1.7 2004/08/24 08:45:12 janakj Exp $ --><!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [<!ENTITY ser "<acronym>SIP</acronym> Express Router"><!ENTITY nat "<acronym>NAT</acronym>"><!ENTITY ip "<acronym>IP</acronym>"><!ENTITY rtp "<acronym>RTP</acronym>"><!ENTITY stun "<acronym>STUN</acronym>"><!ENTITY fokus "FhG FOKUS"><!ENTITY sip "<acronym>SIP</acronym>"><!ENTITY rad "RADIUS"><!ENTITY pstn "<acronym>PSTN</acronym>">]><book>    <bookinfo>	<title>&ser &rad; HOWTO</title>	<authorgroup>	    <author>		<firstname>Jan</firstname>		<surname>Janak</surname>		<email>jan@iptel.org</email>	    </author>	</authorgroup>	<copyright>	    <year>2003</year>	    <holder>&fokus;</holder>	</copyright>	<revhistory>	    <revision>		<revnumber>$Revision: 1.7 $</revnumber>		<date>$Date: 2004/08/24 08:45:12 $</date>	    </revision>	</revhistory>    </bookinfo>    <chapter>	<title>Introduction</title>	<simpara>	    &ser can be configured to use &rad; server for authentication, accounting, and group	    membership checking. Since configuration of &rad; seems to be a common source of	    problems, we decided to put together this HOWTO.	</simpara>	<simpara>	    The HOWTO covers installation and configuration of FreeRADIUS server only. There are	    also other &rad; servers available and as long as they support digest authentication,	    they should work too. Any volunteers willing to describe setup of other &rad; servers	    are encouraged to contact the author.	</simpara>	<section>	    <title>Prerequisites</title>	    <simpara>		To setup &rad; support in &ser; you will need the following:	    </simpara>	    <itemizedlist>		<listitem>		    <simpara>			FreeRADIUS server, you can get it from <ulink			    url="http://www.freeradius.org">FreeRADIUS website</ulink>. The HOWTO			    describes installation and setup of release 0.9.1.		    </simpara>		</listitem>		<listitem>		    <simpara>			Radiusclient library. In version 0.8.14 we started to use the new version of			radiusclient library developed by Maxim Sobolev called radiusclient-ng. The 			homepage of the library is <ulink			    url="http://developer.berlios.de/projects/radiusclient-ng/">http://developer.berlios.de/projects/radiusclient-ng/</ulink>		    </simpara>		</listitem>		<listitem>		    <simpara>			&ser;, get it from <ulink url="http://iptel.org/ser">http://iptel.org/ser</ulink>		    </simpara>		</listitem>		<listitem>		    <simpara>			You should also have some experience in configuring &ser;. Before you enable			&rad; authentication or accounting make sure that the basic server is			running and that you know how to customize it to your taste.		    </simpara>		</listitem>		<listitem>		    <simpara>			If you want to use &rad; accounting then you will have to compile &ser; from			sources so you should know how to do it.		    </simpara>		</listitem>	    </itemizedlist>	    <simpara>		Various unix/linux distributions might include binary packages of the mentioned		applications. In that case you can safely use the packages, there shouldn't be any		problem. Location of some files may be different, though. We will describe		how to install the software from sources only.	    </simpara>	    <warning>		<simpara>		    Configuration of FreeRADIUS server described in the document is in no way		    exhaustive. This document is a sort of quick-start-guide, it shows how to get		    things running, but you should definitely read FreeRADIUS documentation		    and configure the server properly ! You have been warned.		</simpara>	    </warning>	</section>    </chapter>    <chapter>	<title>Radiusclient Library</title>	<simpara>	    Untar the source tarball.	</simpara>	<screen format="linespecific">root@localhost:/usr/local/src# tar xvfz radiusclient-0.4.3.tar.gz</screen>	    <simpara>		Compile and install the library.	    </simpara>	    <screen format="linespecific">root@localhost:/usr/local/src# cd radiusclient-0.3.2root@localhost:/usr/local/src/radiusclient-0.3.2# ./configureroot@localhost:/usr/local/src/radiusclient-0.3.2# makeroot@localhost:/usr/local/src/radiusclient-0.3.2# make install</screen>	<simpara>	    By default all the configuration files of the radiusclient library will be in	    <filename moreinfo="none">/usr/local/etc/radiusclient</filename> directory.	</simpara>	<simpara>	    If you use binary packages then the configuration files will be probably in <filename	    moreinfo="none">/etc/radiusclient</filename>.	</simpara>	<section>	    <title>File <filename moreinfo="none">radiusclient.conf</filename></title>	    <simpara>		The main configuration file of the library is <filename		    moreinfo="none">/usr/local/etc/radiusclient/radiusclient.conf</filename>, open		    the file in your favorite text editor and find lines containing the following:	    </simpara>	    <programlisting format="linespecific">authserver      localhost</programlisting>	    <simpara>		This is the hostname or &ip; address of the RADIUS server used for authentication. You		will have to change this unless the server is running on the same host as your &sip;		proxy.	    </simpara>	    <programlisting format="linespecific">acctserver      localhost</programlisting>	    <simpara>		This is the hostname or &ip; address of the RADIUS server used for accounting. You		will have to change this unless the server is running on the same host as your &sip		proxy.	    </simpara>	</section>	<section>	    <title>File <filename moreinfo="none">servers</filename></title>	    <simpara>		&rad; protocol uses simple access control mechanism based on shared secrets		that allows &rad; servers to limit access from &rad; clients. A &rad; server is		configured with a secret string and only &rad; clients that have the same		secret will be accepted.	    </simpara>	    <simpara>		You need to configure a shared secret for each server you have configured in		    <filename moreinfo="none">radiusclient.conf</filename> file in the previous		    step. The shared secrets are stored in <filename		    moreinfo="none">/usr/local/etc/radiusclient/servers</filename> file.	    </simpara>	    <simpara>		Each line contains hostname of a &rad; server and shared secret used in		communication with that server. The two values are separated by		whitespaces. Configure shared secrets for every &rad; server you are going to use.	    </simpara>	    <warning>		<simpara>		    &rad; servers and clients must be configured with the same shared secret,		    otherwise they will not accept RADIUS messages from each other and neither		    authentication nor accounting will work !		</simpara>	    </warning>	</section>	<section>	    <title>File <filename moreinfo="none">dictionary</filename></title>	    <simpara>		Radiusclient library contains file called <filename		moreinfo="none">dictionary.ser</filename>. That file includes all the attributes		that are needed by &ser;. Include the file in the main <filename		moreinfo="none">dictionary</filename> file. To include the file, put the following		line at the end of <filename moreinfo="none">dictionary</filename> file:	    </simpara>	    <screen format="linespecific">$INCLUDE /usr/local/etc/radiuclient/dictionary.ser</screen>	</section>    </chapter>    <chapter>	<title>FreeRADIUS Server</title>	<simpara>	    Untar, configure, build, and install the server:	</simpara>	    <screen format="linespecific">root@localhost:/usr/local/src# tar xvfz freeradius-0.9.1.tar.gzroot@localhost:/usr/local/src# cd freeradius-0.9.1root@localhost"/usr/local/src/freeradius-0.9.1# ./configureroot@localhost"/usr/local/src/freeradius-0.9.1# makeroot@localhost"/usr/local/src/freeradius-0.9.1# make install</screen>	<simpara>	    All the configuration files of FreeRADIUS server will be in <filename	    moreinfo="none">/usr/local/etc/raddb</filename> directory. If you install a binary	    package then you will probably find them in <filename moreinfo="none">/etc/raddb</filename>.	</simpara>	<simpara>	    The following sections describe how to configure freeradius server. First we describe	    the common configuration that must be done in any case. Configuration specific for	    authentication, accounting, and group membership checking will be described in separate	    sections.	</simpara>		<section>	    <title>Common configuration</title>	    <section>		<title>File <filename moreinfo="none">clients.conf</filename></title>		<simpara>		    File <filename moreinfo="none">/usr/local/etc/raddb/clients.conf</filename>		    contains description of &rad; clients that are allowed to use the server. For		    each of the clients you need to specify it's hostname or &ip address and also a		    shared secret. The shared secret must be the same string you configured in		    radiusclient library.		</simpara>		<simpara>		    Suppose that your &sip; server is running on host proxy.foo.bar and		    radiusclient library on that machine has been configure with		    <quote>foobarsecret</quote> as the shared secret. You need to put the		    following section into the file:		</simpara>		<programlisting format="linespecific">client proxy.foo.bar {    secret = foobarsecret    shortname = foo}</programlisting>		<simpara>		    This fragment allows access from &rad; clients on proxy.foo.bar if they use		    <quote>foobarsecret</quote> as the shared secret.		</simpara>		<note>		    <simpara>			The file already contains an entry for localhost (127.0.0.1), so if you are			running the &rad; server on the same host as your &sip; server, then modify			the existing entry instead. By default it contains shared secret			<quote>testing123</quote>.		    </simpara>		</note>	    </section>	    	    <section>		<title>File <filename moreinfo="none">dictionary</filename></title>		<simpara>		    File <filename moreinfo="none">/usr/local/etc/raddb/dictionary</filename>		    contains the dictionary of FreeRADIUS server. You have to add the same		    dictionary file (<filename moreinfo="none">dictionary.ser</filename>), which you		    added to the dictionary of radiusclient library, also here. In this case you		    don't have to append the contents of the file, you can include it into the main		    file.  Add the following line at the end of <filename		    moreinfo="none">/usr/local/etc/raddb/dictionary</filename>:		</simpara>		<programlisting format="linespecific">$INCLUDE /usr/local/etc/radiusclient/dictionary.ser</programlisting>		<simpara>		    That will include the same attribute definitions that are used in radiusclient		    library so the client and server will understand each other.		</simpara>	    </section>	    <section>		<title>File <filename moreinfo="none">radiusd.conf</filename></title>		<simpara>		    Digest authentication is disabled by default and you must enable it in this		    file. There are two sections, <quote>authorize</quote> and		    <quote>authenticate</quote>. Both sections contain line containing word		    <quote>digest</quote>. Both of them are commented and you must un-comment them		    to enable digest authentication.		</simpara>		<note>		    <simpara>			There is also another line containing word <quote>digest</quote> followed by			curly braces and it is enabled by default. The section is supposed to			contain digest module parameters but because digest module has no parameters,			it is empty. This is not the line you are supposed to uncomment ! There are			two more.		    </simpara>		</note>	    </section>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -