It should be possible, just also remember to change the settings on FreeRADIUS to point to the external DB instead of the local one.
The only functionality which you will not have will be the Websocket logfile viewer and debug viewer for FreeRADIUS since FreeRADIUS will not be running on the machine that has the web server etc....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll let you know the result as soon as I finish implementing it. In the meantime I am installing everything (again) in a single production machine because when installing in different ones (MySQL + FreeRADIUS and RADIUSDesk + Centralised Captive Portal) I get a weird "Double check NAS Secret" error... (and YES... I've double tripled checked the NAS secrets...)
Cheers,
Fernando
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a NAS defined also in the clients file of FreeRADIUS. Either remove that NAS or ensure it is the same as the one (in all settings) defined in the DB.
Kind regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Any hints where I should be looking for what I am doing wrong?
Cheers,
Fernando
PS: The full log files are bellow:
system@HOTSPOTRADIUS:/usr/local/etc/raddb$sudoradiusd-XFreeRADIUSVersion2.2.0,forhosti686-pc-linux-gnu,builtonOct222013at00:43:27Copyright(C)1999-2012TheFreeRADIUSserverprojectandcontributors.ThereisNOwarranty;notevenforMERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.YoumayredistributecopiesofFreeRADIUSunderthetermsoftheGNUGeneralPublicLicensev2.Starting-readingconfigurationfiles...includingconfigurationfile/usr/local/etc/raddb/radiusd.confincludingconfigurationfile/usr/local/etc/raddb/proxy.confincludingconfigurationfile/usr/local/etc/raddb/clients.confincludingfilesindirectory/usr/local/etc/raddb/modules/includingconfigurationfile/usr/local/etc/raddb/modules/sql_logincludingconfigurationfile/usr/local/etc/raddb/modules/radutmpincludingconfigurationfile/usr/local/etc/raddb/modules/otpincludingconfigurationfile/usr/local/etc/raddb/modules/realmincludingconfigurationfile/usr/local/etc/raddb/modules/acct_uniqueincludingconfigurationfile/usr/local/etc/raddb/modules/expirationincludingconfigurationfile/usr/local/etc/raddb/modules/ntlm_authincludingconfigurationfile/usr/local/etc/raddb/modules/smbpasswdincludingconfigurationfile/usr/local/etc/raddb/modules/logintimeincludingconfigurationfile/usr/local/etc/raddb/modules/counterincludingconfigurationfile/usr/local/etc/raddb/modules/dynamic_clientsincludingconfigurationfile/usr/local/etc/raddb/modules/sqlcounter_expire_on_loginincludingconfigurationfile/usr/local/etc/raddb/modules/policyincludingconfigurationfile/usr/local/etc/raddb/modules/echoincludingconfigurationfile/usr/local/etc/raddb/modules/papincludingconfigurationfile/usr/local/etc/raddb/modules/cuiincludingconfigurationfile/usr/local/etc/raddb/modules/replicateincludingconfigurationfile/usr/local/etc/raddb/modules/krb5includingconfigurationfile/usr/local/etc/raddb/modules/ldapincludingconfigurationfile/usr/local/etc/raddb/modules/rediswhoincludingconfigurationfile/usr/local/etc/raddb/modules/inner-eapincludingconfigurationfile/usr/local/etc/raddb/modules/checkvalincludingconfigurationfile/usr/local/etc/raddb/modules/attr_filterincludingconfigurationfile/usr/local/etc/raddb/modules/chapincludingconfigurationfile/usr/local/etc/raddb/modules/ippoolincludingconfigurationfile/usr/local/etc/raddb/modules/pl_check_usage_dataincludingconfigurationfile/usr/local/etc/raddb/modules/unixincludingconfigurationfile/usr/local/etc/raddb/modules/linelogincludingconfigurationfile/usr/local/etc/raddb/modules/wimaxincludingconfigurationfile/usr/local/etc/raddb/modules/redisincludingconfigurationfile/usr/local/etc/raddb/modules/preprocessincludingconfigurationfile/usr/local/etc/raddb/modules/mschapincludingconfigurationfile/usr/local/etc/raddb/modules/attr_rewriteincludingconfigurationfile/usr/local/etc/raddb/modules/sohincludingconfigurationfile/usr/local/etc/raddb/modules/pl_check_activationincludingconfigurationfile/usr/local/etc/raddb/modules/mac2ipincludingconfigurationfile/usr/local/etc/raddb/modules/exprincludingconfigurationfile/usr/local/etc/raddb/modules/sradutmpincludingconfigurationfile/usr/local/etc/raddb/modules/passwdincludingconfigurationfile/usr/local/etc/raddb/modules/alwaysincludingconfigurationfile/usr/local/etc/raddb/modules/pl_check_usage_timeincludingconfigurationfile/usr/local/etc/raddb/modules/execincludingconfigurationfile/usr/local/etc/raddb/modules/filesincludingconfigurationfile/usr/local/etc/raddb/modules/rawincludingconfigurationfile/usr/local/etc/raddb/modules/pamincludingconfigurationfile/usr/local/etc/raddb/modules/pl_reset_time_for_dataincludingconfigurationfile/usr/local/etc/raddb/modules/smsotpincludingconfigurationfile/usr/local/etc/raddb/modules/detailincludingconfigurationfile/usr/local/etc/raddb/modules/digestincludingconfigurationfile/usr/local/etc/raddb/modules/mac2vlanincludingconfigurationfile/usr/local/etc/raddb/modules/pl_check_usageincludingconfigurationfile/usr/local/etc/raddb/modules/pl_reset_timeincludingconfigurationfile/usr/local/etc/raddb/modules/pl_reset_time_for_timeincludingconfigurationfile/usr/local/etc/raddb/modules/opendirectoryincludingconfigurationfile/usr/local/etc/raddb/modules/etc_groupincludingconfigurationfile/usr/local/etc/raddb/modules/perlincludingconfigurationfile/usr/local/etc/raddb/modules/detail.example.comincludingconfigurationfile/usr/local/etc/raddb/modules/detail.logincludingconfigurationfile/usr/local/etc/raddb/eap.confincludingconfigurationfile/usr/local/etc/raddb/sql.confincludingconfigurationfile/usr/local/etc/raddb/sql/mysql/dialup.confincludingconfigurationfile/usr/local/etc/raddb/policy.confincludingfilesindirectory/usr/local/etc/raddb/sites-enabled/includingconfigurationfile/usr/local/etc/raddb/sites-enabled/inner-tunnelincludingconfigurationfile/usr/local/etc/raddb/sites-enabled/dynamic-clientsincludingconfigurationfile/usr/local/etc/raddb/sites-enabled/control-socketincludingconfigurationfile/usr/local/etc/raddb/sites-enabled/defaultmain{allow_core_dumps=no}includingdictionaryfile/usr/local/etc/raddb/dictionarymain{name="radiusd"prefix="/usr/local"localstatedir="/usr/local/var"sbindir="/usr/local/sbin"logdir="/usr/local/var/log/radius"run_dir="/usr/local/var/run/radiusd"libdir="/usr/local/lib"radacctdir="/usr/local/var/log/radius/radacct"hostname_lookups=nomax_request_time=30cleanup_delay=5max_requests=1024pidfile="/usr/local/var/run/radiusd/radiusd.pid"checkrad="/usr/local/sbin/checkrad"debug_level=0proxy_requests=yeslog{stripped_names=noauth=noauth_badpass=noauth_goodpass=no}security{max_attributes=200reject_delay=1status_server=yes}}radiusd:####LoadingRealmsandHomeServers####proxyserver{retry_delay=5retry_count=3default_fallback=nodead_time=120wake_all_if_all_dead=no}home_serverlocalhost{ipaddr=127.0.0.1port=1812type="auth"secret="testing123"response_window=20max_outstanding=65536require_message_authenticator=yeszombie_period=40status_check="status-server"ping_interval=30check_interval=30num_answers_to_alive=3num_pings_to_alive=3revive_interval=120status_check_timeout=4coa{irt=2mrt=16mrc=5mrd=30}}home_server_poolmy_auth_failover{type=fail-overhome_server=localhost}realmexample.com{auth_pool=my_auth_failover}realmLOCAL{}radiusd:####LoadingClients####clientdymamic{ipaddr=0.0.0.0netmask=0require_message_authenticator=nodynamic_clients="dynamic_client_server"lifetime=86400}radiusd:####Instantiatingmodules####instantiate{Module:Linkedtomodulerlm_execModule:Instantiatingmodule"exec"fromfile/usr/local/etc/raddb/modules/execexec{wait=noinput_pairs="request"shell_escape=yes}Module:Linkedtomodulerlm_exprModule:Instantiatingmodule"expr"fromfile/usr/local/etc/raddb/modules/exprModule:Linkedtomodulerlm_expirationModule:Instantiatingmodule"expiration"fromfile/usr/local/etc/raddb/modules/expirationexpiration{reply-message="Your account has expired, %{User-Name} "}Module:Linkedtomodulerlm_logintimeModule:Instantiatingmodule"logintime"fromfile/usr/local/etc/raddb/modules/logintimelogintime{reply-message="You are calling outside your allowed timespan "minimum-timeout=60}Module:Linkedtomodulerlm_rawModule:Instantiatingmodule"raw"fromfile/usr/local/etc/raddb/modules/raw}radiusd:####LoadingVirtualServers####server{#fromfile/usr/local/etc/raddb/radiusd.confmodules{Module:CreatingAuth-Type=digestModule:CreatingPost-Auth-Type=REJECTModule:Checkingauthenticate{...}formoremodulestoloadModule:Linkedtomodulerlm_papModule:Instantiatingmodule"pap"fromfile/usr/local/etc/raddb/modules/pappap{encryption_scheme="auto"auto_header=no}Module:Linkedtomodulerlm_chapModule:Instantiatingmodule"chap"fromfile/usr/local/etc/raddb/modules/chapModule:Linkedtomodulerlm_mschapModule:Instantiatingmodule"mschap"fromfile/usr/local/etc/raddb/modules/mschapmschap{use_mppe=yesrequire_encryption=norequire_strong=nowith_ntdomain_hack=noallow_retry=yes}Module:Linkedtomodulerlm_digestModule:Instantiatingmodule"digest"fromfile/usr/local/etc/raddb/modules/digestModule:Linkedtomodulerlm_unixModule:Instantiatingmodule"unix"fromfile/usr/local/etc/raddb/modules/unixunix{radwtmp="/usr/local/var/log/radius/radwtmp"}Module:Linkedtomodulerlm_eapModule:Instantiatingmodule"eap"fromfile/usr/local/etc/raddb/eap.confeap{default_eap_type="md5"timer_expire=60ignore_unknown_eap_types=nocisco_accounting_username_bug=nomax_sessions=4096}Module:Linkedtosub-modulerlm_eap_md5Module:Instantiatingeap-md5Module:Linkedtosub-modulerlm_eap_leapModule:Instantiatingeap-leapModule:Linkedtosub-modulerlm_eap_gtcModule:Instantiatingeap-gtcgtc{challenge="Password: "auth_type="PAP"}Module:Linkedtosub-modulerlm_eap_tlsModule:Instantiatingeap-tlstls{rsa_key_exchange=nodh_key_exchange=yesrsa_key_length=512dh_key_length=512verify_depth=0CA_path="/usr/local/etc/raddb/certs"pem_file_type=yesprivate_key_file="/usr/local/etc/raddb/certs/server.pem"certificate_file="/usr/local/etc/raddb/certs/server.pem"CA_file="/usr/local/etc/raddb/certs/ca.pem"private_key_password="whatever"dh_file="/usr/local/etc/raddb/certs/dh"random_file="/usr/local/etc/raddb/certs/random"fragment_size=1024include_length=yescheck_crl=nocipher_list="DEFAULT"make_cert_command="/usr/local/etc/raddb/certs/bootstrap"ecdh_curve="prime256v1"cache{enable=nolifetime=24max_entries=255}verify{}ocsp{enable=nooverride_cert_url=yesurl="http://127.0.0.1/ocsp/"use_nonce=yestimeout=0softfail=no}}Module:Linkedtosub-modulerlm_eap_ttlsModule:Instantiatingeap-ttlsttls{default_eap_type="md5"copy_request_to_tunnel=yesuse_tunneled_reply=yesvirtual_server="inner-tunnel"include_length=yes}Module:Linkedtosub-modulerlm_eap_peapModule:Instantiatingeap-peappeap{default_eap_type="mschapv2"copy_request_to_tunnel=yesuse_tunneled_reply=yesproxy_tunneled_request_as_eap=yesvirtual_server="inner-tunnel"soh=no}Module:Linkedtosub-modulerlm_eap_mschapv2Module:Instantiatingeap-mschapv2mschapv2{with_ntdomain_hack=nosend_error=no}Module:Checkingauthorize{...}formoremodulestoloadModule:Linkedtomodulerlm_preprocessModule:Instantiatingmodule"preprocess"fromfile/usr/local/etc/raddb/modules/preprocesspreprocess{huntgroups="/usr/local/etc/raddb/huntgroups"hints="/usr/local/etc/raddb/hints"with_ascend_hack=noascend_channels_per_line=23with_ntdomain_hack=nowith_specialix_jetstream_hack=nowith_cisco_vsa_hack=nowith_alvarion_vsa_hack=no}readingpairlistfile/usr/local/etc/raddb/huntgroupsreadingpairlistfile/usr/local/etc/raddb/hintsModule:Loadingvirtualmodulerewrite.calling_station_idModule:Linkedtomodulerlm_alwaysModule:Instantiatingmodule"updated"fromfile/usr/local/etc/raddb/modules/alwaysalwaysupdated{rcode="updated"simulcount=0mpp=no}Module:Instantiatingmodule"noop"fromfile/usr/local/etc/raddb/modules/alwaysalwaysnoop{rcode="noop"simulcount=0mpp=no}Module:Linkedtomodulerlm_realmModule:Instantiatingmodule"suffix"fromfile/usr/local/etc/raddb/modules/realmrealmsuffix{format="suffix"delimiter="@"ignore_default=noignore_null=no}Module:LoadingvirtualmoduleRADIUSdesk_mainModule:Instantiatingmodule"reject"fromfile/usr/local/etc/raddb/modules/alwaysalwaysreject{rcode="reject"simulcount=0mpp=no}Module:LoadingvirtualmoduleRADIUSdesk_device_checkModule:LoadingvirtualmoduleRADIUSdesk_user_checkModule:Linkedtomodulerlm_sqlModule:Instantiatingmodule"sql"fromfile/usr/local/etc/raddb/sql.confsql{driver="rlm_sql_mysql"server="localhost"port=""login="rd"password="DB_ROOT_PASSWORD!"radius_db="rd"read_groups=yessqltrace=nosqltracefile="/usr/local/var/log/radius/sqltrace.sql"readclients=yesdeletestalesessions=yesnum_sql_socks=5lifetime=0max_queries=0sql_user_name="%{User-Name}"default_user_profile=""nas_query="SELECT id, nasname, shortname, type, secret, server FROM nas"authorize_check_query="SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id"authorize_reply_query="SELECT id, username, attribute, value, op FROM radreply WHERE username = '%{SQL-User-Name}' ORDER BY id"authorize_group_check_query="SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = '%{Sql-Group}' ORDER BY id"authorize_group_reply_query="SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '%{Sql-Group}' ORDER BY id"accounting_onoff_query=" UPDATE radacct SET acctstoptime = '%S', acctsessiontime = unix_timestamp('%S') - unix_timestamp(acctstarttime), acctterminatecause = '%{Acct-Terminate-Cause}', acctstopdelay = %{%{Acct-Delay-Time}:-0} WHERE acctstoptime IS NULL AND nasipaddress = '%{NAS-IP-Address}' AND nasidentifier = '%{%{NAS-Identifier}:-Not in request}' AND acctstarttime <= '%S'"accounting_update_query=" UPDATE radacct SET framedipaddress = '%{Framed-IP-Address}', acctsessiontime = '%{Acct-Session-Time}', acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' << 32 | '%{%{Acct-Input-Octets}:-0}', acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}' WHERE acctsessionid = '%{Acct-Session-Id}' AND username = '%{SQL-User-Name}' AND nasidentifier = '%{%{NAS-Identifier}:-Not in request}' AND nasipaddress = '%{NAS-IP-Address}'"accounting_update_query_alt=" INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasidentifier, nasportid, nasporttype, acctstarttime, acctsessiontime, acctauthentic, connectinfo_start, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, servicetype, framedprotocol, framedipaddress, acctstartdelay, xascendsessionsvrkey) VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{%{NAS-Identifier}:-Not in request}' ,'%{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-Gigawords}:-0}' << 32 | '%{%{Acct-Input-Octets}:-0}', '%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{X-Ascend-Session-Svr-Key}')"accounting_start_query=" INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasidentifier, nasportid, nasporttype, acctstarttime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, acctstartdelay, acctstopdelay, xascendsessionsvrkey) VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{%{NAS-Identifier}:-Not in request}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', NULL, '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{%{Acct-Delay-Time}:-0}', '0', '%{X-Ascend-Session-Svr-Key}')"accounting_start_query_alt=" UPDATE radacct SET acctstarttime = '%S', acctstartdelay = '%{%{Acct-Delay-Time}:-0}', connectinfo_start = '%{Connect-Info}' WHERE acctsessionid = '%{Acct-Session-Id}' AND username = '%{SQL-User-Name}' AND nasipaddress = '%{NAS-IP-Address}' AND nasidentifier = '%{%{NAS-Identifier}:-Not in request}'"accounting_stop_query=" UPDATE radacct SET acctstoptime = '%S', acctsessiontime = '%{Acct-Session-Time}', acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' << 32 | '%{%{Acct-Input-Octets}:-0}', acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}', acctterminatecause = '%{Acct-Terminate-Cause}', acctstopdelay = '%{%{Acct-Delay-Time}:-0}', connectinfo_stop = '%{Connect-Info}' WHERE acctsessionid = '%{Acct-Session-Id}' AND username = '%{SQL-User-Name}' AND nasipaddress = '%{NAS-IP-Address}' AND nasidentifier = '%{%{NAS-Identifier}:-Not in request}'"accounting_stop_query_alt=" INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasidentifier, 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-Identifier}:-Not in request}', '%{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-Gigawords}:-0}' << 32 | '%{%{Acct-Input-Octets}:-0}', '%{%{Acct-Output-Gigawords}:-0}' << 32 | '%{%{Acct-Output-Octets}:-0}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{%{Acct-Delay-Time}:-0}')"group_membership_query="SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority"connect_failure_retry_delay=60simul_count_query="SELECT COUNT(*) FROM radacct WHERE username = '%{SQL-User-Name}' AND acctstoptime IS NULL"simul_verify_query="SELECT radacctid, acctsessionid, username, nasipaddress, nasportid, framedipaddress, callingstationid, framedprotocol FROM radacct WHERE username = '%{SQL-User-Name}' AND acctstoptime IS NULL"postauth_query="INSERT INTO radpostauth (username, realm, pass, reply, nasname, authdate) VALUES ( '%{User-Name}', '%{%{Realm}:- unknown}', '%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%{%{Nas-IP-Address}:-%{request:Packet-Src-IP-Address}}', '%S')"safe-characters="@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"}rlm_sql(sql):Driverrlm_sql_mysql(modulerlm_sql_mysql)loadedandlinkedrlm_sql(sql):Attemptingtoconnecttord@localhost:/rdrlm_sql(sql):starting0rlm_sql(sql):Attemptingtoconnectrlm_sql_mysql#0rlm_sql_mysql:StartingconnecttoMySQLserverfor#0rlm_sql(sql):ConnectednewDBhandle,#0rlm_sql(sql):starting1rlm_sql(sql):Attemptingtoconnectrlm_sql_mysql#1rlm_sql_mysql:StartingconnecttoMySQLserverfor#1rlm_sql(sql):ConnectednewDBhandle,#1rlm_sql(sql):starting2rlm_sql(sql):Attemptingtoconnectrlm_sql_mysql#2rlm_sql_mysql:StartingconnecttoMySQLserverfor#2rlm_sql(sql):ConnectednewDBhandle,#2rlm_sql(sql):starting3rlm_sql(sql):Attemptingtoconnectrlm_sql_mysql#3rlm_sql_mysql:StartingconnecttoMySQLserverfor#3rlm_sql(sql):ConnectednewDBhandle,#3rlm_sql(sql):starting4rlm_sql(sql):Attemptingtoconnectrlm_sql_mysql#4rlm_sql_mysql:StartingconnecttoMySQLserverfor#4rlm_sql(sql):ConnectednewDBhandle,#4rlm_sql(sql):Processinggenerate_sql_clientsrlm_sql(sql)ingenerate_sql_clients:queryisSELECTid,nasname,shortname,type,secret,serverFROMnasrlm_sql(sql):Reservingsqlsocketid:4rlm_sql(sql):Readentrynasname=127.0.0.1,shortname=localhost,secret=testing123rlm_sql(sql):Addingclient127.0.0.1(localhost,server=<none>)toclientslistrlm_sql(sql):Readentrynasname=10.200.2.13,shortname=CPortal,secret=CPORTAL_SECRETrlm_sql(sql):Addingclient10.200.2.13(CPortal,server=<none>)toclientslistrlm_sql(sql):Releasedsqlsocketid:4Module:Linkedtomodulerlm_perlModule:Instantiatingmodule"pl_check_activation"fromfile/usr/local/etc/raddb/modules/pl_check_activationperlpl_check_activation{module="/usr/local/etc/raddb/check_activation.pl"func_authorize="authorize"func_authenticate="authenticate"func_accounting="accounting"func_preacct="preacct"func_checksimul="checksimul"func_detach="detach"func_xlat="xlat"func_pre_proxy="pre_proxy"func_post_proxy="post_proxy"func_post_auth="post_auth"func_recv_coa="recv_coa"func_send_coa="send_coa"}perl:warning:Settinglocalefailed.perl:warning:Pleasecheckthatyourlocalesettings:LANGUAGE="en_ZA:en",LC_ALL=(unset),LC_CTYPE="UTF-8",LANG="en_ZA.UTF-8"aresupportedandinstalledonyoursystem.perl:warning:Fallingbacktothestandardlocale("C").Module:LoadingvirtualmoduleRADIUSdesk_data_counterModule:Instantiatingmodule"pl_reset_time_for_data"fromfile/usr/local/etc/raddb/modules/pl_reset_time_for_dataperlpl_reset_time_for_data{module="/usr/local/etc/raddb/reset_time_for_data.pl"func_authorize="authorize"func_authenticate="authenticate"func_accounting="accounting"func_preacct="preacct"func_checksimul="checksimul"func_detach="detach"func_xlat="xlat"func_pre_proxy="pre_proxy"func_post_proxy="post_proxy"func_post_auth="post_auth"func_recv_coa="recv_coa"func_send_coa="send_coa"}perl:warning:Settinglocalefailed.perl:warning:Pleasecheckthatyourlocalesettings:LANGUAGE="en_ZA:en",LC_ALL=(unset),LC_CTYPE="UTF-8",LANG="en_ZA.UTF-8"aresupportedandinstalledonyoursystem.perl:warning:Fallingbacktothestandardlocale("C").Module:Instantiatingmodule"pl_check_usage_data"fromfile/usr/local/etc/raddb/modules/pl_check_usage_dataperlpl_check_usage_data{module="/usr/local/etc/raddb/check_usage_data.pl"func_authorize="authorize"func_authenticate="authenticate"func_accounting="accounting"func_preacct="preacct"func_checksimul="checksimul"func_detach="detach"func_xlat="xlat"func_pre_proxy="pre_proxy"func_post_proxy="post_proxy"func_post_auth="post_auth"func_recv_coa="recv_coa"func_send_coa="send_coa"}perl:warning:Settinglocalefailed.perl:warning:Pleasecheckthatyourlocalesettings:LANGUAGE="en_ZA:en",LC_ALL=(unset),LC_CTYPE="UTF-8",LANG="en_ZA.UTF-8"aresupportedandinstalledonyoursystem.perl:warning:Fallingbacktothestandardlocale("C").Module:LoadingvirtualmoduleRADIUSdesk_time_counterModule:Instantiatingmodule"pl_reset_time_for_time"fromfile/usr/local/etc/raddb/modules/pl_reset_time_for_timeperlpl_reset_time_for_time{module="/usr/local/etc/raddb/reset_time_for_time.pl"func_authorize="authorize"func_authenticate="authenticate"func_accounting="accounting"func_preacct="preacct"func_checksimul="checksimul"func_detach="detach"func_xlat="xlat"func_pre_proxy="pre_proxy"func_post_proxy="post_proxy"func_post_auth="post_auth"func_recv_coa="recv_coa"func_send_coa="send_coa"}perl:warning:Settinglocalefailed.perl:warning:Pleasecheckthatyourlocalesettings:LANGUAGE="en_ZA:en",LC_ALL=(unset),LC_CTYPE="UTF-8",LANG="en_ZA.UTF-8"aresupportedandinstalledonyoursystem.perl:warning:Fallingbacktothestandardlocale("C").Module:Instantiatingmodule"pl_check_usage_time"fromfile/usr/local/etc/raddb/modules/pl_check_usage_timeperlpl_check_usage_time{module="/usr/local/etc/raddb/check_usage_time.pl"func_authorize="authorize"func_authenticate="authenticate"func_accounting="accounting"func_preacct="preacct"func_checksimul="checksimul"func_detach="detach"func_xlat="xlat"func_pre_proxy="pre_proxy"func_post_proxy="post_proxy"func_post_auth="post_auth"func_recv_coa="recv_coa"func_send_coa="send_coa"}perl:warning:Settinglocalefailed.perl:warning:Pleasecheckthatyourlocalesettings:LANGUAGE="en_ZA:en",LC_ALL=(unset),LC_CTYPE="UTF-8",LANG="en_ZA.UTF-8"aresupportedandinstalledonyoursystem.perl:warning:Fallingbacktothestandardlocale("C").Module:LoadingvirtualmoduleRADIUSdesk_voucher_checkModule:LoadingvirtualmoduleRADIUSdesk_realm_nas_checkModule:LoadingvirtualmoduleRADIUSdesk_device_owner_checkModule:LoadingvirtualmoduleRADIUSdesk_user_checkModule:LoadingvirtualmoduleRADIUSdesk_data_counterModule:LoadingvirtualmoduleRADIUSdesk_time_counterModule:LoadingvirtualmoduleRADIUSdesk_voucher_checkModule:LoadingvirtualmoduleRADIUSdesk_realm_nas_checkModule:LoadingvirtualmoduleRADIUSdesk_user_checkModule:LoadingvirtualmoduleRADIUSdesk_data_counterModule:LoadingvirtualmoduleRADIUSdesk_time_counterModule:LoadingvirtualmoduleRADIUSdesk_voucher_checkModule:LoadingvirtualmoduleRADIUSdesk_realm_nas_checkModule:LoadingvirtualmoduleRADIUSdesk_user_checkModule:LoadingvirtualmoduleRADIUSdesk_data_counterModule:LoadingvirtualmoduleRADIUSdesk_time_counterModule:LoadingvirtualmoduleRADIUSdesk_voucher_checkModule:LoadingvirtualmoduleRADIUSdesk_realm_nas_checkModule:Linkedtomodulerlm_filesModule:Instantiatingmodule"files"fromfile/usr/local/etc/raddb/modules/filesfiles{usersfile="/usr/local/etc/raddb/users"acctusersfile="/usr/local/etc/raddb/acct_users"preproxy_usersfile="/usr/local/etc/raddb/preproxy_users"compat="no"}readingpairlistfile/usr/local/etc/raddb/usersreadingpairlistfile/usr/local/etc/raddb/acct_usersreadingpairlistfile/usr/local/etc/raddb/preproxy_usersModule:LoadingvirtualmoduleRADIUSdesk_session_timeoutModule:Checkingpreacct{...}formoremodulestoloadModule:Linkedtomodulerlm_acct_uniqueModule:Instantiatingmodule"acct_unique"fromfile/usr/local/etc/raddb/modules/acct_uniqueacct_unique{key="User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"}Module:LoadingvirtualmoduleRADIUSdesk_preacctModule:Loadingvirtualmodulerewrite.calling_station_idModule:LoadingvirtualmoduleRADIUSdesk_set_acct_realmModule:LoadingvirtualmoduleRADIUSdesk_async_acctModule:Checkingaccounting{...}formoremodulestoloadModule:Linkedtomodulerlm_detailModule:Instantiatingmodule"detail"fromfile/usr/local/etc/raddb/modules/detaildetail{detailfile="/usr/local/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d"header="%t"detailperm=384dirperm=493locking=nolog_packet_header=no}Module:Linkedtomodulerlm_radutmpModule:Instantiatingmodule"radutmp"fromfile/usr/local/etc/raddb/modules/radutmpradutmp{filename="/usr/local/var/log/radius/radutmp"username="%{User-Name}"case_sensitive=yescheck_with_nas=yesperm=384callerid=yes}Module:LoadingvirtualmoduleRADIUSdesk_acctModule:Linkedtomodulerlm_attr_filterModule:Instantiatingmodule"attr_filter.accounting_response"fromfile/usr/local/etc/raddb/modules/attr_filterattr_filterattr_filter.accounting_response{attrsfile="/usr/local/etc/raddb/attrs.accounting_response"key="%{User-Name}"relaxed=no}readingpairlistfile/usr/local/etc/raddb/attrs.accounting_responseModule:Checkingsession{...}formoremodulestoloadModule:Checkingpost-proxy{...}formoremodulestoloadModule:Checkingpost-auth{...}formoremodulestoloadModule:LoadingvirtualmoduleRADIUSdesk_last_acceptModule:LoadingvirtualmoduleRADIUSdesk_post_authModule:LoadingvirtualmoduleRADIUSdesk_auto_devices_checkModule:Instantiatingmodule"attr_filter.access_reject"fromfile/usr/local/etc/raddb/modules/attr_filterattr_filterattr_filter.access_reject{attrsfile="/usr/local/etc/raddb/attrs.access_reject"key="%{User-Name}"relaxed=no}readingpairlistfile/usr/local/etc/raddb/attrs.access_rejectModule:LoadingvirtualmoduleRADIUSdesk_last_reject}#modules}#serverserverinner-tunnel{#fromfile/usr/local/etc/raddb/sites-enabled/inner-tunnelmodules{Module:Checkingauthenticate{...}formoremodulestoloadModule:Checkingauthorize{...}formoremodulestoloadModule:LoadingvirtualmoduleRADIUSdesk_mainModule:LoadingvirtualmoduleRADIUSdesk_device_checkModule:LoadingvirtualmoduleRADIUSdesk_user_checkModule:LoadingvirtualmoduleRADIUSdesk_data_counterModule:LoadingvirtualmoduleRADIUSdesk_time_counterModule:LoadingvirtualmoduleRADIUSdesk_voucher_checkModule:LoadingvirtualmoduleRADIUSdesk_realm_nas_checkModule:LoadingvirtualmoduleRADIUSdesk_device_owner_checkModule:LoadingvirtualmoduleRADIUSdesk_user_checkModule:LoadingvirtualmoduleRADIUSdesk_data_counterModule:LoadingvirtualmoduleRADIUSdesk_time_counterModule:LoadingvirtualmoduleRADIUSdesk_voucher_checkModule:LoadingvirtualmoduleRADIUSdesk_realm_nas_checkModule:LoadingvirtualmoduleRADIUSdesk_user_checkModule:LoadingvirtualmoduleRADIUSdesk_data_counterModule:LoadingvirtualmoduleRADIUSdesk_time_counterModule:LoadingvirtualmoduleRADIUSdesk_voucher_checkModule:LoadingvirtualmoduleRADIUSdesk_realm_nas_checkModule:LoadingvirtualmoduleRADIUSdesk_user_checkModule:LoadingvirtualmoduleRADIUSdesk_data_counterModule:LoadingvirtualmoduleRADIUSdesk_time_counterModule:LoadingvirtualmoduleRADIUSdesk_voucher_checkModule:LoadingvirtualmoduleRADIUSdesk_realm_nas_checkModule:Checkingsession{...}formoremodulestoloadModule:Checkingpost-proxy{...}formoremodulestoloadModule:Checkingpost-auth{...}formoremodulestoload}#modules}#serverserverdynamic_client_server{#fromfile/usr/local/etc/raddb/sites-enabled/dynamic-clientsmodules{Module:Checkingauthorize{...}formoremodulestoloadModule:Instantiatingmodule"ok"fromfile/usr/local/etc/raddb/modules/alwaysalwaysok{rcode="ok"simulcount=0mpp=no}}#modules}#serverradiusd:####OpeningIPaddressesandPorts####listen{type="auth"ipaddr=*port=0}listen{type="acct"ipaddr=*port=0}listen{type="control"listen{socket="/usr/local/var/run/radiusd/radiusd.sock"mode="rw"}}listen{type="auth"ipaddr=127.0.0.1port=18120}...addingnewsocketproxyaddress*port34867Listeningonauthenticationaddress*port1812Listeningonaccountingaddress*port1813Listeningoncommandfile/usr/local/var/run/radiusd/radiusd.sockListeningonauthenticationaddress127.0.0.1port18120asserverinner-tunnelListeningonproxyaddress*port1814Readytoprocessrequests.rad_recv:Access-Requestpacketfromhost10.200.2.13port44226,id=238,length=280ChilliSpot-Version="1.3.0"User-Name="fazevedo"User-Password="\t\217\324\3240\202[\016B3\2267\330\327\rI" Service-Type = Login-User Acct-Session-Id = "5266433b00000004" Framed-IP-Address = 10.123.0.16 NAS-Port-Type = Wireless-802.11 NAS-Port = 4 NAS-Port-Id = "00000004" Calling-Station-Id = "4C-B1-99-AC-F0-54" Called-Station-Id = "AA-2A-CC-8D-F8-21" NAS-IP-Address = 10.123.255.254 NAS-Identifier = "CPortal" WISPr-Location-ID = "isocc=,cc=,ac=,network=Coova," WISPr-Location-Name = "My_HotSpot" WISPr-Logoff-URL = "http://10.123.255.254:3990/logoff" Message-Authenticator = 0xadf07847b34d724a49ca411064408b7e# Executing section authorize from file /usr/local/etc/raddb/sites-enabled/default+- entering group authorize {...}++[preprocess] returns ok++- entering policy rewrite.calling_station_id {...}+++? if ((Calling-Station-Id) && "%{Calling-Station-Id}" =~ /^%{config:policy.mac-addr}$/i)??Evaluating(Calling-Station-Id)->TRUEexpand:%{Calling-Station-Id} -> 4C-B1-99-AC-F0-54expand:policy.mac-addr->policy.mac-addrexpand:^%{config:policy.mac-addr}$ -> ^([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})$?Evaluating("%{Calling-Station-Id}"=~/^%{config:policy.mac-addr}$/i) -> TRUE+++?if((Calling-Station-Id)&&"%{Calling-Station-Id}"=~/^%{config:policy.mac-addr}$/i) -> TRUE+++-enteringif((Calling-Station-Id)&&"%{Calling-Station-Id}"=~/^%{config:policy.mac-addr}$/i) {...}expand:%{1}-%{2}-%{3}-%{4}-%{5}-%{6} -> 4C-B1-99-AC-F0-54expand:%{tolower:%{1}-%{2}-%{3}-%{4}-%{5}-%{6}} -> 4c-b1-99-ac-f0-54++++[request]returnsok++++[updated]returnsupdated+++-if((Calling-Station-Id)&&"%{Calling-Station-Id}"=~/^%{config:policy.mac-addr}$/i) returns updated+++...skippingelseforrequest0:Preceding"if"wastaken++-policyrewrite.calling_station_idreturnsupdated++[chap]returnsnoop++[mschap]returnsnoop++[digest]returnsnoop[suffix]No'@'inUser-Name="fazevedo",lookinguprealmNULL[suffix]Nosuchrealm"NULL"++[suffix]returnsnoop++?if(!EAP-Message)?Evaluating!(EAP-Message)->TRUE++?if(!EAP-Message)->TRUE++-enteringif(!EAP-Message){...}+++-enteringpolicyRADIUSdesk_main{...}++++?if(request:User-Name=~/([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i)?Evaluating(request:User-Name=~/([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i)->FALSE++++?if(request:User-Name=~/([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i)->FALSE++++?if("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}"==0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(username)FROMradcheckWHEREradcheck.username='%{request:User-Name}'->SELECTcount(username)FROMradcheckWHEREradcheck.username='fazevedo'rlm_sql(sql):Reservingsqlsocketid:3sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:3expand:%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'} -> 7?Evaluating("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}"==0)->FALSE++++?if("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}"==0)->FALSE++++?if("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}"!=0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(username)FROMradcheckWHEREradcheck.username='%{request:Calling-Station-Id}'->SELECTcount(username)FROMradcheckWHEREradcheck.username='4c-b1-99-ac-f0-54'rlm_sql(sql):Reservingsqlsocketid:2sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:2expand:%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'} -> 0?Evaluating("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}"!=0)->FALSE++++?if("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}"!=0)->FALSE++++?elsif("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}")sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(radcheck.username)FROMradcheckWHEREradcheck.username='%{request:User-Name}'andattribute='Rd-Mac-Check'andvalue=1->SELECTcount(radcheck.username)FROMradcheckWHEREradcheck.username='fazevedo'andattribute='Rd-Mac-Check'andvalue=1rlm_sql(sql):Reservingsqlsocketid:1sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:1expand:%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1} -> 0?Evaluating("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}")->FALSE++++?elsif("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}")->FALSEsql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTvalueFROMradcheckWHEREradcheck.username='%{request:User-Name}'andattribute='Rd-Device-Owner'->SELECTvalueFROMradcheckWHEREradcheck.username='fazevedo'andattribute='Rd-Device-Owner'rlm_sql(sql):Reservingsqlsocketid:0SQLquerydidnotreturnanyresultsrlm_sql(sql):Releasedsqlsocketid:0expand:%{sql:SELECT value FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Device-Owner'} -> ++++[control]returnsnoop++++?if("%{control:Rd-Tmp-Owner}")expand:%{control:Rd-Tmp-Owner} -> ?Evaluating("%{control:Rd-Tmp-Owner}")->FALSE++++?if("%{control:Rd-Tmp-Owner}")->FALSE++++-enteringelseelse{...}+++++-enteringpolicyRADIUSdesk_user_check{...}[sql]expand:%{User-Name} -> fazevedo[sql]sql_set_userescapeduser-->'fazevedo'rlm_sql(sql):Reservingsqlsocketid:4[sql]expand:SELECTid,username,attribute,value,opFROMradcheckWHEREusername='%{SQL-User-Name}'ORDERBYid->SELECTid,username,attribute,value,opFROMradcheckWHEREusername='fazevedo'ORDERBYid[sql]Userfoundinradchecktable[sql]expand:SELECTid,username,attribute,value,opFROMradreplyWHEREusername='%{SQL-User-Name}'ORDERBYid->SELECTid,username,attribute,value,opFROMradreplyWHEREusername='fazevedo'ORDERBYid[sql]expand:SELECTgroupnameFROMradusergroupWHEREusername='%{SQL-User-Name}'ORDERBYpriority->SELECTgroupnameFROMradusergroupWHEREusername='fazevedo'ORDERBYpriority[sql]CheckingprofileTime-Standard-1Hour[sql]sql_set_userescapeduser-->'Time-Standard-1Hour'[sql]expand:SELECTgroupnameFROMradusergroupWHEREusername='%{SQL-User-Name}'ORDERBYpriority->SELECTgroupnameFROMradusergroupWHEREusername='Time-Standard-1Hour'ORDERBYpriority[sql]expand:SELECTid,groupname,attribute,Value,opFROMradgroupcheckWHEREgroupname='%{Sql-Group}'ORDERBYid->SELECTid,groupname,attribute,Value,opFROMradgroupcheckWHEREgroupname='1Hour'ORDERBYid[sql]Userfoundingroup1Hour[sql]expand:SELECTid,groupname,attribute,value,opFROMradgroupreplyWHEREgroupname='%{Sql-Group}'ORDERBYid->SELECTid,groupname,attribute,value,opFROMradgroupreplyWHEREgroupname='1Hour'ORDERBYid[sql]expand:SELECTid,groupname,attribute,Value,opFROMradgroupcheckWHEREgroupname='%{Sql-Group}'ORDERBYid->SELECTid,groupname,attribute,Value,opFROMradgroupcheckWHEREgroupname='BW-384Kb'ORDERBYid[sql]UserfoundingroupBW-384Kb[sql]expand:SELECTid,groupname,attribute,value,opFROMradgroupreplyWHEREgroupname='%{Sql-Group}'ORDERBYid->SELECTid,groupname,attribute,value,opFROMradgroupreplyWHEREgroupname='BW-384Kb'ORDERBYidrlm_sql(sql):Releasedsqlsocketid:4++++++[sql]returnsok++++++?if(ok)?Evaluating(ok)->TRUE++++++?if(ok)->TRUE++++++-enteringif(ok){...}+++++++?if(("%{control:Rd-Account-Disabled}")&&("%{control:Rd-Account-Disabled}"==1))expand:%{control:Rd-Account-Disabled} -> 0??Evaluating("%{control:Rd-Account-Disabled}")->FALSE??Skipping("%{control:Rd-Account-Disabled}"==1)+++++++?if(("%{control:Rd-Account-Disabled}")&&("%{control:Rd-Account-Disabled}"==1))->FALSE+++++++?if("%{control:Rd-Account-Activation-Time}")expand:%{control:Rd-Account-Activation-Time} -> ?Evaluating("%{control:Rd-Account-Activation-Time}")->FALSE+++++++?if("%{control:Rd-Account-Activation-Time}")->FALSE+++++++?if("%{control:Rd-Realm}")expand:%{control:Rd-Realm} -> TVCabo?Evaluating("%{control:Rd-Realm}")->TRUE+++++++?if("%{control:Rd-Realm}")->TRUE+++++++-enteringif("%{control:Rd-Realm}"){...}expand:%{control:Rd-Realm} -> TVCabo++++++++[request]returnsok+++++++-if("%{control:Rd-Realm}")returnsok+++++++?if(("%{control:Rd-Auth-Type}")&&("%{control:Rd-Auth-Type}"!='sql'))expand:%{control:Rd-Auth-Type} -> ??Evaluating("%{control:Rd-Auth-Type}")->FALSE??Skipping("%{control:Rd-Auth-Type}"!='sql')+++++++?if(("%{control:Rd-Auth-Type}")&&("%{control:Rd-Auth-Type}"!='sql'))->FALSE+++++++-enteringpolicyRADIUSdesk_data_counter{...}++++++++?if((control:Rd-Total-Data)&&(control:Rd-Reset-Type-Data)&&(control:Rd-Cap-Type-Data=='hard'))??Evaluating(control:Rd-Total-Data)->FALSE??Skipping(control:Rd-Reset-Type-Data)??Skipping(control:Rd-Cap-Type-Data=='hard')++++++++?if((control:Rd-Total-Data)&&(control:Rd-Reset-Type-Data)&&(control:Rd-Cap-Type-Data=='hard'))->FALSE+++++++-policyRADIUSdesk_data_counterreturnsok+++++++-enteringpolicyRADIUSdesk_time_counter{...}++++++++?if((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time=='hard'))??Evaluating(control:Rd-Total-Time)->TRUE??Evaluating(control:Rd-Reset-Type-Time)->TRUE??Evaluating(control:Rd-Cap-Type-Time=='hard')->TRUE++++++++?if((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time=='hard'))->TRUE++++++++-enteringif((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time=='hard')){...}rlm_perl:AddedpairNAS-Port-Type=Wireless-802.11rlm_perl:AddedpairWISPr-Logoff-URL=http://10.123.255.254:3990/logoffrlm_perl:AddedpairAcct-Session-Id=5266433b00000004rlm_perl:AddedpairService-Type=Login-Userrlm_perl:AddedpairCalled-Station-Id=AA-2A-CC-8D-F8-21rlm_perl:AddedpairMessage-Authenticator=0xadf07847b34d724a49ca411064408b7erlm_perl:AddedpairRealm=TVCaborlm_perl:AddedpairNAS-IP-Address=10.123.255.254rlm_perl:AddedpairNAS-Port-Id=00000004rlm_perl:AddedpairChilliSpot-Version=1.3.0rlm_perl:AddedpairCalling-Station-Id=4c-b1-99-ac-f0-54rlm_perl:AddedpairWISPr-Location-ID=isocc=,cc=,ac=,network=Coova,rlm_perl:AddedpairUser-Name=fazevedorlm_perl:AddedpairUser-Password=\t\217\324\3240\202[\016B3\2267\330\327\rIrlm_perl:AddedpairNAS-Identifier=CPortalrlm_perl:AddedpairFramed-IP-Address=10.123.0.16rlm_perl:AddedpairNAS-Port=4rlm_perl:AddedpairWISPr-Location-Name=My_HotSpotrlm_perl:AddedpairWISPr-Bandwidth-Max-Up=384000rlm_perl:AddedpairWISPr-Bandwidth-Max-Down=384000rlm_perl:AddedpairCleartext-Password=passwordrlm_perl:AddedpairRd-Not-Track-Auth=1rlm_perl:AddedpairRd-Realm=TVCaborlm_perl:AddedpairRd-Reset-Type-Time=neverrlm_perl:AddedpairRd-Total-Time=3600rlm_perl:AddedpairRd-User-Type=userrlm_perl:AddedpairUser-Profile=Time-Standard-1Hourrlm_perl:AddedpairRd-Tmp-Owner=rlm_perl:AddedpairRd-Cap-Type-Time=hardrlm_perl:AddedpairRd-Account-Disabled=0+++++++++[pl_reset_time_for_time]returnsnoop+++++++++?if(updated)?Evaluating(updated)->FALSE+++++++++?if(updated)->FALSE+++++++++-enteringelseelse{...}++++++++++?if("%{control:Rd-Tmp-Avail-Time}")expand:%{control:Rd-Tmp-Avail-Time} -> ?Evaluating("%{control:Rd-Tmp-Avail-Time}")->FALSE++++++++++?if("%{control:Rd-Tmp-Avail-Time}")->FALSE++++++++++-enteringelseelse{...}sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTIFNULL(SUM(AcctSessionTime),0)FROMradacctWHEREusername='%{request:User-Name}'->SELECTIFNULL(SUM(AcctSessionTime),0)FROMradacctWHEREusername='fazevedo'rlm_sql(sql):Reservingsqlsocketid:3sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:3expand:%{sql:SELECT IFNULL(SUM(AcctSessionTime),0) FROM radacct WHERE username='%{request:User-Name}'} -> 0+++++++++++[control]returnsnoop++++++++++-elseelsereturnsnoop+++++++++-elseelsereturnsnooprlm_perl:Rd-Tmp-Avail-Timedoesnotexist.Setitequalto3600rlm_perl:AddedpairNAS-Port-Type=Wireless-802.11rlm_perl:AddedpairAcct-Session-Id=5266433b00000004rlm_perl:AddedpairWISPr-Logoff-URL=http://10.123.255.254:3990/logoffrlm_perl:AddedpairService-Type=Login-Userrlm_perl:AddedpairCalled-Station-Id=AA-2A-CC-8D-F8-21rlm_perl:AddedpairMessage-Authenticator=0xadf07847b34d724a49ca411064408b7erlm_perl:AddedpairRealm=TVCaborlm_perl:AddedpairNAS-IP-Address=10.123.255.254rlm_perl:AddedpairNAS-Port-Id=00000004rlm_perl:AddedpairChilliSpot-Version=1.3.0rlm_perl:AddedpairSQL-User-Name=fazevedorlm_perl:AddedpairCalling-Station-Id=4c-b1-99-ac-f0-54rlm_perl:AddedpairWISPr-Location-ID=isocc=,cc=,ac=,network=Coova,rlm_perl:AddedpairUser-Name=fazevedorlm_perl:AddedpairUser-Password=\t\217\324\3240\202[\016B3\2267\330\327\rIrlm_perl:AddedpairNAS-Identifier=CPortalrlm_perl:AddedpairFramed-IP-Address=10.123.0.16rlm_perl:AddedpairNAS-Port=4rlm_perl:AddedpairWISPr-Location-Name=My_HotSpotrlm_perl:AddedpairWISPr-Bandwidth-Max-Up=384000rlm_perl:AddedpairWISPr-Bandwidth-Max-Down=384000rlm_perl:AddedpairRd-Avail-Time=3600rlm_perl:AddedpairCleartext-Password=passwordrlm_perl:AddedpairRd-Realm=TVCaborlm_perl:AddedpairRd-Not-Track-Auth=1rlm_perl:AddedpairRd-User-Type=userrlm_perl:AddedpairRd-Total-Time=3600rlm_perl:AddedpairRd-Reset-Type-Time=neverrlm_perl:AddedpairUser-Profile=Time-Standard-1Hourrlm_perl:AddedpairRd-Tmp-Owner=rlm_perl:AddedpairRd-Cap-Type-Time=hardrlm_perl:AddedpairRd-Account-Disabled=0rlm_perl:AddedpairRd-Used-Time=0rlm_perl:AddedpairRd-Tmp-Avail-Time=3600+++++++++[pl_check_usage_time]returnsupdated++++++++-if((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time=='hard'))returnsupdated+++++++-policyRADIUSdesk_time_counterreturnsupdated+++++++-enteringpolicyRADIUSdesk_voucher_check{...}++++++++?if("%{control:Rd-Voucher}")expand:%{control:Rd-Voucher} -> ?Evaluating("%{control:Rd-Voucher}")->FALSE++++++++?if("%{control:Rd-Voucher}")->FALSE+++++++-policyRADIUSdesk_voucher_checkreturnsupdated+++++++-enteringpolicyRADIUSdesk_realm_nas_check{...}++++++++?if("%{request:NAS-Identifier}")expand:%{request:NAS-Identifier} -> CPortal?Evaluating("%{request:NAS-Identifier}")->TRUE++++++++?if("%{request:NAS-Identifier}")->TRUE++++++++-enteringif("%{request:NAS-Identifier}"){...}+++++++++?if("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasidentifier='%{request:NAS-Identifier}'}">0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTCOUNT(na_realms.id)AScountFROMnasLEFTJOINna_realmsONnas.id=na_realms.na_idWHEREnas.nasidentifier='%{request:NAS-Identifier}'->SELECTCOUNT(na_realms.id)AScountFROMnasLEFTJOINna_realmsONnas.id=na_realms.na_idWHEREnas.nasidentifier='CPortal'rlm_sql(sql):Reservingsqlsocketid:2sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:2expand:%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasidentifier='%{request:NAS-Identifier}'} -> 0?Evaluating("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasidentifier='%{request:NAS-Identifier}'}">0)->FALSE+++++++++?if("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasidentifier='%{request:NAS-Identifier}'}">0)->FALSE++++++++-if("%{request:NAS-Identifier}")returnsupdated++++++++?if("%{request:NAS-IP-Address}")expand:%{request:NAS-IP-Address} -> 10.123.255.254?Evaluating("%{request:NAS-IP-Address}")->TRUE++++++++?if("%{request:NAS-IP-Address}")->TRUE++++++++-enteringif("%{request:NAS-IP-Address}"){...}+++++++++?if("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}">0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTCOUNT(na_realms.id)AScountFROMnasLEFTJOINna_realmsONnas.id=na_realms.na_idWHEREnas.nasname='%{request:NAS-IP-Address}'->SELECTCOUNT(na_realms.id)AScountFROMnasLEFTJOINna_realmsONnas.id=na_realms.na_idWHEREnas.nasname='10.123.255.254'rlm_sql(sql):Reservingsqlsocketid:1sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:1expand:%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'} -> 0?Evaluating("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}">0)->FALSE+++++++++?if("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}">0)->FALSE++++++++-if("%{request:NAS-IP-Address}")returnsupdated+++++++-policyRADIUSdesk_realm_nas_checkreturnsupdated++++++-if(ok)returnsupdated+++++-policyRADIUSdesk_user_checkreturnsupdated++++-elseelsereturnsupdated+++-policyRADIUSdesk_mainreturnsupdated++-if(!EAP-Message)returnsupdated++...skippingelseforrequest0:Preceding"if"wastaken++[files]returnsnoop++[expiration]returnsnoop++[logintime]returnsnoop++-enteringpolicyRADIUSdesk_session_timeout{...}+++?if("%{reply:Session-Timeout}")expand:%{reply:Session-Timeout} -> ?Evaluating("%{reply:Session-Timeout}")->FALSE+++?if("%{reply:Session-Timeout}")->FALSE+++-enteringelseelse{...}++++?if(("%{control:Rd-Avail-Time}")&&("%{control:Rd-Voucher-Timeout}"))expand:%{control:Rd-Avail-Time} -> 3600??Evaluating("%{control:Rd-Avail-Time}")->TRUEexpand:%{control:Rd-Voucher-Timeout} -> ??Evaluating("%{control:Rd-Voucher-Timeout}")->FALSE++++?if(("%{control:Rd-Avail-Time}")&&("%{control:Rd-Voucher-Timeout}"))->FALSE++++?elsif("%{control:Rd-Avail-Time}")expand:%{control:Rd-Avail-Time} -> 3600?Evaluating("%{control:Rd-Avail-Time}")->TRUE++++?elsif("%{control:Rd-Avail-Time}")->TRUE++++-enteringelsif("%{control:Rd-Avail-Time}"){...}expand:%{control:Rd-Avail-Time} -> 3600+++++[reply]returnsnoop++++-elsif("%{control:Rd-Avail-Time}")returnsnoop++++...skippingelsifforrequest0:Preceding"if"wastaken+++-elseelsereturnsnoop++-policyRADIUSdesk_session_timeoutreturnsnoop++?if(("%{control:Rd-User-Type}"=='device')&&(!"%{control:Auth-Type}"))expand:%{control:Rd-User-Type} -> user??Evaluating("%{control:Rd-User-Type}"=='device')->FALSE??Skipping("%{control:Auth-Type}")++?if(("%{control:Rd-User-Type}"=='device')&&(!"%{control:Auth-Type}"))->FALSE++[pap]returnsupdatedFoundAuth-Type=PAP# Executing group from file /usr/local/etc/raddb/sites-enabled/default+-enteringgroupPAP{...}[pap]loginattemptwithpassword" ???0?[?B3?7?? I"[pap]Usingcleartextpassword"password"[pap]Passwordsdon't match++[pap] returns rejectFailed to authenticate the user.Using Post-Auth-Type REJECT# Executing group from file /usr/local/etc/raddb/sites-enabled/default+- entering group REJECT {...}[attr_filter.access_reject] expand: %{User-Name} -> fazevedoattr_filter: Matched entry DEFAULT at line 11++[attr_filter.access_reject] returns updated++- entering policy RADIUSdesk_last_reject {...}+++? if (EAP-Message)? Evaluating (EAP-Message) -> FALSE+++? if (EAP-Message) -> FALSE+++? if ("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}" > 0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(username)FROM`users`whereusername='%{User-Name}'->SELECTcount(username)FROM`users`whereusername='fazevedo'rlm_sql(sql):Reservingsqlsocketid:0sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:0expand:%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'} -> 1?Evaluating("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}">0)->TRUE+++?if("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}">0)->TRUE+++-enteringif("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}">0){...}sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:%{reply:Reply-Message} -> ...expandingsecondconditionalexpand:UPDATE`users`SETlast_reject_time=now(),last_reject_nas='%{NAS-IP-Address}',last_reject_message='%{%{reply:Reply-Message}:-N/A}'whereusername='%{User-Name}'->UPDATE`users`SETlast_reject_time=now(),last_reject_nas='10.123.255.254',last_reject_message='N/A'whereusername='fazevedo'rlm_sql(sql):Reservingsqlsocketid:4rlm_sql(sql):Releasedsqlsocketid:4expand:%{sql:UPDATE `users` SET last_reject_time=now(),last_reject_nas='%{NAS-IP-Address}',last_reject_message='%{%{reply:Reply-Message}:-N/A}' where username='%{User-Name}'} -> 1++++[expand]returnsupdated+++-if("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}">0)returnsupdated+++?if("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}">0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(name)FROM`devices`wherename='%{Calling-Station-Id}'->SELECTcount(name)FROM`devices`wherename='4c-b1-99-ac-f0-54'rlm_sql(sql):Reservingsqlsocketid:3sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:3expand:%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'} -> 0?Evaluating("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}">0)->FALSE+++?if("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}">0)->FALSE+++?if("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}">0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(name)FROM`vouchers`wherename='%{User-Name}'->SELECTcount(name)FROM`vouchers`wherename='fazevedo'rlm_sql(sql):Reservingsqlsocketid:2sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:2expand:%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'} -> 0?Evaluating("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}">0)->FALSE+++?if("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}">0)->FALSE++-policyRADIUSdesk_last_rejectreturnsupdatedDelayingrejectofrequest0for1secondsGoingtothenextrequestWakingupin0.9seconds.Sendingdelayedrejectforrequest0SendingAccess-Rejectofid238to10.200.2.13port44226Wakingupin4.9seconds.Cleaninguprequest0ID238withtimestamp+81Readytoprocessrequests.rad_recv:Access-Requestpacketfromhost127.0.0.1port39140,id=206,length=48User-Name="fazevedo"User-Password="password"# Executing section authorize from file /usr/local/etc/raddb/sites-enabled/default+-enteringgroupauthorize{...}++[preprocess]returnsok++-enteringpolicyrewrite.calling_station_id{...}+++?if((Calling-Station-Id)&&"%{Calling-Station-Id}"=~/^%{config:policy.mac-addr}$/i)??Evaluating(Calling-Station-Id)->FALSE?Skipping("%{Calling-Station-Id}"=~/^%{config:policy.mac-addr}$/i)+++?if((Calling-Station-Id)&&"%{Calling-Station-Id}"=~/^%{config:policy.mac-addr}$/i) -> FALSE+++-enteringelseelse{...}++++[noop]returnsnoop+++-elseelsereturnsnoop++-policyrewrite.calling_station_idreturnsnoop++[chap]returnsnoop++[mschap]returnsnoop++[digest]returnsnoop[suffix]No'@'inUser-Name="fazevedo",lookinguprealmNULL[suffix]Nosuchrealm"NULL"++[suffix]returnsnoop++?if(!EAP-Message)?Evaluating!(EAP-Message)->TRUE++?if(!EAP-Message)->TRUE++-enteringif(!EAP-Message){...}+++-enteringpolicyRADIUSdesk_main{...}++++?if(request:User-Name=~/([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i)?Evaluating(request:User-Name=~/([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i)->FALSE++++?if(request:User-Name=~/([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i)->FALSE++++?if("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}"==0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(username)FROMradcheckWHEREradcheck.username='%{request:User-Name}'->SELECTcount(username)FROMradcheckWHEREradcheck.username='fazevedo'rlm_sql(sql):Reservingsqlsocketid:4sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:4expand:%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'} -> 7?Evaluating("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}"==0)->FALSE++++?if("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}"==0)->FALSE++++?if("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}"!=0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(username)FROMradcheckWHEREradcheck.username='%{request:Calling-Station-Id}'->SELECTcount(username)FROMradcheckWHEREradcheck.username=''rlm_sql(sql):Reservingsqlsocketid:3sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:3expand:%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'} -> 0?Evaluating("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}"!=0)->FALSE++++?if("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}"!=0)->FALSE++++?elsif("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}")sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(radcheck.username)FROMradcheckWHEREradcheck.username='%{request:User-Name}'andattribute='Rd-Mac-Check'andvalue=1->SELECTcount(radcheck.username)FROMradcheckWHEREradcheck.username='fazevedo'andattribute='Rd-Mac-Check'andvalue=1rlm_sql(sql):Reservingsqlsocketid:2sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:2expand:%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1} -> 0?Evaluating("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}")->FALSE++++?elsif("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}")->FALSEsql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTvalueFROMradcheckWHEREradcheck.username='%{request:User-Name}'andattribute='Rd-Device-Owner'->SELECTvalueFROMradcheckWHEREradcheck.username='fazevedo'andattribute='Rd-Device-Owner'rlm_sql(sql):Reservingsqlsocketid:1SQLquerydidnotreturnanyresultsrlm_sql(sql):Releasedsqlsocketid:1expand:%{sql:SELECT value FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Device-Owner'} -> ++++[control]returnsnoop++++?if("%{control:Rd-Tmp-Owner}")expand:%{control:Rd-Tmp-Owner} -> ?Evaluating("%{control:Rd-Tmp-Owner}")->FALSE++++?if("%{control:Rd-Tmp-Owner}")->FALSE++++-enteringelseelse{...}+++++-enteringpolicyRADIUSdesk_user_check{...}[sql]expand:%{User-Name} -> fazevedo[sql]sql_set_userescapeduser-->'fazevedo'rlm_sql(sql):Reservingsqlsocketid:0[sql]expand:SELECTid,username,attribute,value,opFROMradcheckWHEREusername='%{SQL-User-Name}'ORDERBYid->SELECTid,username,attribute,value,opFROMradcheckWHEREusername='fazevedo'ORDERBYid[sql]Userfoundinradchecktable[sql]expand:SELECTid,username,attribute,value,opFROMradreplyWHEREusername='%{SQL-User-Name}'ORDERBYid->SELECTid,username,attribute,value,opFROMradreplyWHEREusername='fazevedo'ORDERBYid[sql]expand:SELECTgroupnameFROMradusergroupWHEREusername='%{SQL-User-Name}'ORDERBYpriority->SELECTgroupnameFROMradusergroupWHEREusername='fazevedo'ORDERBYpriority[sql]CheckingprofileTime-Standard-1Hour[sql]sql_set_userescapeduser-->'Time-Standard-1Hour'[sql]expand:SELECTgroupnameFROMradusergroupWHEREusername='%{SQL-User-Name}'ORDERBYpriority->SELECTgroupnameFROMradusergroupWHEREusername='Time-Standard-1Hour'ORDERBYpriority[sql]expand:SELECTid,groupname,attribute,Value,opFROMradgroupcheckWHEREgroupname='%{Sql-Group}'ORDERBYid->SELECTid,groupname,attribute,Value,opFROMradgroupcheckWHEREgroupname='1Hour'ORDERBYid[sql]Userfoundingroup1Hour[sql]expand:SELECTid,groupname,attribute,value,opFROMradgroupreplyWHEREgroupname='%{Sql-Group}'ORDERBYid->SELECTid,groupname,attribute,value,opFROMradgroupreplyWHEREgroupname='1Hour'ORDERBYid[sql]expand:SELECTid,groupname,attribute,Value,opFROMradgroupcheckWHEREgroupname='%{Sql-Group}'ORDERBYid->SELECTid,groupname,attribute,Value,opFROMradgroupcheckWHEREgroupname='BW-384Kb'ORDERBYid[sql]UserfoundingroupBW-384Kb[sql]expand:SELECTid,groupname,attribute,value,opFROMradgroupreplyWHEREgroupname='%{Sql-Group}'ORDERBYid->SELECTid,groupname,attribute,value,opFROMradgroupreplyWHEREgroupname='BW-384Kb'ORDERBYidrlm_sql(sql):Releasedsqlsocketid:0++++++[sql]returnsok++++++?if(ok)?Evaluating(ok)->TRUE++++++?if(ok)->TRUE++++++-enteringif(ok){...}+++++++?if(("%{control:Rd-Account-Disabled}")&&("%{control:Rd-Account-Disabled}"==1))expand:%{control:Rd-Account-Disabled} -> 0??Evaluating("%{control:Rd-Account-Disabled}")->FALSE??Skipping("%{control:Rd-Account-Disabled}"==1)+++++++?if(("%{control:Rd-Account-Disabled}")&&("%{control:Rd-Account-Disabled}"==1))->FALSE+++++++?if("%{control:Rd-Account-Activation-Time}")expand:%{control:Rd-Account-Activation-Time} -> ?Evaluating("%{control:Rd-Account-Activation-Time}")->FALSE+++++++?if("%{control:Rd-Account-Activation-Time}")->FALSE+++++++?if("%{control:Rd-Realm}")expand:%{control:Rd-Realm} -> TVCabo?Evaluating("%{control:Rd-Realm}")->TRUE+++++++?if("%{control:Rd-Realm}")->TRUE+++++++-enteringif("%{control:Rd-Realm}"){...}expand:%{control:Rd-Realm} -> TVCabo++++++++[request]returnsok+++++++-if("%{control:Rd-Realm}")returnsok+++++++?if(("%{control:Rd-Auth-Type}")&&("%{control:Rd-Auth-Type}"!='sql'))expand:%{control:Rd-Auth-Type} -> ??Evaluating("%{control:Rd-Auth-Type}")->FALSE??Skipping("%{control:Rd-Auth-Type}"!='sql')+++++++?if(("%{control:Rd-Auth-Type}")&&("%{control:Rd-Auth-Type}"!='sql'))->FALSE+++++++-enteringpolicyRADIUSdesk_data_counter{...}++++++++?if((control:Rd-Total-Data)&&(control:Rd-Reset-Type-Data)&&(control:Rd-Cap-Type-Data=='hard'))??Evaluating(control:Rd-Total-Data)->FALSE??Skipping(control:Rd-Reset-Type-Data)??Skipping(control:Rd-Cap-Type-Data=='hard')++++++++?if((control:Rd-Total-Data)&&(control:Rd-Reset-Type-Data)&&(control:Rd-Cap-Type-Data=='hard'))->FALSE+++++++-policyRADIUSdesk_data_counterreturnsok+++++++-enteringpolicyRADIUSdesk_time_counter{...}++++++++?if((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time=='hard'))??Evaluating(control:Rd-Total-Time)->TRUE??Evaluating(control:Rd-Reset-Type-Time)->TRUE??Evaluating(control:Rd-Cap-Type-Time=='hard')->TRUE++++++++?if((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time=='hard'))->TRUE++++++++-enteringif((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time=='hard')){...}rlm_perl:AddedpairUser-Name=fazevedorlm_perl:AddedpairUser-Password=passwordrlm_perl:AddedpairRealm=TVCaborlm_perl:AddedpairNAS-IP-Address=127.0.0.1rlm_perl:AddedpairWISPr-Bandwidth-Max-Up=384000rlm_perl:AddedpairWISPr-Bandwidth-Max-Down=384000rlm_perl:AddedpairCleartext-Password=passwordrlm_perl:AddedpairRd-Not-Track-Auth=1rlm_perl:AddedpairRd-Realm=TVCaborlm_perl:AddedpairRd-Reset-Type-Time=neverrlm_perl:AddedpairRd-Total-Time=3600rlm_perl:AddedpairRd-User-Type=userrlm_perl:AddedpairUser-Profile=Time-Standard-1Hourrlm_perl:AddedpairRd-Tmp-Owner=rlm_perl:AddedpairRd-Cap-Type-Time=hardrlm_perl:AddedpairRd-Account-Disabled=0+++++++++[pl_reset_time_for_time]returnsnoop+++++++++?if(updated)?Evaluating(updated)->FALSE+++++++++?if(updated)->FALSE+++++++++-enteringelseelse{...}++++++++++?if("%{control:Rd-Tmp-Avail-Time}")expand:%{control:Rd-Tmp-Avail-Time} -> ?Evaluating("%{control:Rd-Tmp-Avail-Time}")->FALSE++++++++++?if("%{control:Rd-Tmp-Avail-Time}")->FALSE++++++++++-enteringelseelse{...}sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTIFNULL(SUM(AcctSessionTime),0)FROMradacctWHEREusername='%{request:User-Name}'->SELECTIFNULL(SUM(AcctSessionTime),0)FROMradacctWHEREusername='fazevedo'rlm_sql(sql):Reservingsqlsocketid:4sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:4expand:%{sql:SELECT IFNULL(SUM(AcctSessionTime),0) FROM radacct WHERE username='%{request:User-Name}'} -> 0+++++++++++[control]returnsnoop++++++++++-elseelsereturnsnoop+++++++++-elseelsereturnsnooprlm_perl:Rd-Tmp-Avail-Timedoesnotexist.Setitequalto3600rlm_perl:AddedpairUser-Name=fazevedorlm_perl:AddedpairUser-Password=passwordrlm_perl:AddedpairSQL-User-Name=fazevedorlm_perl:AddedpairRealm=TVCaborlm_perl:AddedpairNAS-IP-Address=127.0.0.1rlm_perl:AddedpairWISPr-Bandwidth-Max-Up=384000rlm_perl:AddedpairWISPr-Bandwidth-Max-Down=384000rlm_perl:AddedpairRd-Avail-Time=3600rlm_perl:AddedpairCleartext-Password=passwordrlm_perl:AddedpairRd-Realm=TVCaborlm_perl:AddedpairRd-Not-Track-Auth=1rlm_perl:AddedpairRd-User-Type=userrlm_perl:AddedpairRd-Total-Time=3600rlm_perl:AddedpairRd-Reset-Type-Time=neverrlm_perl:AddedpairUser-Profile=Time-Standard-1Hourrlm_perl:AddedpairRd-Tmp-Owner=rlm_perl:AddedpairRd-Cap-Type-Time=hardrlm_perl:AddedpairRd-Account-Disabled=0rlm_perl:AddedpairRd-Used-Time=0rlm_perl:AddedpairRd-Tmp-Avail-Time=3600+++++++++[pl_check_usage_time]returnsupdated++++++++-if((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time=='hard'))returnsupdated+++++++-policyRADIUSdesk_time_counterreturnsupdated+++++++-enteringpolicyRADIUSdesk_voucher_check{...}++++++++?if("%{control:Rd-Voucher}")expand:%{control:Rd-Voucher} -> ?Evaluating("%{control:Rd-Voucher}")->FALSE++++++++?if("%{control:Rd-Voucher}")->FALSE+++++++-policyRADIUSdesk_voucher_checkreturnsupdated+++++++-enteringpolicyRADIUSdesk_realm_nas_check{...}++++++++?if("%{request:NAS-Identifier}")expand:%{request:NAS-Identifier} -> ?Evaluating("%{request:NAS-Identifier}")->FALSE++++++++?if("%{request:NAS-Identifier}")->FALSE++++++++?if("%{request:NAS-IP-Address}")expand:%{request:NAS-IP-Address} -> 127.0.0.1?Evaluating("%{request:NAS-IP-Address}")->TRUE++++++++?if("%{request:NAS-IP-Address}")->TRUE++++++++-enteringif("%{request:NAS-IP-Address}"){...}+++++++++?if("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}">0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTCOUNT(na_realms.id)AScountFROMnasLEFTJOINna_realmsONnas.id=na_realms.na_idWHEREnas.nasname='%{request:NAS-IP-Address}'->SELECTCOUNT(na_realms.id)AScountFROMnasLEFTJOINna_realmsONnas.id=na_realms.na_idWHEREnas.nasname='127.0.0.1'rlm_sql(sql):Reservingsqlsocketid:3sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:3expand:%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'} -> 0?Evaluating("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}">0)->FALSE+++++++++?if("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}">0)->FALSE++++++++-if("%{request:NAS-IP-Address}")returnsupdated+++++++-policyRADIUSdesk_realm_nas_checkreturnsupdated++++++-if(ok)returnsupdated+++++-policyRADIUSdesk_user_checkreturnsupdated++++-elseelsereturnsupdated+++-policyRADIUSdesk_mainreturnsupdated++-if(!EAP-Message)returnsupdated++...skippingelseforrequest2:Preceding"if"wastaken++[files]returnsnoop++[expiration]returnsnoop++[logintime]returnsnoop++-enteringpolicyRADIUSdesk_session_timeout{...}+++?if("%{reply:Session-Timeout}")expand:%{reply:Session-Timeout} -> ?Evaluating("%{reply:Session-Timeout}")->FALSE+++?if("%{reply:Session-Timeout}")->FALSE+++-enteringelseelse{...}++++?if(("%{control:Rd-Avail-Time}")&&("%{control:Rd-Voucher-Timeout}"))expand:%{control:Rd-Avail-Time} -> 3600??Evaluating("%{control:Rd-Avail-Time}")->TRUEexpand:%{control:Rd-Voucher-Timeout} -> ??Evaluating("%{control:Rd-Voucher-Timeout}")->FALSE++++?if(("%{control:Rd-Avail-Time}")&&("%{control:Rd-Voucher-Timeout}"))->FALSE++++?elsif("%{control:Rd-Avail-Time}")expand:%{control:Rd-Avail-Time} -> 3600?Evaluating("%{control:Rd-Avail-Time}")->TRUE++++?elsif("%{control:Rd-Avail-Time}")->TRUE++++-enteringelsif("%{control:Rd-Avail-Time}"){...}expand:%{control:Rd-Avail-Time} -> 3600+++++[reply]returnsnoop++++-elsif("%{control:Rd-Avail-Time}")returnsnoop++++...skippingelsifforrequest2:Preceding"if"wastaken+++-elseelsereturnsnoop++-policyRADIUSdesk_session_timeoutreturnsnoop++?if(("%{control:Rd-User-Type}"=='device')&&(!"%{control:Auth-Type}"))expand:%{control:Rd-User-Type} -> user??Evaluating("%{control:Rd-User-Type}"=='device')->FALSE??Skipping("%{control:Auth-Type}")++?if(("%{control:Rd-User-Type}"=='device')&&(!"%{control:Auth-Type}"))->FALSE++[pap]returnsupdatedFoundAuth-Type=PAP# Executing group from file /usr/local/etc/raddb/sites-enabled/default+-enteringgroupPAP{...}[pap]loginattemptwithpassword"password"[pap]Usingcleartextpassword"password"[pap]Userauthenticatedsuccessfully++[pap]returnsok# Executing section post-auth from file /usr/local/etc/raddb/sites-enabled/default+-enteringgrouppost-auth{...}++-enteringpolicyRADIUSdesk_last_accept{...}+++?if("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}">0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(username)FROM`users`whereusername='%{User-Name}'->SELECTcount(username)FROM`users`whereusername='fazevedo'rlm_sql(sql):Reservingsqlsocketid:2sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:2expand:%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'} -> 1?Evaluating("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}">0)->TRUE+++?if("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}">0)->TRUE+++-enteringif("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}">0){...}sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:UPDATE`users`SETlast_accept_time=now(),last_accept_nas='%{NAS-IP-Address}'whereusername='%{User-Name}'->UPDATE`users`SETlast_accept_time=now(),last_accept_nas='127.0.0.1'whereusername='fazevedo'rlm_sql(sql):Reservingsqlsocketid:1rlm_sql(sql):Releasedsqlsocketid:1expand:%{sql:UPDATE `users` SET last_accept_time=now(),last_accept_nas='%{NAS-IP-Address}' where username='%{User-Name}'} -> 1++++[expand]returnsnoop+++-if("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}">0)returnsnoop+++?if("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}">0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(name)FROM`devices`wherename='%{Calling-Station-Id}'->SELECTcount(name)FROM`devices`wherename=''rlm_sql(sql):Reservingsqlsocketid:0sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:0expand:%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'} -> 0?Evaluating("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}">0)->FALSE+++?if("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}">0)->FALSE+++?if("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}">0)sql_xlatexpand:%{User-Name} -> fazevedosql_set_userescapeduser-->'fazevedo'expand:SELECTcount(name)FROM`vouchers`wherename='%{User-Name}'->SELECTcount(name)FROM`vouchers`wherename='fazevedo'rlm_sql(sql):Reservingsqlsocketid:4sql_xlatfinishedrlm_sql(sql):Releasedsqlsocketid:4expand:%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'} -> 0?Evaluating("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}">0)->FALSE+++?if("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}">0)->FALSE++-policyRADIUSdesk_last_acceptreturnsnoop++-enteringpolicyRADIUSdesk_post_auth{...}+++?if(EAP-Message)?Evaluating(EAP-Message)->FALSE+++?if(EAP-Message)->FALSE+++?if((!"%{control:Rd-Not-Track-Auth}")||("%{control:Rd-Not-Track-Auth}"!=1))expand:%{control:Rd-Not-Track-Auth} -> 1??Evaluating!("%{control:Rd-Not-Track-Auth}")->FALSEexpand:%{control:Rd-Not-Track-Auth} -> 1??Evaluating("%{control:Rd-Not-Track-Auth}"!=1)->FALSE+++?if((!"%{control:Rd-Not-Track-Auth}")||("%{control:Rd-Not-Track-Auth}"!=1))->FALSE++-policyRADIUSdesk_post_authreturnsnoop++-enteringpolicyRADIUSdesk_auto_devices_check{...}+++?if(("%{request:User-Name}")&&("%{request:Calling-Station-Id}"))expand:%{request:User-Name} -> fazevedo??Evaluating("%{request:User-Name}")->TRUEexpand:%{request:Calling-Station-Id} -> ??Evaluating("%{request:Calling-Station-Id}")->FALSE+++?if(("%{request:User-Name}")&&("%{request:Calling-Station-Id}"))->FALSE++-policyRADIUSdesk_auto_devices_checkreturnsnoop++[exec]returnsnoopSendingAccess-Acceptofid206to127.0.0.1port39140WISPr-Bandwidth-Max-Up=384000WISPr-Bandwidth-Max-Down=384000Session-Timeout=3600Finishedrequest2.GoingtothenextrequestWakingupin4.9seconds.Cleaninguprequest2ID206withtimestamp+807Readytoprocessrequests.
Last edit: Fernando Azevedo 2013-10-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
While fighting against this odd issue, I have a simple question to try and understand what is going on:
When working with ChilliSpot (prior to CoovaChilli) there used to be a parameter 'UAMSECRET' used in the https authentication process. Is that the same for the 'HS_UAMSECRET' that is used now? Where is this parameter configured on the RADIUSDesk side?
Cheers,
Fernando
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Late reply; I'm catching up today. The UAMSECRET and HS_UAMSECRET is the same, yes.
This has to be the same as the one specified in /var/www/rd_login_pages/services/uam.php (if you run Apache) or /usr/share/nginx/www/rd_login_pages/services/uam.php if you run Nginx.
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Afterwards, the machine just started with some weird sudo errors and I decided to just drop it and build a new one from scratch and everything went just fine. It turned out to be a Ubuntu related issue and the machine was just messed up.
Thanks,
Fernando
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All,
Is it possible to have RADIUSDesk and FreeRADIUS running on different machines? Has anyone tested such a scenario?
Thank you,
Fernando
Hi Fernando,
It should be possible, just also remember to change the settings on FreeRADIUS to point to the external DB instead of the local one.
The only functionality which you will not have will be the Websocket logfile viewer and debug viewer for FreeRADIUS since FreeRADIUS will not be running on the machine that has the web server etc....
Hi Dirk,
I'll let you know the result as soon as I finish implementing it. In the meantime I am installing everything (again) in a single production machine because when installing in different ones (MySQL + FreeRADIUS and RADIUSDesk + Centralised Captive Portal) I get a weird "Double check NAS Secret" error... (and YES... I've double tripled checked the NAS secrets...)
Cheers,
Fernando
Hi Fernando,
There is a NAS defined also in the clients file of FreeRADIUS. Either remove that NAS or ensure it is the same as the one (in all settings) defined in the DB.
Kind regards
Hi Dirk,
I've commented out the localhost section on the clients file of FreeRADIUS. Localhost is being loaded through SQL.
The other NAS I have configured is also well loaded through SQL, as per the following logs:
However, I keep getting an "Authentication failure please try again" error message.
From the FreeRadius logs I get:
But I am sure about the "password" password that I am typing... Also, When I use the embedded Radius client in RADIUSDEsk the outcome is positive:
Any hints where I should be looking for what I am doing wrong?
Cheers,
Fernando
PS: The full log files are bellow:
Last edit: Fernando Azevedo 2013-10-22
Hi Dirk,
While fighting against this odd issue, I have a simple question to try and understand what is going on:
When working with ChilliSpot (prior to CoovaChilli) there used to be a parameter 'UAMSECRET' used in the https authentication process. Is that the same for the 'HS_UAMSECRET' that is used now? Where is this parameter configured on the RADIUSDesk side?
Cheers,
Fernando
Hi Fernando,
Late reply; I'm catching up today. The UAMSECRET and HS_UAMSECRET is the same, yes.
This has to be the same as the one specified in /var/www/rd_login_pages/services/uam.php (if you run Apache) or /usr/share/nginx/www/rd_login_pages/services/uam.php if you run Nginx.
Regards
Hi Fernando,
Did you modify yhe HS_UAMSECRET? then be use it also is the same in the uam.php file. I suppose that's the problem.
Regards
Hi Dirk,
I've followed all that and nothing... :-(
Afterwards, the machine just started with some weird sudo errors and I decided to just drop it and build a new one from scratch and everything went just fine. It turned out to be a Ubuntu related issue and the machine was just messed up.
Thanks,
Fernando