• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

Radius/H26-Nov-2009-1,402775

contrib/H26-Nov-2009-476206

dicts/H26-Nov-2009-10,6579,347

docs/H03-May-2022-

examples/H26-Nov-2009-709419

packets/H03-May-2022-1810

t/H26-Nov-2009-3,1872,539

ChangesH A D25-Aug-20097.7 KiB198168

MANIFESTH A D26-Nov-20092.7 KiB125124

MANIFEST.SKIPH A D11-Sep-2009243 3331

META.ymlH A D26-Nov-2009447 1615

Makefile.PLH A D23-Oct-2009697 2621

READMEH A D25-Aug-20093.6 KiB12081

README.3COMH A D25-Aug-20091.1 KiB2920

README.VSAH A D25-Aug-20091.3 KiB4227

README.brokenH A D25-Aug-20091.3 KiB3023

README.debianH A D25-Aug-2009341 117

README.packetsH A D23-Sep-20094.3 KiB10177

README.serverH A D25-Aug-2009531 139

build-stampH A D14-Oct-20090

install-stampH A D14-Oct-20090

README

1-----BEGIN PGP SIGNED MESSAGE-----
2Hash: SHA1
3
4
5
6Net::Radius Modules
7===================
8
9The modules included here provide an interface to the RADIUS
10protocol. It consists of the following modules:
11
12Net::Radius::Packet	- Deals with RADIUS packets
13Net::Radius::Dictionary	- Deals with RADIUS dictionaries
14
15This module is essentially the original RADIUS-1.0 distribution by
16Christopher Masto plus a number of changes and fixes by Luis Muñoz and
17Ian Smith.
18
19It has been changed so that it better fits the CPAN namespace. See the
20other README.* files in this archive for additional information.
21
22The installation follows the standard protocol...
23
24$ perl Makefile.PL
25$ make
26$ make test
27$ make install
28
29The ./examples directory contain a number of simple examples.
30
31This code supports the use of vendor specific attributes. This
32type of attribute is defined in RFC-2138 and is used to support
33'propietary' extensions on top of the base RADIUS specification.
34
35There are two new kinds of entries in the RADIUS dictionary in
36order to specify VSAs.
37
38VENDORATTR <vendor> <attribute> <id> <type>
39
40This entry is used to create a new kind of vendor attribute,
41such as in this example
42
43VENDORATTR 	9 	cisco-avpair 	1 	string
44
45This creates a new vendor-specific attribute for vendor 9 (Cisco
46Systems), with name 'cisco-avpair'. This attribute is identified by
47numeric id '1' and is associated with a string value.
48
49The second type of entry allows the specification of named values.
50The following is an hypotetical example of named value entry.
51
52VENDORATTR	9	cisco-enum	254	integer
53VENDORVALUE	9	cisco-enum	Value-1	1
54VENDORVALUE	9	cisco-enum	Value-2	2
55VENDORVALUE	9	cisco-enum	Value-3	3
56
57Alternatively, you can use the widely deployed FreeRadius dictionary
58files' syntax of:
59
60VENDOR		Cisco		9
61ATTRIBUTE	Cisco-AVPair	1	string		Cisco
62
63About the stability, this code has been in very active use at a
64largish ISP with millions of users using a variety of network
65equipment with impressive results. It has been succesfully used under
66FreeBSD, Linux, Solaris and Tru64.
67
68There's copious support material along with this distribution. Please
69do take a look.
70
71DO YOU WANT TO THANK ME?
72
73If  you consider this  a valuable  contribution, there  is a  web page
74where you can express your gratitude. Please see
75
76	http://mipagina.cantv.net/lem/thanks-en.html (English)
77	http://mipagina.cantv.net/lem/thanks-es.html (Spanish)
78
79SECURITY CONSIDERATIONS
80
81I have no control on the machanisms involved in the storage or
82transport of this distribution. This means that I cannot guarantee
83that the distribution you have in your hands is indeed, the same
84distribution I packed and uploaded.
85
86Along the distribution file, you should have a file with the extension
87".asc". This contains a GPG "detached signature" that makes it
88impossible for anybody to alter this distribution. If security is of
89any concern to you, by all means verify the signature of this file and
90contact the author if any discrepancy is detected.
91
92You can find more information about this at the following URL
93
94             http://mipagina.cantv.net/lem/gpg/
95
96COPYRIGHT AND LICENSE
97
98Original work (c) Christopher Masto. Changes (c) 2002,2003 Luis
99E. Muñoz <luismunoz@cpan.org>.
100
101This software can be used under the same terms as perl itself. It also
102carries the same warranties.
103
104Please send bug reports (or patches) as well as feedback and
105suggestions to
106
107luismunoz@cpan.org
108
109When submitting bugs, it is very important that you include the
110relevant information for reproducing the bug. Packet dumps are most
111useful.
112
113-----BEGIN PGP SIGNATURE-----
114Version: GnuPG v1.2.1 (Darwin)
115
116iD8DBQFEznquQyDWGRI/hhARAq37AJ4nwkdiU1eqgpTObZ0G2QZ0jvQU2QCgkR28
117nf3syw7TJsGGyrr/KSTcyfU=
118=Of85
119-----END PGP SIGNATURE-----
120

