Re: Dynamic IP Allocation With Freeradius
Hi Ivan, As per your mail, I have modified the subnet mask to 255.255.255.255 and below is other config. /usr/local/etc/raddb/radiusd.conf ippool main_pool { # range-start,range-stop: The start and end ip # addresses for the ip pool range-start = 192.168.1.1 range-stop = 192.168.3.254 # netmask: The network mask used for the ip's netmask = 255.255.255.255 # cache-size: The gdbm cache size for the db # files. Should be equal to the number of ip's # available in the ip pool cache-size = 800 # session-db: The main db file used to allocate ip's to clients session-db = ${raddbdir}/db.ippool # ip-index: Helper db index file used in multilink ip-index = ${raddbdir}/db.ipindex # override: Will this ippool override a Framed-IP-Address already set override = no # maximum-timeout: If not zero specifies the maximum time in seconds an # entry may be active. Default: 0 maximum-timeout = 0 } # ANSI X9.9 token support. Not included by default. # $INCLUDE ${confdir}/x99.conf } main_pool is enabled in accounting & post-auth modules. I have kept nothing in USERS file right now. Just wanted to see if radius starts or not. I did run radiusd -XXX but give me below error. Sun Apr 13 06:04:17 2008 : Info: Starting - reading configuration files ... Sun Apr 13 06:04:17 2008 : Debug: reread_config: reading radiusd.conf Sun Apr 13 06:04:17 2008 : Debug: Config: including file: /usr/local/etc/raddb/clients.conf Sun Apr 13 06:04:17 2008 : Debug: Config: including file: /usr/local/etc/raddb/snmp.conf Sun Apr 13 06:04:17 2008 : Debug: Config: including file: /usr/local/etc/raddb/eap.conf Sun Apr 13 06:04:17 2008 : Debug: Config: including file: /usr/local/etc/raddb/sql.conf Sun Apr 13 06:04:17 2008 : Debug: main: prefix = "/usr/local" Sun Apr 13 06:04:17 2008 : Debug: main: localstatedir = "/usr/local/var" Sun Apr 13 06:04:17 2008 : Debug: main: logdir = "/usr/local/var/log/radius" Sun Apr 13 06:04:17 2008 : Debug: main: libdir = "/usr/local/lib" Sun Apr 13 06:04:17 2008 : Debug: main: radacctdir = "/usr/local/var/log/radius/radacct" Sun Apr 13 06:04:17 2008 : Debug: main: hostname_lookups = no Sun Apr 13 06:04:17 2008 : Debug: main: max_request_time = 30 Sun Apr 13 06:04:17 2008 : Debug: main: cleanup_delay = 5 Sun Apr 13 06:04:17 2008 : Debug: main: max_requests = 1024 Sun Apr 13 06:04:17 2008 : Debug: main: delete_blocked_requests = 0 Sun Apr 13 06:04:17 2008 : Debug: main: port = 1645 Sun Apr 13 06:04:17 2008 : Debug: main: allow_core_dumps = no Sun Apr 13 06:04:17 2008 : Debug: main: log_stripped_names = no Sun Apr 13 06:04:17 2008 : Debug: main: log_file = "/usr/local/var/log/radius/radius.log" Sun Apr 13 06:04:17 2008 : Debug: main: log_auth = no Sun Apr 13 06:04:17 2008 : Debug: main: log_auth_badpass = no Sun Apr 13 06:04:17 2008 : Debug: main: log_auth_goodpass = no Sun Apr 13 06:04:17 2008 : Debug: main: pidfile = "/usr/local/var/run/radiusd/radiusd.pid" Sun Apr 13 06:04:17 2008 : Debug: main: user = "(null)" Sun Apr 13 06:04:17 2008 : Debug: main: group = "(null)" Sun Apr 13 06:04:17 2008 : Debug: main: usercollide = no Sun Apr 13 06:04:17 2008 : Debug: main: lower_user = "no" Sun Apr 13 06:04:17 2008 : Debug: main: lower_pass = "no" Sun Apr 13 06:04:17 2008 : Debug: main: nospace_user = "no" Sun Apr 13 06:04:17 2008 : Debug: main: nospace_pass = "no" Sun Apr 13 06:04:17 2008 : Debug: main: checkrad = "/usr/local/sbin/checkrad" Sun Apr 13 06:04:17 2008 : Debug: main: proxy_requests = no Sun Apr 13 06:04:17 2008 : Debug: security: max_attributes = 200 Sun Apr 13 06:04:17 2008 : Debug: security: reject_delay = 1 Sun Apr 13 06:04:17 2008 : Debug: security: status_server = no Sun Apr 13 06:04:17 2008 : Debug: main: debug_level = 0 Sun Apr 13 06:04:17 2008 : Debug: read_config_files: reading dictionary Sun Apr 13 06:04:17 2008 : Debug: read_config_files: reading naslist Sun Apr 13 06:04:17 2008 : Info: Using deprecated naslist file. Support for this will go away soon. Sun Apr 13 06:04:17 2008 : Debug: read_config_files: reading clients Sun Apr 13 06:04:17 2008 : Debug: read_config_files: reading realms Sun Apr 13 06:04:17 2008 : Debug: radiusd: entering modules setup Sun Apr 13 06:04:17 2008 : Debug: Module: Library search path is /usr/local/lib Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded exec Sun Apr 13 06:04:17 2008 : Debug: exec: wait = yes Sun Apr 13 06:04:17 2008 : Debug: exec: program = "(null)" Sun Apr 13 06:04:17 2008 : Debug: exec: input_pairs = "request" Sun Apr 13 06:04:17 2008 : Debug: exec: output_pairs = "(null)" Sun Apr 13 06:04:17 2008 : Debug: exec: packet_type = "(null)" Sun Apr 13 06:04:17 2008 : Info: rlm_exec: Wait=yes but no output defined. Did you mean output=none? Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated exec (exec) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded expr Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated expr (expr) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded PAP Sun Apr 13 06:04:17 2008 : Debug: pap: encryption_scheme = "crypt" Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated pap (pap) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded CHAP Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated chap (chap) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded MS-CHAP Sun Apr 13 06:04:17 2008 : Debug: mschap: use_mppe = yes Sun Apr 13 06:04:17 2008 : Debug: mschap: require_encryption = no Sun Apr 13 06:04:17 2008 : Debug: mschap: require_strong = no Sun Apr 13 06:04:17 2008 : Debug: mschap: with_ntdomain_hack = no Sun Apr 13 06:04:17 2008 : Debug: mschap: passwd = "(null)" Sun Apr 13 06:04:17 2008 : Debug: mschap: authtype = "MS-CHAP" Sun Apr 13 06:04:17 2008 : Debug: mschap: ntlm_auth = "(null)" Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated mschap (mschap) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded System Sun Apr 13 06:04:17 2008 : Debug: unix: cache = no Sun Apr 13 06:04:17 2008 : Debug: unix: passwd = "(null)" Sun Apr 13 06:04:17 2008 : Debug: unix: shadow = "(null)" Sun Apr 13 06:04:17 2008 : Debug: unix: group = "(null)" Sun Apr 13 06:04:17 2008 : Debug: unix: radwtmp = "/usr/local/var/log/radius/radwtmp" Sun Apr 13 06:04:17 2008 : Debug: unix: usegroup = no Sun Apr 13 06:04:17 2008 : Debug: unix: cache_reload = 600 Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated unix (unix) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded eap Sun Apr 13 06:04:17 2008 : Debug: eap: default_eap_type = "md5" Sun Apr 13 06:04:17 2008 : Debug: eap: timer_expire = 60 Sun Apr 13 06:04:17 2008 : Debug: eap: ignore_unknown_eap_types = no Sun Apr 13 06:04:17 2008 : Debug: eap: cisco_accounting_username_bug = no Sun Apr 13 06:04:17 2008 : Debug: rlm_eap: Loaded and initialized type md5 Sun Apr 13 06:04:17 2008 : Debug: rlm_eap: Loaded and initialized type leap Sun Apr 13 06:04:17 2008 : Debug: gtc: challenge = "Password: " Sun Apr 13 06:04:17 2008 : Debug: gtc: auth_type = "PAP" Sun Apr 13 06:04:17 2008 : Debug: rlm_eap: Loaded and initialized type gtc Sun Apr 13 06:04:17 2008 : Debug: mschapv2: with_ntdomain_hack = no Sun Apr 13 06:04:17 2008 : Debug: rlm_eap: Loaded and initialized type mschapv2 Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated eap (eap) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded preprocess Sun Apr 13 06:04:17 2008 : Debug: preprocess: huntgroups = "/usr/local/etc/raddb/huntgroups" Sun Apr 13 06:04:17 2008 : Debug: preprocess: hints = "/usr/local/etc/raddb/hints" Sun Apr 13 06:04:17 2008 : Debug: preprocess: with_ascend_hack = no Sun Apr 13 06:04:17 2008 : Debug: preprocess: ascend_channels_per_line = 23 Sun Apr 13 06:04:17 2008 : Debug: preprocess: with_ntdomain_hack = no Sun Apr 13 06:04:17 2008 : Debug: preprocess: with_specialix_jetstream_hack = no Sun Apr 13 06:04:17 2008 : Debug: preprocess: with_cisco_vsa_hack = no Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated preprocess (preprocess) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded realm Sun Apr 13 06:04:17 2008 : Debug: realm: format = "suffix" Sun Apr 13 06:04:17 2008 : Debug: realm: delimiter = "@" Sun Apr 13 06:04:17 2008 : Debug: realm: ignore_default = no Sun Apr 13 06:04:17 2008 : Debug: realm: ignore_null = no Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated realm (suffix) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded files Sun Apr 13 06:04:17 2008 : Debug: files: usersfile = "/usr/local/etc/raddb/users" Sun Apr 13 06:04:17 2008 : Debug: files: acctusersfile = "/usr/local/etc/raddb/acct_users" Sun Apr 13 06:04:17 2008 : Debug: files: preproxy_usersfile = "/usr/local/etc/raddb/preproxy_users" Sun Apr 13 06:04:17 2008 : Debug: files: compat = "no" Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated files (files) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded SQL Sun Apr 13 06:04:17 2008 : Debug: sql: driver = "rlm_sql_mysql" Sun Apr 13 06:04:17 2008 : Debug: sql: server = "localhost" Sun Apr 13 06:04:17 2008 : Debug: sql: port = "" Sun Apr 13 06:04:17 2008 : Debug: sql: login = "root" Sun Apr 13 06:04:17 2008 : Debug: sql: password = "rootpass" Sun Apr 13 06:04:17 2008 : Debug: sql: radius_db = "radius" Sun Apr 13 06:04:17 2008 : Debug: sql: acct_table = "radacct" Sun Apr 13 06:04:17 2008 : Debug: sql: acct_table2 = "radacct" Sun Apr 13 06:04:17 2008 : Debug: sql: authcheck_table = "radcheck" Sun Apr 13 06:04:17 2008 : Debug: sql: authreply_table = "radreply" Sun Apr 13 06:04:17 2008 : Debug: sql: groupcheck_table = "radgroupcheck" Sun Apr 13 06:04:17 2008 : Debug: sql: groupreply_table = "radgroupreply" Sun Apr 13 06:04:17 2008 : Debug: sql: usergroup_table = "usergroup" Sun Apr 13 06:04:17 2008 : Debug: sql: nas_table = "nas" Sun Apr 13 06:04:17 2008 : Debug: sql: dict_table = "dictionary" Sun Apr 13 06:04:17 2008 : Debug: sql: sqltrace = no Sun Apr 13 06:04:17 2008 : Debug: sql: sqltracefile = "/usr/local/var/log/radius/sqltrace.sql" Sun Apr 13 06:04:17 2008 : Debug: sql: readclients = no Sun Apr 13 06:04:17 2008 : Debug: sql: deletestalesessions = yes Sun Apr 13 06:04:17 2008 : Debug: sql: num_sql_socks = 5 Sun Apr 13 06:04:17 2008 : Debug: sql: sql_user_name = "%{User-Name}" Sun Apr 13 06:04:17 2008 : Debug: sql: default_user_profile = "" Sun Apr 13 06:04:17 2008 : Debug: sql: query_on_not_found = no Sun Apr 13 06:04:17 2008 : Debug: sql: authorize_check_query = "SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = '%{SQL-User-Name}' ORDER BY id" Sun Apr 13 06:04:17 2008 : Debug: sql: authorize_reply_query = "SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = '%{SQL-User-Name}' ORDER BY id" Sun Apr 13 06:04:17 2008 : Debug: sql: authorize_group_check_query = "SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id" Sun Apr 13 06:04:17 2008 : Debug: sql: authorize_group_reply_query = "SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id" Sun Apr 13 06:04:17 2008 : Debug: sql: accounting_onoff_query = "UPDATE radacct SET AcctStopTime='%S', AcctSessionTime=unix_timestamp('%S') - unix_timestamp(AcctStartTime), AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}' WHERE AcctSessionTime=0 AND AcctStopTime=0 AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime <= '%S'" Sun Apr 13 06:04:17 2008 : Debug: sql: accounting_update_query = "UPDATE radacct ? SET FramedIPAddress = '%{Framed-IP-Address}', ? AcctSessionTime = '%{Acct-Session-Time}', ? AcctInputOctets = '%{Acct-Input-Octets}', ? AcctOutputOctets = '%{Acct-Output-Octets}' ? WHERE AcctSessionId = '%{Acct-Session-Id}' ? AND UserName = '%{SQL-User-Name}' ? AND NASIPAddress= '%{NAS-IP-Address}'" Sun Apr 13 06:04:17 2008 : Debug: sql: accounting_update_query_alt = "INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0')" Sun Apr 13 06:04:17 2008 : Debug: sql: accounting_start_query = "INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '0')" Sun Apr 13 06:04:19 2008 : Debug: sql: accounting_start_query_alt = "UPDATE radacct SET AcctStartTime = '%S', AcctStartDelay = '%{Acct-Delay-Time}', ConnectInfo_start = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'" Sun Apr 13 06:04:19 2008 : Debug: sql: accounting_stop_query = "UPDATE radacct SET AcctStopTime = '%S', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}', AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'" Sun Apr 13 06:04:19 2008 : Debug: sql: accounting_stop_query_alt = "INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}')" Sun Apr 13 06:04:19 2008 : Debug: sql: group_membership_query = "SELECT GroupName FROM usergroup WHERE UserName='%{SQL-User-Name}'" Sun Apr 13 06:04:19 2008 : Debug: sql: connect_failure_retry_delay = 60 Sun Apr 13 06:04:19 2008 : Debug: sql: simul_count_query = "" Sun Apr 13 06:04:19 2008 : Debug: sql: simul_verify_query = "SELECT RadAcctId, AcctSessionId, UserName, NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, FramedProtocol FROM radacct WHERE UserName='%{SQL-User-Name}' AND AcctStopTime = 0" Sun Apr 13 06:04:19 2008 : Debug: sql: postauth_table = "radpostauth" Sun Apr 13 06:04:19 2008 : Debug: sql: postauth_query = "INSERT into radpostauth (id, user, pass, reply, date) values ('', '%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW())" Sun Apr 13 06:04:19 2008 : Debug: sql: safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /" Sun Apr 13 06:04:19 2008 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked Sun Apr 13 06:04:19 2008 : Info: rlm_sql (sql): Attempting to connect to root@localhost:/radius Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): starting 0 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Attempting to connect rlm_sql_mysql #0 Sun Apr 13 06:04:19 2008 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Connected new DB handle, #0 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): starting 1 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Attempting to connect rlm_sql_mysql #1 Sun Apr 13 06:04:19 2008 : Info: rlm_sql_mysql: Starting connect to MySQL server for #1 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Connected new DB handle, #1 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): starting 2 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Attempting to connect rlm_sql_mysql #2 Sun Apr 13 06:04:19 2008 : Info: rlm_sql_mysql: Starting connect to MySQL server for #2 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Connected new DB handle, #2 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): starting 3 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Attempting to connect rlm_sql_mysql #3 Sun Apr 13 06:04:19 2008 : Info: rlm_sql_mysql: Starting connect to MySQL server for #3 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Connected new DB handle, #3 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): starting 4 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Attempting to connect rlm_sql_mysql #4 Sun Apr 13 06:04:19 2008 : Info: rlm_sql_mysql: Starting connect to MySQL server for #4 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Connected new DB handle, #4 Sun Apr 13 06:04:19 2008 : Debug: Module: Instantiated sql (sql) Sun Apr 13 06:04:19 2008 : Debug: Module: Loaded Acct-Unique-Session-Id Sun Apr 13 06:04:19 2008 : Debug: acct_unique: key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port" Sun Apr 13 06:04:19 2008 : Debug: Module: Instantiated acct_unique (acct_unique) Sun Apr 13 06:04:19 2008 : Debug: Module: Loaded detail Sun Apr 13 06:04:19 2008 : Debug: detail: detailfile = "/usr/local/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d" Sun Apr 13 06:04:19 2008 : Debug: detail: detailperm = 384 Sun Apr 13 06:04:19 2008 : Debug: detail: dirperm = 493 Sun Apr 13 06:04:19 2008 : Debug: detail: locking = no Sun Apr 13 06:04:19 2008 : Debug: Module: Instantiated detail (detail) Sun Apr 13 06:04:19 2008 : Debug: Module: Loaded radutmp Sun Apr 13 06:04:19 2008 : Debug: radutmp: filename = "/usr/local/var/log/radius/radutmp" Sun Apr 13 06:04:19 2008 : Debug: radutmp: username = "%{User-Name}" Sun Apr 13 06:04:19 2008 : Debug: radutmp: case_sensitive = yes Sun Apr 13 06:04:19 2008 : Debug: radutmp: check_with_nas = yes Sun Apr 13 06:04:19 2008 : Debug: radutmp: perm = 384 Sun Apr 13 06:04:19 2008 : Debug: radutmp: callerid = yes Sun Apr 13 06:04:19 2008 : Debug: Module: Instantiated radutmp (radutmp) Segmentation fault Any suggestions please. Regards, Joel ----- Original Message ----- From: Joel @ Gmail To: freeradius-users@lists.freeradius.org Sent: Saturday, April 12, 2008 7:11 PM Subject: Dynamic IP Allocation With Freeradius Dear Friends, Right now I have setup working of freeradius with mysql authentication. I have static & dynamic group created in mysql and all seems working. Currently static IPs are provided by radius with mysql backend. But dynamic IP is provided by Cisco Router. Cisco router is configured as PPPOE/PPPOA. Cisco does all authentication with freeradius. Now what I want is to provided Dynamic IPs with freeradius instead of Cisco. I have searched alot and tried few setting but that didnt worked. Is it possible to configure USERS file and have all dynamic users get dynamically using USERS file ? I checked but wasnt sucessful. Or a solution in mysql itself. For testing i had activated below config in radiusd.conf ippool main_pool { # range-start,range-stop: The start and end ip # addresses for the ip pool range-start = 192.168.1.1 range-stop = 192.168.3.254 # netmask: The network mask used for the ip's netmask = 255.255.255.0 # cache-size: The gdbm cache size for the db # files. Should be equal to the number of ip's # available in the ip pool cache-size = 800 # session-db: The main db file used to allocate ip's to clients session-db = ${raddbdir}/db.ippool # ip-index: Helper db index file used in multilink ip-index = ${raddbdir}/db.ipindex # override: Will this ippool override a Framed-IP-Address already set override = no # maximum-timeout: If not zero specifies the maximum time in seconds an # entry may be active. Default: 0 maximum-timeout = 0 } main_pool in accounting & post-auth modules. doing this and starting the radius gives me segmentation error. Any suggestion please ? Regards, Joel
http://www.freeradius.org/radiusd/doc/bugs Ivan Kalik Kalik Informatika ISP Dana 13/4/2008, "Joel @ Gmail" <joelsolanki@gmail.com> piše:
Hi Ivan,
As per your mail, I have modified the subnet mask to 255.255.255.255 and below is other config.
/usr/local/etc/raddb/radiusd.conf
ippool main_pool {
# range-start,range-stop: The start and end ip # addresses for the ip pool range-start = 192.168.1.1 range-stop = 192.168.3.254
# netmask: The network mask used for the ip's netmask = 255.255.255.255
# cache-size: The gdbm cache size for the db # files. Should be equal to the number of ip's # available in the ip pool cache-size = 800
# session-db: The main db file used to allocate ip's to clients session-db = ${raddbdir}/db.ippool
# ip-index: Helper db index file used in multilink ip-index = ${raddbdir}/db.ipindex
# override: Will this ippool override a Framed-IP-Address already set override = no
# maximum-timeout: If not zero specifies the maximum time in seconds an # entry may be active. Default: 0 maximum-timeout = 0 }
# ANSI X9.9 token support. Not included by default. # $INCLUDE ${confdir}/x99.conf
}
main_pool is enabled in accounting & post-auth modules. I have kept nothing in USERS file right now. Just wanted to see if radius starts or not. I did run radiusd -XXX but give me below error.
Sun Apr 13 06:04:17 2008 : Info: Starting - reading configuration files .... Sun Apr 13 06:04:17 2008 : Debug: reread_config: reading radiusd.conf Sun Apr 13 06:04:17 2008 : Debug: Config: including file: /usr/local/etc/raddb/clients.conf Sun Apr 13 06:04:17 2008 : Debug: Config: including file: /usr/local/etc/raddb/snmp.conf Sun Apr 13 06:04:17 2008 : Debug: Config: including file: /usr/local/etc/raddb/eap.conf Sun Apr 13 06:04:17 2008 : Debug: Config: including file: /usr/local/etc/raddb/sql.conf Sun Apr 13 06:04:17 2008 : Debug: main: prefix = "/usr/local" Sun Apr 13 06:04:17 2008 : Debug: main: localstatedir = "/usr/local/var" Sun Apr 13 06:04:17 2008 : Debug: main: logdir = "/usr/local/var/log/radius" Sun Apr 13 06:04:17 2008 : Debug: main: libdir = "/usr/local/lib" Sun Apr 13 06:04:17 2008 : Debug: main: radacctdir = "/usr/local/var/log/radius/radacct" Sun Apr 13 06:04:17 2008 : Debug: main: hostname_lookups = no Sun Apr 13 06:04:17 2008 : Debug: main: max_request_time = 30 Sun Apr 13 06:04:17 2008 : Debug: main: cleanup_delay = 5 Sun Apr 13 06:04:17 2008 : Debug: main: max_requests = 1024 Sun Apr 13 06:04:17 2008 : Debug: main: delete_blocked_requests = 0 Sun Apr 13 06:04:17 2008 : Debug: main: port = 1645 Sun Apr 13 06:04:17 2008 : Debug: main: allow_core_dumps = no Sun Apr 13 06:04:17 2008 : Debug: main: log_stripped_names = no Sun Apr 13 06:04:17 2008 : Debug: main: log_file = "/usr/local/var/log/radius/radius.log" Sun Apr 13 06:04:17 2008 : Debug: main: log_auth = no Sun Apr 13 06:04:17 2008 : Debug: main: log_auth_badpass = no Sun Apr 13 06:04:17 2008 : Debug: main: log_auth_goodpass = no Sun Apr 13 06:04:17 2008 : Debug: main: pidfile = "/usr/local/var/run/radiusd/radiusd.pid" Sun Apr 13 06:04:17 2008 : Debug: main: user = "(null)" Sun Apr 13 06:04:17 2008 : Debug: main: group = "(null)" Sun Apr 13 06:04:17 2008 : Debug: main: usercollide = no Sun Apr 13 06:04:17 2008 : Debug: main: lower_user = "no" Sun Apr 13 06:04:17 2008 : Debug: main: lower_pass = "no" Sun Apr 13 06:04:17 2008 : Debug: main: nospace_user = "no" Sun Apr 13 06:04:17 2008 : Debug: main: nospace_pass = "no" Sun Apr 13 06:04:17 2008 : Debug: main: checkrad = "/usr/local/sbin/checkrad" Sun Apr 13 06:04:17 2008 : Debug: main: proxy_requests = no Sun Apr 13 06:04:17 2008 : Debug: security: max_attributes = 200 Sun Apr 13 06:04:17 2008 : Debug: security: reject_delay = 1 Sun Apr 13 06:04:17 2008 : Debug: security: status_server = no Sun Apr 13 06:04:17 2008 : Debug: main: debug_level = 0 Sun Apr 13 06:04:17 2008 : Debug: read_config_files: reading dictionary Sun Apr 13 06:04:17 2008 : Debug: read_config_files: reading naslist Sun Apr 13 06:04:17 2008 : Info: Using deprecated naslist file. Support for this will go away soon. Sun Apr 13 06:04:17 2008 : Debug: read_config_files: reading clients Sun Apr 13 06:04:17 2008 : Debug: read_config_files: reading realms Sun Apr 13 06:04:17 2008 : Debug: radiusd: entering modules setup Sun Apr 13 06:04:17 2008 : Debug: Module: Library search path is /usr/local/lib Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded exec Sun Apr 13 06:04:17 2008 : Debug: exec: wait = yes Sun Apr 13 06:04:17 2008 : Debug: exec: program = "(null)" Sun Apr 13 06:04:17 2008 : Debug: exec: input_pairs = "request" Sun Apr 13 06:04:17 2008 : Debug: exec: output_pairs = "(null)" Sun Apr 13 06:04:17 2008 : Debug: exec: packet_type = "(null)" Sun Apr 13 06:04:17 2008 : Info: rlm_exec: Wait=yes but no output defined. Did you mean output=none? Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated exec (exec) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded expr Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated expr (expr) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded PAP Sun Apr 13 06:04:17 2008 : Debug: pap: encryption_scheme = "crypt" Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated pap (pap) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded CHAP Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated chap (chap) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded MS-CHAP Sun Apr 13 06:04:17 2008 : Debug: mschap: use_mppe = yes Sun Apr 13 06:04:17 2008 : Debug: mschap: require_encryption = no Sun Apr 13 06:04:17 2008 : Debug: mschap: require_strong = no Sun Apr 13 06:04:17 2008 : Debug: mschap: with_ntdomain_hack = no Sun Apr 13 06:04:17 2008 : Debug: mschap: passwd = "(null)" Sun Apr 13 06:04:17 2008 : Debug: mschap: authtype = "MS-CHAP" Sun Apr 13 06:04:17 2008 : Debug: mschap: ntlm_auth = "(null)" Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated mschap (mschap) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded System Sun Apr 13 06:04:17 2008 : Debug: unix: cache = no Sun Apr 13 06:04:17 2008 : Debug: unix: passwd = "(null)" Sun Apr 13 06:04:17 2008 : Debug: unix: shadow = "(null)" Sun Apr 13 06:04:17 2008 : Debug: unix: group = "(null)" Sun Apr 13 06:04:17 2008 : Debug: unix: radwtmp = "/usr/local/var/log/radius/radwtmp" Sun Apr 13 06:04:17 2008 : Debug: unix: usegroup = no Sun Apr 13 06:04:17 2008 : Debug: unix: cache_reload = 600 Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated unix (unix) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded eap Sun Apr 13 06:04:17 2008 : Debug: eap: default_eap_type = "md5" Sun Apr 13 06:04:17 2008 : Debug: eap: timer_expire = 60 Sun Apr 13 06:04:17 2008 : Debug: eap: ignore_unknown_eap_types = no Sun Apr 13 06:04:17 2008 : Debug: eap: cisco_accounting_username_bug = no Sun Apr 13 06:04:17 2008 : Debug: rlm_eap: Loaded and initialized type md5 Sun Apr 13 06:04:17 2008 : Debug: rlm_eap: Loaded and initialized type leap Sun Apr 13 06:04:17 2008 : Debug: gtc: challenge = "Password: " Sun Apr 13 06:04:17 2008 : Debug: gtc: auth_type = "PAP" Sun Apr 13 06:04:17 2008 : Debug: rlm_eap: Loaded and initialized type gtc Sun Apr 13 06:04:17 2008 : Debug: mschapv2: with_ntdomain_hack = no Sun Apr 13 06:04:17 2008 : Debug: rlm_eap: Loaded and initialized type mschapv2 Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated eap (eap) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded preprocess Sun Apr 13 06:04:17 2008 : Debug: preprocess: huntgroups = "/usr/local/etc/raddb/huntgroups" Sun Apr 13 06:04:17 2008 : Debug: preprocess: hints = "/usr/local/etc/raddb/hints" Sun Apr 13 06:04:17 2008 : Debug: preprocess: with_ascend_hack = no Sun Apr 13 06:04:17 2008 : Debug: preprocess: ascend_channels_per_line = 23 Sun Apr 13 06:04:17 2008 : Debug: preprocess: with_ntdomain_hack = no Sun Apr 13 06:04:17 2008 : Debug: preprocess: with_specialix_jetstream_hack = no Sun Apr 13 06:04:17 2008 : Debug: preprocess: with_cisco_vsa_hack = no Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated preprocess (preprocess) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded realm Sun Apr 13 06:04:17 2008 : Debug: realm: format = "suffix" Sun Apr 13 06:04:17 2008 : Debug: realm: delimiter = "@" Sun Apr 13 06:04:17 2008 : Debug: realm: ignore_default = no Sun Apr 13 06:04:17 2008 : Debug: realm: ignore_null = no Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated realm (suffix) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded files Sun Apr 13 06:04:17 2008 : Debug: files: usersfile = "/usr/local/etc/raddb/users" Sun Apr 13 06:04:17 2008 : Debug: files: acctusersfile = "/usr/local/etc/raddb/acct_users" Sun Apr 13 06:04:17 2008 : Debug: files: preproxy_usersfile = "/usr/local/etc/raddb/preproxy_users" Sun Apr 13 06:04:17 2008 : Debug: files: compat = "no" Sun Apr 13 06:04:17 2008 : Debug: Module: Instantiated files (files) Sun Apr 13 06:04:17 2008 : Debug: Module: Loaded SQL Sun Apr 13 06:04:17 2008 : Debug: sql: driver = "rlm_sql_mysql" Sun Apr 13 06:04:17 2008 : Debug: sql: server = "localhost" Sun Apr 13 06:04:17 2008 : Debug: sql: port = "" Sun Apr 13 06:04:17 2008 : Debug: sql: login = "root" Sun Apr 13 06:04:17 2008 : Debug: sql: password = "rootpass" Sun Apr 13 06:04:17 2008 : Debug: sql: radius_db = "radius" Sun Apr 13 06:04:17 2008 : Debug: sql: acct_table = "radacct" Sun Apr 13 06:04:17 2008 : Debug: sql: acct_table2 = "radacct" Sun Apr 13 06:04:17 2008 : Debug: sql: authcheck_table = "radcheck" Sun Apr 13 06:04:17 2008 : Debug: sql: authreply_table = "radreply" Sun Apr 13 06:04:17 2008 : Debug: sql: groupcheck_table = "radgroupcheck" Sun Apr 13 06:04:17 2008 : Debug: sql: groupreply_table = "radgroupreply" Sun Apr 13 06:04:17 2008 : Debug: sql: usergroup_table = "usergroup" Sun Apr 13 06:04:17 2008 : Debug: sql: nas_table = "nas" Sun Apr 13 06:04:17 2008 : Debug: sql: dict_table = "dictionary" Sun Apr 13 06:04:17 2008 : Debug: sql: sqltrace = no Sun Apr 13 06:04:17 2008 : Debug: sql: sqltracefile = "/usr/local/var/log/radius/sqltrace.sql" Sun Apr 13 06:04:17 2008 : Debug: sql: readclients = no Sun Apr 13 06:04:17 2008 : Debug: sql: deletestalesessions = yes Sun Apr 13 06:04:17 2008 : Debug: sql: num_sql_socks = 5 Sun Apr 13 06:04:17 2008 : Debug: sql: sql_user_name = "%{User-Name}" Sun Apr 13 06:04:17 2008 : Debug: sql: default_user_profile = "" Sun Apr 13 06:04:17 2008 : Debug: sql: query_on_not_found = no Sun Apr 13 06:04:17 2008 : Debug: sql: authorize_check_query = "SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = '%{SQL-User-Name}' ORDER BY id" Sun Apr 13 06:04:17 2008 : Debug: sql: authorize_reply_query = "SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = '%{SQL-User-Name}' ORDER BY id" Sun Apr 13 06:04:17 2008 : Debug: sql: authorize_group_check_query = "SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id" Sun Apr 13 06:04:17 2008 : Debug: sql: authorize_group_reply_query = "SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id" Sun Apr 13 06:04:17 2008 : Debug: sql: accounting_onoff_query = "UPDATE radacct SET AcctStopTime='%S', AcctSessionTime=unix_timestamp('%S') - unix_timestamp(AcctStartTime), AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}' WHERE AcctSessionTime=0 AND AcctStopTime=0 AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime <= '%S'" Sun Apr 13 06:04:17 2008 : Debug: sql: accounting_update_query = "UPDATE radacct ? SET FramedIPAddress = '%{Framed-IP-Address}', ? AcctSessionTime = '%{Acct-Session-Time}', ? AcctInputOctets = '%{Acct-Input-Octets}', ? AcctOutputOctets = '%{Acct-Output-Octets}' ? WHERE AcctSessionId = '%{Acct-Session-Id}' ? AND UserName = '%{SQL-User-Name}' ? AND NASIPAddress= '%{NAS-IP-Address}'" Sun Apr 13 06:04:17 2008 : Debug: sql: accounting_update_query_alt = "INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0')" Sun Apr 13 06:04:17 2008 : Debug: sql: accounting_start_query = "INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '0')" Sun Apr 13 06:04:19 2008 : Debug: sql: accounting_start_query_alt = "UPDATE radacct SET AcctStartTime = '%S', AcctStartDelay = '%{Acct-Delay-Time}', ConnectInfo_start = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'" Sun Apr 13 06:04:19 2008 : Debug: sql: accounting_stop_query = "UPDATE radacct SET AcctStopTime = '%S', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}', AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'" Sun Apr 13 06:04:19 2008 : Debug: sql: accounting_stop_query_alt = "INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}')" Sun Apr 13 06:04:19 2008 : Debug: sql: group_membership_query = "SELECT GroupName FROM usergroup WHERE UserName='%{SQL-User-Name}'" Sun Apr 13 06:04:19 2008 : Debug: sql: connect_failure_retry_delay = 60 Sun Apr 13 06:04:19 2008 : Debug: sql: simul_count_query = "" Sun Apr 13 06:04:19 2008 : Debug: sql: simul_verify_query = "SELECT RadAcctId, AcctSessionId, UserName, NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, FramedProtocol FROM radacct WHERE UserName='%{SQL-User-Name}' AND AcctStopTime = 0" Sun Apr 13 06:04:19 2008 : Debug: sql: postauth_table = "radpostauth" Sun Apr 13 06:04:19 2008 : Debug: sql: postauth_query = "INSERT into radpostauth (id, user, pass, reply, date) values ('', '%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW())" Sun Apr 13 06:04:19 2008 : Debug: sql: safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /" Sun Apr 13 06:04:19 2008 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked Sun Apr 13 06:04:19 2008 : Info: rlm_sql (sql): Attempting to connect to root@localhost:/radius Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): starting 0 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Attempting to connect rlm_sql_mysql #0 Sun Apr 13 06:04:19 2008 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Connected new DB handle, #0 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): starting 1 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Attempting to connect rlm_sql_mysql #1 Sun Apr 13 06:04:19 2008 : Info: rlm_sql_mysql: Starting connect to MySQL server for #1 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Connected new DB handle, #1 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): starting 2 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Attempting to connect rlm_sql_mysql #2 Sun Apr 13 06:04:19 2008 : Info: rlm_sql_mysql: Starting connect to MySQL server for #2 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Connected new DB handle, #2 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): starting 3 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Attempting to connect rlm_sql_mysql #3 Sun Apr 13 06:04:19 2008 : Info: rlm_sql_mysql: Starting connect to MySQL server for #3 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Connected new DB handle, #3 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): starting 4 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Attempting to connect rlm_sql_mysql #4 Sun Apr 13 06:04:19 2008 : Info: rlm_sql_mysql: Starting connect to MySQL server for #4 Sun Apr 13 06:04:19 2008 : Debug: rlm_sql (sql): Connected new DB handle, #4 Sun Apr 13 06:04:19 2008 : Debug: Module: Instantiated sql (sql) Sun Apr 13 06:04:19 2008 : Debug: Module: Loaded Acct-Unique-Session-Id Sun Apr 13 06:04:19 2008 : Debug: acct_unique: key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port" Sun Apr 13 06:04:19 2008 : Debug: Module: Instantiated acct_unique (acct_unique) Sun Apr 13 06:04:19 2008 : Debug: Module: Loaded detail Sun Apr 13 06:04:19 2008 : Debug: detail: detailfile = "/usr/local/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d" Sun Apr 13 06:04:19 2008 : Debug: detail: detailperm = 384 Sun Apr 13 06:04:19 2008 : Debug: detail: dirperm = 493 Sun Apr 13 06:04:19 2008 : Debug: detail: locking = no Sun Apr 13 06:04:19 2008 : Debug: Module: Instantiated detail (detail) Sun Apr 13 06:04:19 2008 : Debug: Module: Loaded radutmp Sun Apr 13 06:04:19 2008 : Debug: radutmp: filename = "/usr/local/var/log/radius/radutmp" Sun Apr 13 06:04:19 2008 : Debug: radutmp: username = "%{User-Name}" Sun Apr 13 06:04:19 2008 : Debug: radutmp: case_sensitive = yes Sun Apr 13 06:04:19 2008 : Debug: radutmp: check_with_nas = yes Sun Apr 13 06:04:19 2008 : Debug: radutmp: perm = 384 Sun Apr 13 06:04:19 2008 : Debug: radutmp: callerid = yes Sun Apr 13 06:04:19 2008 : Debug: Module: Instantiated radutmp (radutmp) Segmentation fault
Any suggestions please.
Regards, Joel ----- Original Message ----- From: Joel @ Gmail To: freeradius-users@lists.freeradius.org Sent: Saturday, April 12, 2008 7:11 PM Subject: Dynamic IP Allocation With Freeradius
Dear Friends,
Right now I have setup working of freeradius with mysql authentication. I have static & dynamic group created in mysql and all seems working. Currently static IPs are provided by radius with mysql backend. But dynamic IP is provided by Cisco Router. Cisco router is configured as PPPOE/PPPOA. Cisco does all authentication with freeradius.
Now what I want is to provided Dynamic IPs with freeradius instead of Cisco. I have searched alot and tried few setting but that didnt worked. Is it possible to configure USERS file and have all dynamic users get dynamically using USERS file ? I checked but wasnt sucessful. Or a solution in mysql itself.
For testing i had activated below config in radiusd.conf
ippool main_pool {
# range-start,range-stop: The start and end ip # addresses for the ip pool range-start = 192.168.1.1 range-stop = 192.168.3.254
# netmask: The network mask used for the ip's netmask = 255.255.255.0
# cache-size: The gdbm cache size for the db # files. Should be equal to the number of ip's # available in the ip pool cache-size = 800
# session-db: The main db file used to allocate ip's to clients session-db = ${raddbdir}/db.ippool
# ip-index: Helper db index file used in multilink ip-index = ${raddbdir}/db.ipindex
# override: Will this ippool override a Framed-IP-Address already set override = no
# maximum-timeout: If not zero specifies the maximum time in seconds an # entry may be active. Default: 0 maximum-timeout = 0 }
main_pool in accounting & post-auth modules.
doing this and starting the radius gives me segmentation error.
Any suggestion please ?
Regards, Joel
Hi,
/usr/local/etc/raddb/radiusd.conf
ippool main_pool {
# range-start,range-stop: The start and end ip # addresses for the ip pool range-start = 192.168.1.1 range-stop = 192.168.3.254
# netmask: The network mask used for the ip's netmask = 255.255.255.255
forgive my foolish networking but why that netmask? some method used to try to isolate clients from each other? the correct netmask for that range would be 255.255.252.0 though that would also cover the 192.168.0.0/24 range too. you need to ensure and take care that you choose correct aligned regions for IP addresses.
Sun Apr 13 06:04:19 2008 : Debug: Module: Loaded radutmp Sun Apr 13 06:04:19 2008 : Debug: radutmp: filename = "/usr/local/var/log/radius/radutmp" Sun Apr 13 06:04:19 2008 : Debug: radutmp: username = "%{User-Name}" Sun Apr 13 06:04:19 2008 : Debug: radutmp: case_sensitive = yes Sun Apr 13 06:04:19 2008 : Debug: radutmp: check_with_nas = yes Sun Apr 13 06:04:19 2008 : Debug: radutmp: perm = 384 Sun Apr 13 06:04:19 2008 : Debug: radutmp: callerid = yes Sun Apr 13 06:04:19 2008 : Debug: Module: Instantiated radutmp (radutmp) Segmentation fault
what are the permissions of that file and directory? (eg ls -l /usr/local/var/log/radius ) and whats the next module in your config file? otherwise, docs/bugs compile it with debug support etc. alan
A.L.M.Buxey@lboro.ac.uk wrote:
Hi,
/usr/local/etc/raddb/radiusd.conf
ippool main_pool {
# range-start,range-stop: The start and end ip # addresses for the ip pool range-start = 192.168.1.1 range-stop = 192.168.3.254
# netmask: The network mask used for the ip's netmask = 255.255.255.255
forgive my foolish networking but why that netmask? some method used to try to isolate clients from each other?
That would be the magical mythical network of one mask I was talking about at NW. It's valid for any range of IPs and allows communication only via the default root.
the correct netmask for that range would be 255.255.252.0 though that would also cover the 192.168.0.0/24 range too. you need to ensure and take care that you choose correct aligned regions for IP addresses.
Sun Apr 13 06:04:19 2008 : Debug: Module: Loaded radutmp Sun Apr 13 06:04:19 2008 : Debug: radutmp: filename = "/usr/local/var/log/radius/radutmp" Sun Apr 13 06:04:19 2008 : Debug: radutmp: username = "%{User-Name}" Sun Apr 13 06:04:19 2008 : Debug: radutmp: case_sensitive = yes Sun Apr 13 06:04:19 2008 : Debug: radutmp: check_with_nas = yes Sun Apr 13 06:04:19 2008 : Debug: radutmp: perm = 384 Sun Apr 13 06:04:19 2008 : Debug: radutmp: callerid = yes Sun Apr 13 06:04:19 2008 : Debug: Module: Instantiated radutmp (radutmp) Segmentation fault
what are the permissions of that file and directory? (eg ls -l /usr/local/var/log/radius ) and whats the next module in your config file?
otherwise, docs/bugs compile it with debug support etc.
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi,
That would be the magical mythical network of one mask I was talking about at NW. It's valid for any range of IPs and allows communication only via the default root.
but it only works if all your clients on the L2 layer are dumb. any student worth their name would run eg IPX or decnet which would then allow them to communicate. only TCP/IP is that dumb ;-) alan
participants (4)
-
A.L.M.Buxey@lboro.ac.uk -
Arran Cudbard-Bell -
Ivan Kalik -
Joel @ Gmail