NEW Package: freeRADIUS 2.x
-
Well i have a whmcs server with mysql/freeradius interface which basicly loads the usernames and passwords in the mysql database….so this is why i want pfsense to sync the usernames so that i can do rate limiting and capping from pfsense.
-
I got it to work, I edited the files but did not know the config resets on reboot, so I edited freeradius.inc on line 362 and 1633, now all is working. On the other server I am using the normal freeradius package installed by me. I just need some more customization for french error message, working on it right now, i will upload the screenshots for the vouchers soon. This package is great, thanks again!
Hi I am using this package and created a group with 2 attributes: Max-All-Session := 600 (5 min) Simultaneous-Use := 1. I've enabled the noresetcounter on radiusd.conf, users on that group are able to authenticate ok, however they do not get disconnected after 600 sec have past. CP is enabled, interim updates enabled, authenticate users every minute is enabled. I have the same setup on another pf sense server with freeradius installed but not with this package and all is working ok on that one. I am using MySQL on both.
Thanks
Hi,
do you use freeradius2 package on both pfsense or not ? That's not clear for me.the attribute: Max-All-Session is not a predefined attribute in GUI. So you probably created this attribute in your mysql database ? And if you use mysql as database for accounting then you need to use the sqlcounter.conf file. This file is NOT supported from GUI. You need to check and perhaps edit this file from shell.
I don't how it works with mxsql but if I use the ../raddb/modules/counter module (without external database) then this modul is ONLY running on accounting-stop packets, interim-updates do not work. So make sure that it does with mysql.
re-authenticate every minute should be enabled on CP so that the user gets disconnected. that's right what you did. You should enabled "Disable acct_unique" in FreeRADIUS -> Settings to make accounting work properly.
For anybody still in doubt pfsense indeed resets few .conf files on reboot eg radiusd.conf sql.conf clients.conf . the file freeradius.inc is responsible for this. freeradius.inc is located in /usr/local/pkg/ ( I am just writing this to help anyone facing any problems with this.. like i did )
-
I "upgraded" to 64-bit pfSense 2.1 Beta 1 in order to get more available RAM and now FreeRadius is broken. It doesn't respond to authentication attempts and radiusd now sits at a steady 25% CPU load when running. Configuration files were the same (I messed around a little with EAP type and stuff which I really don't understand and created new certificates but it's now set back mostly at least how it was when working fine on 32-bit). It just appears broken on 64-bit. Any ideas?
-
maybe try to click 'Save' in eg EAP tab, so config of freeradius will be recreated. Then if problem still occurs paste some System logs of radiusd process.
-
I completely redid the configuration, deleted freeradius from config.xml and reinstalled package and started over. Same 25% CPU from the moment the package started. I'm clueless… what should I post?
Here's the output of radiusd -X :
[2.1-BETA1][admin@glacierfire.glaciercamp]/root(1): radiusd -X
FreeRADIUS Version 2.2.0, for host amd64-portbld-freebsd8.3, built on Dec 20 2012 at 23:20:32
Copyright (C) 1999-2012 The FreeRADIUS server project and contributors.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License v2.
Starting - reading configuration files …
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/radiusd.conf
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/clients.conf
including files in directory /usr/pbi/freeradius-amd64/etc/raddb/modules/
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/wimax
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/always
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/attr_filter
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/attr_rewrite
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/cache
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/chap
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/checkval
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/cui
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail.example.com
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail.log
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/dhcp_sqlippool
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/sql/mysql/ippool-dhcp.conf
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/digest
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/dynamic_clients
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/echo
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/etc_group
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/exec
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/expiration
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/expr
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/files
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/inner-eap
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ippool
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/krb5
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ldap
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/linelog
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/otp
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/logintime
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mac2ip
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mac2vlan
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mschap
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ntlm_auth
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/opendirectory
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/pam
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/pap
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/passwd
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/perl
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/policy
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/preprocess
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/radrelay
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/radutmp
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/realm
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/redis
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/rediswho
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/replicate
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/smbpasswd
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/smsotp
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/soh
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sql_log
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sqlcounter_expire_on_login
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sradutmp
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/unix
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/acct_unique
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/motp
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/datacounter_acct
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/eap.conf
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/policy.conf
including files in directory /usr/pbi/freeradius-amd64/etc/raddb/sites-enabled/
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/sites-enabled/default
main {
allow_core_dumps = no
}
including dictionary file /usr/pbi/freeradius-amd64/etc/raddb/dictionary
main {
name = "radiusd"
prefix = "/usr/pbi/freeradius-amd64"
localstatedir = "/var"
sbindir = "/usr/pbi/freeradius-amd64/sbin"
logdir = "/var/log"
run_dir = "/var/run"
libdir = "/usr/pbi/freeradius-amd64/lib/freeradius-2.1.12"
radacctdir = "/var/log/radacct"
hostname_lookups = no
max_request_time = 30
cleanup_delay = 5
max_requests = 1024
pidfile = "/var/run/radiusd.pid"
checkrad = "/usr/pbi/freeradius-amd64/sbin/checkrad"
debug_level = 0
proxy_requests = yes
log {
stripped_names = no
auth = yes
auth_badpass = no
auth_goodpass = no
msg_badpass = ""
msg_goodpass = ""
}
security {
max_attributes = 200
reject_delay = 1
status_server = no
}
}
radiusd: #### Loading Realms and Home Servers ####
radiusd: #### Loading Clients ####
client teakettle2 {
ipaddr = 172.21.12.2
require_message_authenticator = no
secret = "mqh6rWnxbTkgQkVn"
shortname = "teakettle2"
nastype = "other"
}
client cafeteria {
ipaddr = 172.21.12.3
require_message_authenticator = no
secret = "8UmEX8Xr6sRz64R4"
shortname = "cafeteria"
nastype = "other"
}
client lodgelobby {
ipaddr = 172.21.12.4
require_message_authenticator = no
secret = "5TEEQULqqTB49bYc"
shortname = "lodgelobby"
nastype = "other"
}
client conferenceroom {
ipaddr = 172.21.12.5
require_message_authenticator = no
secret = "5vQTATZSLBGqKNhx"
shortname = "conferenceroom"
nastype = "other"
}
client sector1 {
ipaddr = 172.21.12.6
require_message_authenticator = no
secret = "LgVKSbJ6eRcwdJzU"
shortname = "sector1"
nastype = "other"
}
client sector2 {
ipaddr = 172.21.12.7
require_message_authenticator = no
secret = "aHfBaTuxytqLKXFG"
shortname = "sector2"
nastype = "other"
}
client sector3 {
ipaddr = 172.21.12.8
require_message_authenticator = no
secret = "ZubfCx8NZ2z6uTyJ"
shortname = "sector3"
nastype = "other"
}
client sector4 {
ipaddr = 172.21.12.9
require_message_authenticator = no
secret = "mnSmhmWezPySNpbw"
shortname = "sector4"
nastype = "other"
}
client 5sector1 {
ipaddr = 172.21.12.10
require_message_authenticator = no
secret = "rsFmNjDNAEFGhWvP"
shortname = "5sector1"
nastype = "other"
}
client midway {
ipaddr = 172.21.12.12
require_message_authenticator = no
secret = "UF4KbWRT7KGPbY2s"
shortname = "midway"
nastype = "other"
}
radiusd: #### Instantiating modules ####
instantiate {
Module: Linked to module rlm_exec
Module: Instantiating module "exec" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/exec
exec {
wait = no
input_pairs = "request"
shell_escape = yes
}
Module: Linked to module rlm_expr
Module: Instantiating module "expr" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/expr
Module: Linked to module rlm_counter
Module: Instantiating module "daily" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
counter daily {
filename = "/var/log/radacct/timecounter/db.daily"
key = "User-Name"
reset = "daily"
count-attribute = "Acct-Session-Time"
counter-name = "Daily-Session-Time"
check-name = "Max-Daily-Session"
reply-name = "Session-Timeout"
cache-size = 5000
}
rlm_counter: Counter attribute Daily-Session-Time is number 11273
rlm_counter: Current Time: 1361179135 [2013-02-18 02:18:55], Next reset 1361257200 [2013-02-19 00:00:00]
Module: Instantiating module "weekly" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
counter weekly {
filename = "/var/log/radacct/timecounter/db.weekly"
key = "User-Name"
reset = "weekly"
count-attribute = "Acct-Session-Time"
counter-name = "Weekly-Session-Time"
check-name = "Max-Weekly-Session"
reply-name = "Session-Timeout"
cache-size = 5000
}
rlm_counter: Counter attribute Weekly-Session-Time is number 11275
rlm_counter: Current Time: 1361179135 [2013-02-18 02:18:55], Next reset 1361689200 [2013-02-24 00:00:00]
Module: Instantiating module "monthly" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
counter monthly {
filename = "/var/log/radacct/timecounter/db.monthly"
key = "User-Name"
reset = "monthly"
count-attribute = "Acct-Session-Time"
counter-name = "Monthly-Session-Time"
check-name = "Max-Monthly-Session"
reply-name = "Session-Timeout"
cache-size = 5000
}
rlm_counter: Counter attribute Monthly-Session-Time is number 11277
rlm_counter: Current Time: 1361179135 [2013-02-18 02:18:55], Next reset 1362121200 [2013-03-01 00:00:00]
Module: Instantiating module "forever" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
counter forever {
filename = "/var/log/radacct/timecounter/db.forever"
key = "User-Name"
reset = "never"
count-attribute = "Acct-Session-Time"
counter-name = "Forever-Session-Time"
check-name = "Max-Forever-Session"
reply-name = "Session-Timeout"
cache-size = 5000
}
rlm_counter: Counter attribute Forever-Session-Time is number 11279
rlm_counter: Current Time: 1361179135 [2013-02-18 02:18:55], Next reset 0 [2013-02-18 02:00:00]
rlm_counter: add_defaults: Start -
A problem could be the different versions of freeradius on pfsense 2.0 and 2.1
jimp did some changes on the pfsense server and updated some freeradius files for new freeradius 2.2.0 version.pfsense 2.1 is using freeradius 2.2.0 and pfsense 2.0.x is using freeradius 2.1.12. The reinstall could give you the newer version and the freeradius.inc file didn't get that.
Try to edit the /usr/local/pkg/freeradius.inc file on line 83 and 216
I will contact jimp to check if it is possible to make a new freeradius2 .tbz file for pfsense 2.0 so that all system use the same version and .inc file can be fixed.
-
Thanks, I edited those lines, FreeRADIUS still just locks at 25% CPU load when started. If you are interested to help troubleshoot the package, I can give you login credentials if you PM me. Unfortunately, I can't pay anything since I'm doing this work for free for a non-profit camp…
[2.1-BETA1][admin@glacierfire.glaciercamp]/root(1): radiusd -X
FreeRADIUS Version 2.2.0, for host amd64-portbld-freebsd8.3, built on Dec 20 2012 at 23:20:32
Copyright (C) 1999-2012 The FreeRADIUS server project and contributors.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License v2.
Starting - reading configuration files …
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/radiusd.conf
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/clients.conf
including files in directory /usr/pbi/freeradius-amd64/etc/raddb/modules/
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/wimax
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/always
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/attr_filter
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/attr_rewrite
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/cache
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/chap
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/checkval
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/cui
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail.example.com
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail.log
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/dhcp_sqlippool
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/sql/mysql/ippool-dhcp.conf
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/digest
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/dynamic_clients
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/echo
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/etc_group
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/exec
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/expiration
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/expr
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/files
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/inner-eap
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ippool
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/krb5
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ldap
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/linelog
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/otp
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/logintime
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mac2ip
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mac2vlan
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mschap
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ntlm_auth
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/opendirectory
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/pam
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/pap
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/passwd
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/perl
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/policy
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/preprocess
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/radrelay
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/radutmp
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/realm
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/redis
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/rediswho
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/replicate
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/smbpasswd
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/smsotp
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/soh
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sql_log
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sqlcounter_expire_on_login
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sradutmp
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/unix
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/acct_unique
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/motp
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/datacounter_acct
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/eap.conf
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/policy.conf
including files in directory /usr/pbi/freeradius-amd64/etc/raddb/sites-enabled/
including configuration file /usr/pbi/freeradius-amd64/etc/raddb/sites-enabled/default
main {
allow_core_dumps = no
}
including dictionary file /usr/pbi/freeradius-amd64/etc/raddb/dictionary
main {
name = "radiusd"
prefix = "/usr/pbi/freeradius-amd64"
localstatedir = "/var"
sbindir = "/usr/pbi/freeradius-amd64/sbin"
logdir = "/var/log"
run_dir = "/var/run"
libdir = "/usr/pbi/freeradius-amd64/lib/freeradius-2.1.12"
radacctdir = "/var/log/radacct"
hostname_lookups = no
max_request_time = 30
cleanup_delay = 5
max_requests = 1024
pidfile = "/var/run/radiusd.pid"
checkrad = "/usr/pbi/freeradius-amd64/sbin/checkrad"
debug_level = 0
proxy_requests = yes
log {
stripped_names = no
auth = yes
auth_badpass = no
auth_goodpass = no
msg_badpass = ""
msg_goodpass = ""
}
security {
max_attributes = 200
reject_delay = 1
status_server = no
}
}
radiusd: #### Loading Realms and Home Servers ####
radiusd: #### Loading Clients ####
client teakettle2 {
ipaddr = 172.21.12.2
require_message_authenticator = no
secret = "mqh6rWnxbTkgQkVn"
shortname = "teakettle2"
nastype = "other"
}
client cafeteria {
ipaddr = 172.21.12.3
require_message_authenticator = no
secret = "8UmEX8Xr6sRz64R4"
shortname = "cafeteria"
nastype = "other"
}
client lodgelobby {
ipaddr = 172.21.12.4
require_message_authenticator = no
secret = "5TEEQULqqTB49bYc"
shortname = "lodgelobby"
nastype = "other"
}
client conferenceroom {
ipaddr = 172.21.12.5
require_message_authenticator = no
secret = "5vQTATZSLBGqKNhx"
shortname = "conferenceroom"
nastype = "other"
}
client sector1 {
ipaddr = 172.21.12.6
require_message_authenticator = no
secret = "LgVKSbJ6eRcwdJzU"
shortname = "sector1"
nastype = "other"
}
client sector2 {
ipaddr = 172.21.12.7
require_message_authenticator = no
secret = "aHfBaTuxytqLKXFG"
shortname = "sector2"
nastype = "other"
}
client sector3 {
ipaddr = 172.21.12.8
require_message_authenticator = no
secret = "ZubfCx8NZ2z6uTyJ"
shortname = "sector3"
nastype = "other"
}
client sector4 {
ipaddr = 172.21.12.9
require_message_authenticator = no
secret = "mnSmhmWezPySNpbw"
shortname = "sector4"
nastype = "other"
}
client 5sector1 {
ipaddr = 172.21.12.10
require_message_authenticator = no
secret = "rsFmNjDNAEFGhWvP"
shortname = "5sector1"
nastype = "other"
}
client midway {
ipaddr = 172.21.12.12
require_message_authenticator = no
secret = "UF4KbWRT7KGPbY2s"
shortname = "midway"
nastype = "other"
}
radiusd: #### Instantiating modules ####
instantiate {
Module: Linked to module rlm_exec
Module: Instantiating module "exec" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/exec
exec {
wait = no
input_pairs = "request"
shell_escape = yes
}
Module: Linked to module rlm_expr
Module: Instantiating module "expr" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/expr
Module: Linked to module rlm_counter
Module: Instantiating module "daily" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
counter daily {
filename = "/var/log/radacct/timecounter/db.daily"
key = "User-Name"
reset = "daily"
count-attribute = "Acct-Session-Time"
counter-name = "Daily-Session-Time"
check-name = "Max-Daily-Session"
reply-name = "Session-Timeout"
cache-size = 5000
}
rlm_counter: Counter attribute Daily-Session-Time is number 11273
rlm_counter: Current Time: 1361209237 [2013-02-18 10:40:37], Next reset 1361257200 [2013-02-19 00:00:00]
Module: Instantiating module "weekly" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
counter weekly {
filename = "/var/log/radacct/timecounter/db.weekly"
key = "User-Name"
reset = "weekly"
count-attribute = "Acct-Session-Time"
counter-name = "Weekly-Session-Time"
check-name = "Max-Weekly-Session"
reply-name = "Session-Timeout"
cache-size = 5000
}
rlm_counter: Counter attribute Weekly-Session-Time is number 11275
rlm_counter: Current Time: 1361209237 [2013-02-18 10:40:37], Next reset 1361689200 [2013-02-24 00:00:00]
Module: Instantiating module "monthly" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
counter monthly {
filename = "/var/log/radacct/timecounter/db.monthly"
key = "User-Name"
reset = "monthly"
count-attribute = "Acct-Session-Time"
counter-name = "Monthly-Session-Time"
check-name = "Max-Monthly-Session"
reply-name = "Session-Timeout"
cache-size = 5000
}
rlm_counter: Counter attribute Monthly-Session-Time is number 11277
rlm_counter: Current Time: 1361209237 [2013-02-18 10:40:37], Next reset 1362121200 [2013-03-01 00:00:00]
Module: Instantiating module "forever" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
counter forever {
filename = "/var/log/radacct/timecounter/db.forever"
key = "User-Name"
reset = "never"
count-attribute = "Acct-Session-Time"
counter-name = "Forever-Session-Time"
check-name = "Max-Forever-Session"
reply-name = "Session-Timeout"
cache-size = 5000
}
rlm_counter: Counter attribute Forever-Session-Time is number 11279
rlm_counter: Current Time: 1361209237 [2013-02-18 10:40:37], Next reset 0 [2013-02-18 10:00:00]
rlm_counter: add_defaults: Start
^C
[2.1-BETA1][admin@glacierfire.glaciercamp]/root(2): -
Hi again,
I did and upgrade of an "old" pfsense 2.1-BETA0 with freeradius2.1.12 to todays pfsense snapshot and freeradius2.2.0
Service started and no problems with high CPU usage.
But nevertheless there is something which needs to be corrected and please make sure you did that.Edit the freeradius.inc file:
vi /usr/local/pkg/freeradius.inc
Remove this line 83:
exec("chown -R root:wheel " . FREERADIUS_BASE . "/etc/raddb && chown -R root:wheel " . FREERADIUS_BASE . "/lib/freeradius-2.1.12 && chown -R root:wheel /var/log/radacct");
With this line:
[code]exec("chown -R root:wheel " . FREERADIUS_BASE . "/etc/raddb && chown -R root:wheel " . FREERADIUS_BASE . "/lib/freeradius-2.2.0 && chown -R root:wheel /var/log/radacct");[/code]
Remove this line 216:
libdir = \${exec_prefix}/lib/freeradius-2.1.12
with this line:
libdir = \${exec_prefix}/lib/freeradius-2.2.0
Save the freeradius.inc
Now go to Diagnoctics –> Command Prompt and put the following into the PHP Execute:
require_once('/usr/local/pkg/freeradius.inc'); freeradius_install_command();
This command will take some time. It will recreate all folders and config files and restart freeradius service.
After that try again if it is working.Question:
Do you "just" have problems with high CPU usage or do you have problems with freeradius at all? Does it show you "Ready to process requests" ?PS: No need to SSH and no need to pay money. Use your money for usefull things or donate to pfsense but not to me ;-)
-
No, it's not just high CPU usage, it doesn't work, never gets to ready to process. I sent you exactly what it does :) I edited those files but I never ran that command you told me to, just did that. It still gets stuck on the same line (add defaults: start). Here's the radiusd thread causing the 25% CPU use:
59445 root 119 0 34040M 9348K CPU1 1 1:13 100.00% radiusd
100% use on that virtual core, it's like it's pegging it out in some kind of loop. Always worked fine on 32-bit. Maybe a complete system reinstall as 64-bit is in order, but it won't be able to happen for a month or so (though the RADIUS is only needed for youth camps come summer, right now it's all rental groups that don't get to bypass the proxy server :) )
-
Perhaps just try with a complete fresh install.
Do not mix architectures between snapshots. Just start with amd64 and stay on amd64 or do a fresh install.
And after you installed the freeradius2 package again, do the changes, run the command I wrote and then try again :-) -
Yeah, but I can't do a fresh install for about three weeks :) Going to just do that!
-
Is freeradius2 starting if you remove all config entries from config.xml file and do a fresh freeradius2 installation ?
The only thing you need to configure is a listening interface and then freeradius must start. If it starts it could be an config problem - some special char or some syntax error.Just a suggestion.
-
Nope, I tried that already, no luck. I actually deleted my entire configuration and started over. Thus why there's no users except the one test user…
-
Try to install and….
$ pkg_add -r http://files.pfsense.org/packages/8/All/freeradius-2.1.12_1.tbz tar: Failed to set default locale tar: Failed to set default locale tar: tar: Failed to set default locale Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale ************************************************************ The OpenLDAP client package has been successfully installed. Edit /usr/local/etc/openldap/ldap.conf to change the system-wide client defaults. Try `man ldap.conf' and visit the OpenLDAP FAQ-O-Matic at http://www.OpenLDAP.org/faq/index.cgi?file=3 for more information. ************************************************************ tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale ==== Note that some of the standard modules are provided as separate ports since they require extra dependencies: bsddb databases/py-bsddb gdbm databases/py-gdbm sqlite3 databases/py-sqlite3 tkinter x11-toolkits/py-tkinter Install them as needed. ==== tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale Removing stale symlinks from /usr/bin... Skipping /usr/bin/perl Skipping /usr/bin/perl5 Removing /usr/local/bin/perl5.14.2 installed by an older perl port Done. Creating various symlinks in /usr/bin... Symlinking /usr/local/bin/perl5.12.4 to /usr/bin/perl Symlinking /usr/local/bin/perl5.12.4 to /usr/bin/perl5 Done. cd: can't cd to /usr/include Cleaning up /etc/make.conf... Done. Spamming /etc/make.conf... Done. tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale pkg_add: warning: package 'libxml2-2.7.8_3' requires 'libiconv-1.14', but 'libiconv-1.13.1_1' is installed tar: Failed to set default locale tar: Failed to set default locale tar: Failed to set default locale pkg_add: warning: package 'postgresql-client-8.4.12' requires 'libiconv-1.14', but 'libiconv-1.13.1_1' is installed The PostgreSQL port has a collection of "side orders": postgresql-docs For all of the html documentation p5-Pg A perl5 API for client access to PostgreSQL databases. postgresql-tcltk If you want tcl/tk client support. postgresql-jdbc For Java JDBC support. postgresql-odbc For client access from unix applications using ODBC as access method. Not needed to access unix PostgreSQL servers from Win32 using ODBC. See below. ruby-postgres, py-PyGreSQL For client access to PostgreSQL databases using the ruby & python languages. postgresql-plperl, postgresql-pltcl & postgresql-plruby For using perl5, tcl & ruby as procedural languages. postgresql-contrib Lots of contributed utilities, postgresql functions and datatypes. There you find pg_standby, pgcrypto and many other cool things. etc... ===> Setting user and group in radiusd.conf ===> Creating users and/or groups. Using existing group 'freeradius'. Using existing user 'freeradius'. ===> Bootstrapping default certificates, please wait... tar: tar: Failed to set default localeFailed to set default locale ===> Adjusting ownership of directory /usr/local/etc/raddb ===> Adjusting ownership of directory /var/log/radacct ===> Adjusting ownership of directory /var/run/radiusd ===> Adjusting ownership of /var/log/radius.log ===> Adjusting ownership of /var/log/radutmp ===> Adjusting ownership of /var/log/radwtmp ===> Updating libdir in /usr/local/etc/raddb/radiusd.conf pkg_add: warning: package 'freeradius-2.1.12_1' requires 'libiconv-1.14', but 'libiconv-1.13.1_1' is installed =============================================================================== To enable FreeRADIUS, put the following line in /etc/rc.conf radiusd_enable="YES" The sample configuration can be found at /usr/local/share/examples/freeradius/raddb If you are upgrading FreeRADIUS, you are advised to use this as a reference for updating your configuration. FreeRADIUS will look for its configuration directory at /usr/local/etc/raddb by default. If you did not already have a configuration at this location, the sample configuration has been copied to this location and has been bootstrapped. If you wish to point FreeRADIUS to a configuration at a different location, put the following line in /etc/rc.conf radiusd_flags="-d /path/to/raddb" To start the server in normal (daemon) mode, run: /usr/local/etc/rc.d/radiusd start and to stop the server, run: /usr/local/etc/rc.d/radiusd stop To start the server in debugging mode, run: /usr/local/etc/rc.d/radiusd debug You are advised to make cautious changes to the configuration, and to test frequently, using debugging mode where necessary. Try to resist the temptation to disable or delete things that you don't understand - you may well break things! The documentation has been installed at /usr/local/share/doc/freeradius Useful configuration advice can be found in the FreeRADIUS Wiki at http://wiki.freeradius.org ===============================================================================
-
Try to install and….
$ pkg_add -r http://files.pfsense.org/packages/8/All/freeradius-2.1.12_1.tbz (...)
What do you want to do?
If you want to use freeradius2 package on pfsense then just go to
System –> Package Manager --> Available Packages
and install freeradius2No need to do that manual from the console and it will not work.
-
Try to install and….
$ pkg_add -r http://files.pfsense.org/packages/8/All/freeradius-2.1.12_1.tbz (...)
What do you want to do?
If you want to use freeradius2 package on pfsense then just go to
System –> Package Manager --> Available Packages
and install freeradius2No need to do that manual from the console and it will not work.
System –> Package Manager --> Available Packages
and install freeradius2
But dont RUN :(I tried all ways to install ... but this package does not want to start
$ radiusd -X FreeRADIUS Version 2.2.0, for host i386-portbld-freebsd8.3, built on Dec 20 2012 at 23:43:04 Copyright (C) 1999-2012 The FreeRADIUS server project and contributors. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You may redistribute copies of FreeRADIUS under the terms of the GNU General Public License v2\. Starting - reading configuration files ... including configuration file /usr/pbi/freeradius-i386/etc/raddb/radiusd.conf including configuration file /usr/pbi/freeradius-i386/etc/raddb/clients.conf including files in directory /usr/pbi/freeradius-i386/etc/raddb/modules/ including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/wimax including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/always including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/attr_filter including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/attr_rewrite including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/cache including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/chap including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/checkval including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/counter including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/cui including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/detail including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/detail.example.com including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/detail.log including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/dhcp_sqlippool including configuration file /usr/pbi/freeradius-i386/etc/raddb/sql/mysql/ippool-dhcp.conf including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/digest including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/dynamic_clients including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/echo including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/etc_group including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/exec including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/expiration including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/expr including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/files including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/inner-eap including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/ippool including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/krb5 including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/ldap including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/linelog including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/otp including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/logintime including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/mac2ip including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/mac2vlan including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/mschap including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/ntlm_auth including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/opendirectory including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/pam including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/pap including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/passwd including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/perl including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/policy including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/preprocess including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/radrelay including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/radutmp including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/realm including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/redis including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/rediswho including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/replicate including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/smbpasswd including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/smsotp including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/soh including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/sql_log including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/sqlcounter_expire_on_login including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/sradutmp including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/unix including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/acct_unique including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/motp including configuration file /usr/pbi/freeradius-i386/etc/raddb/modules/datacounter_acct including configuration file /usr/pbi/freeradius-i386/etc/raddb/eap.conf including configuration file /usr/pbi/freeradius-i386/etc/raddb/policy.conf including files in directory /usr/pbi/freeradius-i386/etc/raddb/sites-enabled/ including configuration file /usr/pbi/freeradius-i386/etc/raddb/sites-enabled/default main { allow_core_dumps = no } including dictionary file /usr/pbi/freeradius-i386/etc/raddb/dictionary main { name = "radiusd" prefix = "/usr/pbi/freeradius-i386" localstatedir = "/var" sbindir = "/usr/pbi/freeradius-i386/sbin" logdir = "/var/log" run_dir = "/var/run" libdir = "/usr/pbi/freeradius-i386/lib/freeradius-2.1.12" radacctdir = "/var/log/radacct" hostname_lookups = yes max_request_time = 30 cleanup_delay = 5 max_requests = 1024 pidfile = "/var/run/radiusd.pid" checkrad = "/usr/pbi/freeradius-i386/sbin/checkrad" debug_level = 0 proxy_requests = yes log { stripped_names = yes auth = yes auth_badpass = yes auth_goodpass = yes msg_badpass = "" msg_goodpass = "" } security { max_attributes = 200 reject_delay = 1 status_server = no } } radiusd: #### Loading Realms and Home Servers #### radiusd: #### Loading Clients #### client system { ipaddr = 192.168.1.1 require_message_authenticator = no secret = "*******" shortname = "system" nastype = "other" } radiusd: #### Instantiating modules #### instantiate { Module: Linked to module rlm_exec Module: Instantiating module "exec" from file /usr/pbi/freeradius-i386/etc/raddb/modules/exec exec { wait = no input_pairs = "request" shell_escape = yes } Module: Linked to module rlm_expr Module: Instantiating module "expr" from file /usr/pbi/freeradius-i386/etc/raddb/modules/expr Module: Linked to module rlm_counter Module: Instantiating module "daily" from file /usr/pbi/freeradius-i386/etc/raddb/modules/counter counter daily { filename = "/var/log/radacct/timecounter/db.daily" key = "User-Name" reset = "daily" count-attribute = "Acct-Session-Time" counter-name = "Daily-Session-Time" check-name = "Max-Daily-Session" reply-name = "Session-Timeout" cache-size = 5000 } rlm_counter: Counter attribute Daily-Session-Time is number 11273 rlm_counter: Current Time: 1364223550 [2013-03-25 16:59:10], Next reset 1364248800 [2013-03-26 00:00:00] gdbm fatal: read error
-
gdbm fatal: read error
I saw this problem several times in other threads. In most cases it was a problem with the pfsense installation.
Can you try to do a fresh installation of pfsense and try the package again ?In general freeradius2 should start after you setup a listening interface.
-
Thanks for this great contribution.
I am currently testing pfsense 2.0.3 with freeradius2 in appliance only mode.
I think I've found a small bug, if a radius user is created with an email address .i.e "tom@example.com" and "Amount of traffic" is set, this user is unable to login.
I've added "@" to /usr/local/etc/raddb/scripts/datacounter_*.sh files on the line
USERNAME=`echo -n "$1" | sed 's/[^0-9a-zA-Z.:_-[color=red]@]/X/g'
I am able to log on with "tom@example.com", however traffic accounting completely stops, for all users not just ones with @ in their names, if I remove my changes from /usr/local/etc/raddb/scripts/datacounter_acct.sh, accounting works again but not for @ usernames.
Any help?
-
You probably need to modify that on both functions:
freeradius_datacounter_auth_resync() freeradius_datacounter_acct_resync()
Further you need to restart pfsense to recreate the .sh files.
Or you go to diagnostics –> command prompt:
require_once("/usr/local/pkg/freeradius.inc");
freeradius_datacounter_auth_resync();
freeradius_datacounter_acct_resync(); -
Thanks.
I had the same results, I even commented out the realms section where it denies @ logins, still nothing.