README.3COM

1
2Feb 21 2001:
3
4Finally the VSA packing/unpacking works with 3Com equipment. Ian Smith
5contributed  code to  unpack  VSAs  coming from  the  3Com. Quan  Choi
6reported   useful   information   regarding   the  encoding   of   the
7VSAs.  According  to  Quan,  3Com  packs the  VSAs  according  to  the
8following structure:
9
10   0                   1                   2                   3
11   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
12   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13   |     Type      |  Length       |            Vendor-Id
14   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15        Vendor-Id (cont)           |      Sub-Attribute Type
16   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17          Sub-Attribute Type       |        Payload...             |
18   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
19
20Which is fine,  as RFC-2138 does not mandate  any particular structure
21for the Vendor-Specific payload.
22
23Thanks to both Ian and Quan for the help.
24
25luismunoz@cpan.org
26
27$Id: README.3COM 7 2003-01-08 03:42:41Z lem $
28
29

README.VSA

1
2Vendor-Specific Attribute support
3
4This code supports the use of vendor specific attributes. This
5type of attribute is defined in RFC-2138 and is used to support
6'propietary' extensions on top of the base RADIUS specification.
7
8There are two new kinds of entries in the RADIUS dictionary in
9order to specify VSAs.
10
11VENDORATTR <vendor> <attribute> <id> <type>
12
13This entry is used to create a new kind of vendor attribute,
14such as in this example
15
16VENDORATTR 	9 	cisco-avpair 	1 	string
17
18This creates a new vendor-specific attribute for vendor 9 (Cisco
19Systems), with name 'cisco-avpair'. This attribute is identified by
20numeric id '1' and is associated with a string value.
21
22The second type of entry allows the specification of named values.
23The following is an hypotetical example of named value entry.
24
25VENDORATTR	9	cisco-enum	254	integer
26VENDORVALUE	9	cisco-enum	Value-1	1
27VENDORVALUE	9	cisco-enum	Value-2	2
28VENDORVALUE	9	cisco-enum	Value-3	3
29
30Questions and comments about the package can be sent to the
31author of the module, Christopher Masto <chris@netmonger.net>.
32
33Questions and comments about the VSA support can be directed
34to the author of this part of the code, Luis E. Mu�oz
35<luismunoz@cpan.org>
36
37Ian Smith <iansmith@ncinter.net> contributed code for 3COM
38VSAs.
39
40$Id: README.VSA 7 2003-01-08 03:42:41Z lem $
41
42

README.broken

1
2* NAS-IP-Address and other "ipaddr" encoding inconsistencies
3
4  I've confirmed some reports that the Alcatel 5620 SAM Release 3.0
5  and possibly other endpoints from this or other vendors, are
6  improperly encoding the IP address in the NAS-IP-Address tuple. The
7  relevant RFCs state that NAS-IP-Address should be encoded as four
8  octets, MSB. However, this device seems to be packing the argument
9  as a plain string.
10
11  This error may manifest itself as a parameter length mismatch with
12  inet_ntoa() in earlier versions of Net::Radius. A packet dump
13  exhibiting this problem looks like this...
14
15  $ tcpdump -vvv -nr tcpdump-radius.out
16  reading from file tcpdump-radius.out, link-type EN10MB (Ethernet)
17  16:13:29.540605 IP (tos 0x0, ttl 250, id 41011, offset 0, flags
18  [DF], length: 108) 10.120.156.15.33452 > 161.196.109.5.1645: RADIUS,
19  length: 80
20        Access Request (1), id: 0x78, Authenticator: ...
21          NAS IP Address Attribute (4), length: 15, Value: ERROR: length 13 != 4
22            0x0000:  3130 2e31 3230 2e31 3536 2e31 35
23
24  Note the error pointed out by tcpdump, referring to the length of
25  the attribute.
26
27  In order to improve interoperability, I've included code that allows
28  decoding of these packets, by simply returning the enclosed string
29  "as is" to the calling script.
30

README.debian

