This section contains the minimal modifications to the FreeRadius3 configuration.
These modifications should be considered only as an example of the FreeRadius configuration. Here we do not address the FreeRadius integration with a billing system or a database.
Suppose, the Radius server has been assigned IP address 192.168.1.200 and port 1812.
First you should add a dictionary dictionary.vasexperts of vendor-specific attributes to the Radius server dictionary. For this purpose:
/usr/share/dpi/dictionary.vasexperts from the fastpcrf installation package to the $freeRadius/share/freeradius/ directory$freeRadius/share/freeradius/dictionary dictionary:$INCLUDE dictionary.vasexperts
The parameters to establish connection with the Radius server should be specified in the fastpcrf.configuration file containing the fastPCRF instance (i.e. the Radius client) settings:
radius_server=secret123@192.168.1.200%eth0:1812;msg_auth_attr=1
Here eth0 is the local (from the user's point of view) name of the network interface card which is used to establish the connection with the server 192.168.1.200.
Note that the Radius server settings and the client ones should match!
For each fastPCRF instance, the first step is to create a FreeRadius client. Let's name it the fastdpi1 client. All clients (the fastPCRF instances) will refer to the same virtual fastdpi-vs server.
Add to the Radius server raddb/clients.conf file the following lines:
client fastdpi1 {
ipaddr = 192.168.1.32
secret = secret123
require_message_authenticator = yes
# add_cui = yes
virtual_server = fastdpi-vs
}
Here:
Message-Authenticator attribute. RFC 2869 strongly recommends to use this attribute. This setting must be consistent with the msg_auth_attr option in the fastpcrf.conf: radius_server=…;msg_auth_attr=1yes value! The Radius server pass the CUI (Chargeable-User-Identity) attribute as the encrypted hash value of the user login for the sake of security. This approach is unacceptable for the fastDPI, so we have to use the user login in plain text. Therefore, add_cui is commented out here.
In order to configure a virtual server please copy the raddb/sites-available/default file which is the part of the FreeRadius installation package to the raddb/sites-enabled/fastdpi-vs and then modify the fastdpi-vs the following manner:
server default at the beginning of the file with the server fastdpi-vs oneipaddr = 192.168.1.200 port = 1812 interface = eth0
listen one are to be deleted (or commented out – we don't need them)post-auth {
…
#
# Add VasExperts attributes
#
if ( Chargeable-User-Identity == 0x00 ) {
update reply {
Chargeable-User-Identity := "u-%{Framed-IP-Address}"
}
}
else {
update reply {
Chargeable-User-Identity := "%{Chargeable-User-Identity}"
}
}
update reply {
Framed-IP-Address := "%{Framed-IP-Address}"
VasExperts-Policing-Profile := "test1"
VasExperts-Service-Profile += "1:test1"
Session-Timeout := 300
}
…
}
plc_unauth, you should use another name according to your settings);cp_unauth, you should use another name according to your settings.Example:
if (Chargeable-User-Identity == "\0" ) {
update reply {
Chargeable-User-Identity := "login"
}
}
update reply {
VasExperts-Policing-Profile := "plc_unauth"
VasExperts-Service-Profile += "5:cp_unauth"
}
You should add two fastPCRF entries to the raddb/users file:
VasExperts.FastDPI.unknownUser Cleartext-Password := "VasExperts.FastDPI" DEFAULT Cleartext-Password := "VasExperts.FastDPI"
The first entry specifies user name being sent by the fastPCRF in case of unknown login, more details see the radius_unknown_user configuration option description. The name is specified in the fastPCRF, as well as password, more details see the radius_unknown_user_psw configuration option description.
The second entry specifies the password used by the fastPCRF to send requests for known logins.
This password is specified in the fastPCRF, more details see the radius_user_password configuration option description.