NEW Package: freeRADIUS 2.x
-
Okay.
I've tried several hours and could not get a usable .p12 from the GUI. By usable I mean, a .p12 with a password that I know. I tried "whatever" and every other password I used (just 5 in total).Then I tried a different approach, which is not what I initially wanted, but I can live with it. I downloaded the CA.crt (not the key!) and the .crt, .key of the client-certificate from pfSense's cert-manager (the one I tried to export as .p12 before). In bash I converted them into the .p12 format:
$ openssl pkcs12 -export -out client_cert_user1.p12 -inkey client_cert_user1.key -in client_cert_user1.crt -certfile myCA.crt
It asked for a password and created the .p12-cert. I could import it in OSX and iOS and authentication using the .p12-cert worked.
Now I found out, that I can login (at least from my iPhone) if I enter the username that the client-cert has as CN (I checked "Check Client Certificate CN" in the EAP settings). But the user does not have to exist …. I have an empty user-table in FreeRADIUS (file is really empty, too) and login works, as long as I enter the same username that the certificate's CN is... strange thing. The GUI says about "Check Client Certificate CN":
If this is enabled then the common name of the client certificate must match the username you set in FreeRADIUS => Users. (Default: unchecked)
I thought that the client-cert would be useless, if the user is not existing in FreeRADIUS. Am I missing something? Or misunderstanding? Or is the username irrelevant if I have the client-cert installed?
Maybe I'll find out soon, maybe not :-) I'll keep trying!
Kind regards,
Sascha -
Okay.
I've tried several hours and could not get a usable .p12 from the GUI. By usable I mean, a .p12 with a password that I know. I tried "whatever" and every other password I used (just 5 in total).Then I tried a different approach, which is not what I initially wanted, but I can live with it. I downloaded the CA.crt (not the key!) and the .crt, .key of the client-certificate from pfSense's cert-manager (the one I tried to export as .p12 before). In bash I converted them into the .p12 format:
$ openssl pkcs12 -export -out client_cert_user1.p12 -inkey client_cert_user1.key -in client_cert_user1.crt -certfile myCA.crt
It asked for a password and created the .p12-cert. I could import it in OSX and iOS and authentication using the .p12-cert worked.
I found the conde which generates the .p12 file:
https://github.com/bsdperimeter/pfsense/blob/master/usr/local/www/system_certmanager.phpif ($act == "p12") { if (!$a_cert[$id]) { pfSenseHeader("system_certmanager.php"); exit; } $exp_name = urlencode("{$a_cert[$id]['descr']}.p12"); $res_crt = openssl_x509_read(base64_decode($a_cert[$id]['crt'])); $res_key = openssl_pkey_get_private(array(0 => base64_decode($a_cert[$id]['prv']) , 1 => "")); $exp_data = ""; openssl_pkcs12_export($res_crt, $exp_data, $res_key, null); $exp_size = strlen($exp_data); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename={$exp_name}"); header("Content-Length: $exp_size"); echo $exp_data; exit; }
And this php command should create the file:
openssl_pkcs12_export($res_crt, $exp_data, $res_key, null);
A look at the manual shpws this:
http://php.net/manual/de/function.openssl-pkcs12-export.phpI do not see anything what could be wrong. Perhaps replace "null" with something else or try this as password.
Now I found out, that I can login (at least from my iPhone) if I enter the username that the client-cert has as CN (I checked "Check Client Certificate CN" in the EAP settings). But the user does not have to exist …. I have an empty user-table in FreeRADIUS (file is really empty, too) and login works, as long as I enter the same username that the certificate's CN is... strange thing. The GUI says about "Check Client Certificate CN":
If this is enabled then the common name of the client certificate must match the username you set in FreeRADIUS => Users. (Default: unchecked)
I thought that the client-cert would be useless, if the user is not existing in FreeRADIUS. Am I missing something? Or misunderstanding? Or is the username irrelevant if I have the client-cert installed?
Maybe I'll find out soon, maybe not :-) I'll keep trying!
Kind regards,
SaschaI found this on the net:
No, the only thing that check_cert_cn does is make sure that the CN in
the certificate matches the User-Name attribute in the RADIUS request.
It's basically just a sanity/security check on the request itself. It
does not go looking on other autz sources for you. It is up to you to
decide elsewhere (users file, SQL DB, LDAP) whether or not to allow that
user to authenticate. If you do nothing, the user will be allowed to
authenticate by default. If, for some reason, you decide you don't want
a user to be allowed to authenticate, you must specifically reject him.And here is the original eap.conf:
http://wiki.freeradius.org/Eap.conf/eaedb27b545ae8177cac6744ab09437c72594c1cFurther try with Disable weak EAP types and Default EAP Type = TLS
-
Guys i Hope you guys can help me .. im having a very funny thing happening. I have pfsense with freeradius 2 running. my mysql server is on same network and i can connect through the pfsense shell to the mysql server.
TThing is when i create a user it doesnt create it in the database (mysqlserver ) but just on the local one. I have tried looking on the logs and all i can see that doesnt look right is this .radiusd[62149]: rlm_sql (sql): Connected new DB handle, #0
Jan 14 20:40:22 radiusd[62149]: rlm_sql_mysql: Starting connect to MySQL server for #0
Jan 14 20:40:22 radiusd[62149]: rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
Jan 14 20:40:22 radiusd[62149]: rlm_sql (sql): Attempting to connect to radius@172.22.2.12:3306/radius
Jan 14 20:40:22 radiusd[62149]: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
Jan 14 20:40:22 radiusd[62149]: Core dumps are enabled.
Jan 14 20:40:20 php: /pkg_edit.php: The command '/usr/local/etc/rc.d/radiusd.sh stop' returned exit code '1', the output was 'radiusd not running?'does anybody have a idea please. Im running version 2.0.2 of software.
-
If you add a user on freeradius –> USERS tab this will add a user on local "users" file. Not less and not more.
If you want to use a mysqld server - then you must add users on your mysql database. This cannot be done from freeradius GUI.
The only thing you can do on freeradius is to configure the connection to an external mysql database.So the log is telling you what is happening:
Attempting to connect to radius@172.22.2.12:3306/radius
freeradius tries to connect to your mysql server on IP172.22.2.12 on port 3306 - bot probably something went wrong.
Wrong database user and password and/or wrong database.This could help you:
http://doc.pfsense.org/index.php/FreeRADIUS_2.x_package#MySQL -
So what you trying to tell me is that the users are local??? what would happen if i have a user called koos trying to connect ….lets say he is in the mysql database but not in the local one????
will the user still be able to auth??? -
Example:
You add a user in freeradius –> "Users" tab with username "testuser" and password "testpw".
Then your CaptivePortal authenticates against RADIUS then you are able to authenticate on CP with username "testuser" and "testpw"
This account info is stored on pfsense in /usr/local/etc/raddb/usersIf you want to store your users on a mysql database then you must add "testuser" and "testpw" on the mysql database in the correct table.
If CP now sends RADIUS an authentication request, then freeradius must know where there account information is stored.
So you have to tell freeradius to talk to a mysql server. To read data on a mysql database you need privileges - a username/password on mysql who is allowed to read/write on mysql.
This username/password is idependent from the credentials you enter on CP. The username/password for mysql must be entered on freeradius --> SQL.Did this answer your question ?
-
I thought the username and password info was saved on the mysql server and not on the local db…does anybody know of a way to sync local db with mysql db??? Thing is i need to be able to add koos with rate limit of 2000 and cap of 1000 to sql database ..and i need pfsense to manage it...if that makes any sense??
so if i have it correct at the moment if the user isnt in the local db then it goes and has a look on sql database???
-
As the night owl said, you need to add the user data to the mysql database. If you want to use a GUI for that you have to supply your own one. The entries in the user list are written to the mysql database, which could be done, but you would loose some freedom on how you define the tables. My setups usually have a few extra columns.
-
As the night owl said…
If you want to anger me then you call it "owl" - but the correct translation should be "hawk" - just kidding :-)
I took this name from an old game called "Betrayal at Krondor".@skoenman
Why do you want to use mysql ?
Do you have so many users ?
Do you need any special options that cannot be done bei the local "users" file ? -
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!