1
2On Debian systems, all the bundled dictionaries are placed in
3/usr/share/libnet-radius-perl/dicts.
4
5Documentation is placed in /usr/share/doc/libnet-radius-perl/ as per
6the Debian Policy.
7
8For other distributions or under manual installation, you may need to
9locate those files manually according to your needs.
10
11Luis E. Muñoz / 2009-08-25

README.packets

1
2As of version 1.52, Net::Radius includes the "packet tests". Those
3packet tests consist of RADIUS packets captured in various production
4environments and passed through Net::Radius, to see how it fares with
5real-world data.
6
7Ideally, every bug report about Net::Radius related to the dialog with
8a given network device, should include a proper packet capture that
9allows for the reproduction of the problem. This also allows the
10implementation of regression tests that will insure that packets will
11be decoded properly in later versions of this distribution.
12
13To be useful, a packet capture must include the complete (binary) RADIUS
14packet(s) in one or more files. Also, the following information would
15be of help:
16
17* RADIUS Secret and Auhenticator, if applicable and known
18
19* Name, version and relevant information about the device producing
20  the packet
21
22* Relevant dictionary entries to properly decode the packet
23  attributes. This is specially important with Vendor-Specific
24  Attributes
25
26* If you're including more than a single packet, please specify what
27  each one should contain
28
29If the packet dump is being provided as part of a bug report, a
30concise explanation about why the Net::Radius handling of the packet
31is incorrect and what the correct or expected result is. If you have
32references to document this further, please provide them as
33well. Packet dumps from other RADIUS server doing "the right thing"
34are worth extra points.
35
36If you want to contribute with the production of more packet tests,
37please consider the following:
38
39* Devices not currently included in the packet tests are
40  welcome. Exotic, old or obsoleted devices are even more welcome (Any
41  PortMaster 2 or 3 out there?)
42
43* Ideally, try to provide at least one sample packet of each type that
44  your device is able to send (ie, Access-Request, Accounting-Request,
45  etc)
46
47* Packet dumps will be copied straight into the distribution - You're
48  responsible for safeguarding any private or restricted information
49  on the packets, such as the RADIUS secret, user names or passwords,
50  IP addresses, etc.
51
52HOW TO PRODUCE A PACKET DUMP
53
54Packet dumps can be produced with any tool whose output is supported
55by wireshark (formerly, ethereal), which is then used to extract the
56packet payload and build the corresponding test. My recommendation is
57to use the tcpdump utility, available in many operating systems. There
58are other compatible utilities that can store captured packets as raw
59binary files, which can be compressed and sent via email or attached
60to a bug report.
61
62By way of example, let's say that the RADIUS server is located at IP
63address 10.0.0.1, serving requests in the UDP ports 1812 and 1813 for
64authentication and accounting respectively, while the device whose
65dialog we want to capture, uses IP address 10.0.0.5. Packets from the
66device to the server could be captured using the following command (in
67a single line):
68
69tcpdump -s 0 -c 1 -w radius.dump -e 'src host 10.0.0.5 and dst host
70  10.0.0.1 and udp and portrange 1812-1813'
71
72Of course, the machine must have an interface connected so that
73traffic can be sniffed, whose name may have to be specified. Note that
74only one packet is being captured (-c option) although you could
75capture more that this.
76
77Likewise, response packets from the RADIUS server to the device can be
78captured with the following command:
79
80tcpdump -s 0 -c 1 -w radius.dump -e 'src host 10.0.0.1 and dst host
81  10.0.0.5 and udp and portrange 1812-1813'
82
83tcpdump has a nice and extensive manual page that explains all of its
84options. Please take a look at it so that you understand independently
85what the incantations I've provided above actually do or conversely,
86whether there is something else you may need to do in your environment
87to acurately record the information you want.
88
89IMPORTANT: Remember that full packets are needed for proper
90testing. Make sure your captures include all of the packet
91payload. Including only the packet headers make for a very poor test
92input. In the examples above, the -s option takes care of this.
93
94The commands disussed above will capure packets to/from the relevant
95devices, leavig them in the file radius.dump that you can now
96send. Remember to record and include the useful information mentioned
97in the first part of these instructions.
98
99If you want to provide the source file for the tests directly, please
100take a look at the file packets/README
101

README.server

1This distribution includes a few RADIUS servers with different degrees
2if functionality in the examples directory. If you're considering
3writing a RADIUS server, take a look at Net::Radius::Server before
4starting.
5
6Net::Radius::Server is an extensible framework allowing the creation
7of RADIUS servers with very little programming. Complex tasks are
8easily accomplished by means of a pipeline architecture in which each
9request is matched and then acted upon by Perl code.
10
11Classes implementing common tasks are already included.
12
13