StrongSwan IKEv2 - eap-radius - Auth Failing

Chris Myburgh chris.myburgh1 at gmail.com
Wed Sep 15 23:00:23 CEST 2021


Success!  Thanks a lot Matthew - really appreciate your help and the
quick response.

Now I need to proceed with assigning the IP's from radius!

Here is the log just in case you wanted to see it.

FreeRADIUS Version 3.0.23
Copyright (C) 1999-2021 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
Starting - reading configuration files ...
including dictionary file /usr/share/freeradius/dictionary
including dictionary file /usr/share/freeradius/dictionary.dhcp
including dictionary file /usr/share/freeradius/dictionary.vqp
including dictionary file /etc/raddb/dictionary
including configuration file /etc/raddb/radiusd.conf
including configuration file /etc/raddb/clients.conf
including files in directory /etc/raddb/mods-enabled/
including configuration file /etc/raddb/mods-enabled/mschap
including configuration file /etc/raddb/mods-enabled/passwd
including configuration file /etc/raddb/mods-enabled/always
including configuration file /etc/raddb/mods-enabled/detail.log
including configuration file /etc/raddb/mods-enabled/exec
including configuration file /etc/raddb/mods-enabled/ntlm_auth
including configuration file /etc/raddb/mods-enabled/dynamic_clients
including configuration file /etc/raddb/mods-enabled/unpack
including configuration file /etc/raddb/mods-enabled/realm
including configuration file /etc/raddb/mods-enabled/detail
including configuration file /etc/raddb/mods-enabled/preprocess
including configuration file /etc/raddb/mods-enabled/expr
including configuration file /etc/raddb/mods-enabled/soh
including configuration file /etc/raddb/mods-enabled/files
including configuration file /etc/raddb/mods-enabled/cache_eap
including configuration file /etc/raddb/mods-enabled/eap
including configuration file /etc/raddb/mods-enabled/replicate
including configuration file /etc/raddb/mods-enabled/chap
including configuration file /etc/raddb/mods-enabled/expiration
including configuration file /etc/raddb/mods-enabled/logintime
including configuration file /etc/raddb/mods-enabled/echo
including configuration file /etc/raddb/mods-enabled/sradutmp
including configuration file /etc/raddb/mods-enabled/radutmp
including configuration file /etc/raddb/mods-enabled/date
including configuration file /etc/raddb/mods-enabled/attr_filter
including configuration file /etc/raddb/mods-enabled/digest
including configuration file /etc/raddb/mods-enabled/unix
including configuration file /etc/raddb/mods-enabled/sql
including configuration file /etc/raddb/mods-config/sql/main/mysql/queries.conf
including configuration file /etc/raddb/mods-enabled/pap
including configuration file /etc/raddb/mods-enabled/totp
including configuration file /etc/raddb/mods-enabled/utf8
including configuration file /etc/raddb/mods-enabled/linelog
including configuration file /etc/raddb/mods-enabled/sqlippool
including configuration file
/etc/raddb/mods-config/sql/ippool/mysql/queries.conf
including files in directory /etc/raddb/policy.d/
including configuration file /etc/raddb/policy.d/dhcp
including configuration file /etc/raddb/policy.d/cui
including configuration file /etc/raddb/policy.d/rfc7542
including configuration file /etc/raddb/policy.d/control
including configuration file /etc/raddb/policy.d/accounting
including configuration file /etc/raddb/policy.d/eap
including configuration file /etc/raddb/policy.d/filter
including configuration file /etc/raddb/policy.d/moonshot-targeted-ids
including configuration file /etc/raddb/policy.d/operator-name
including configuration file /etc/raddb/policy.d/abfab-tr
including configuration file /etc/raddb/policy.d/debug
including configuration file /etc/raddb/policy.d/canonicalization
including files in directory /etc/raddb/sites-enabled/
including configuration file /etc/raddb/sites-enabled/inner-tunnel
including configuration file /etc/raddb/sites-enabled/default
main {
 security {
  user = "root"
  group = "root"
  allow_core_dumps = no
 }
  name = "radiusd"
  prefix = "/usr"
  localstatedir = "/var"
  logdir = "/var/log/radius"
  run_dir = "/var/run/radiusd"
}
main {
  name = "radiusd"
  prefix = "/usr"
  localstatedir = "/var"
  sbindir = "/usr/sbin"
  logdir = "/var/log/radius"
  run_dir = "/var/run/radiusd"
  libdir = "/usr/lib/freeradius"
  radacctdir = "/var/log/radius/radacct"
  hostname_lookups = no
  max_request_time = 30
  cleanup_delay = 5
  max_requests = 16384
  postauth_client_lost = no
  pidfile = "/var/run/radiusd/radiusd.pid"
  checkrad = "/usr/sbin/checkrad"
  debug_level = 0
  proxy_requests = no
 log {
  stripped_names = no
  auth = yes
  auth_badpass = yes
  auth_goodpass = yes
  colourise = yes
  msg_denied = "You are already logged in - access denied"
 }
 resources {
 }
 security {
  max_attributes = 200
  reject_delay = 1.000000
  status_server = yes
  allow_vulnerable_openssl = "CVE-2016-6309"
 }
}
radiusd: #### Loading Realms and Home Servers ####
radiusd: #### Loading Clients ####
 client localhost {
  ipaddr = 127.0.0.1
  require_message_authenticator = no
  secret = <<< secret >>>
  nas_type = "other"
  proto = "*"
  limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
  }
 }
 client localhost_ipv6 {
  ipv6addr = ::1
  require_message_authenticator = no
  secret = <<< secret >>>
  limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
  }
 }
 client rad_clients {
  ipaddr = 0.0.0.0/0
  require_message_authenticator = no
  secret = <<< secret >>>
  nas_type = "other"
  limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
  }
 }
Found debugger attached
 # Creating Auth-Type = mschap
 # Creating Auth-Type = eap
 # Creating Auth-Type = PAP
 # Creating Auth-Type = CHAP
 # Creating Auth-Type = MS-CHAP
radiusd: #### Instantiating modules ####
 modules {
  # Loaded module rlm_mschap
  # Loading module "mschap" from file /etc/raddb/mods-enabled/mschap
  mschap {
    use_mppe = yes
    require_encryption = no
    require_strong = no
    with_ntdomain_hack = yes
   passchange {
   }
    allow_retry = yes
    winbind_retry_with_normalised_username = no
  }
  # Loaded module rlm_passwd
  # Loading module "etc_passwd" from file /etc/raddb/mods-enabled/passwd
  passwd etc_passwd {
    filename = "/etc/passwd"
    format = "*User-Name:Crypt-Password:"
    delimiter = ":"
    ignore_nislike = no
    ignore_empty = yes
    allow_multiple_keys = no
    hash_size = 100
  }
  # Loaded module rlm_always
  # Loading module "reject" from file /etc/raddb/mods-enabled/always
  always reject {
    rcode = "reject"
    simulcount = 0
    mpp = no
  }
  # Loading module "fail" from file /etc/raddb/mods-enabled/always
  always fail {
    rcode = "fail"
    simulcount = 0
    mpp = no
  }
  # Loading module "ok" from file /etc/raddb/mods-enabled/always
  always ok {
    rcode = "ok"
    simulcount = 0
    mpp = no
  }
  # Loading module "handled" from file /etc/raddb/mods-enabled/always
  always handled {
    rcode = "handled"
    simulcount = 0
    mpp = no
  }
  # Loading module "invalid" from file /etc/raddb/mods-enabled/always
  always invalid {
    rcode = "invalid"
    simulcount = 0
    mpp = no
  }
  # Loading module "userlock" from file /etc/raddb/mods-enabled/always
  always userlock {
    rcode = "userlock"
    simulcount = 0
    mpp = no
  }
  # Loading module "notfound" from file /etc/raddb/mods-enabled/always
  always notfound {
    rcode = "notfound"
    simulcount = 0
    mpp = no
  }
  # Loading module "noop" from file /etc/raddb/mods-enabled/always
  always noop {
    rcode = "noop"
    simulcount = 0
    mpp = no
  }
  # Loading module "updated" from file /etc/raddb/mods-enabled/always
  always updated {
    rcode = "updated"
    simulcount = 0
    mpp = no
  }
  # Loaded module rlm_detail
  # Loading module "auth_log" from file /etc/raddb/mods-enabled/detail.log
  detail auth_log {
    filename = "/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/auth-detail-%Y%m%d"
    header = "%t"
    permissions = 384
    locking = no
    escape_filenames = no
    log_packet_header = no
  }
  # Loading module "reply_log" from file /etc/raddb/mods-enabled/detail.log
  detail reply_log {
    filename = "/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/reply-detail-%Y%m%d"
    header = "%t"
    permissions = 384
    locking = no
    escape_filenames = no
    log_packet_header = no
  }
  # Loading module "pre_proxy_log" from file /etc/raddb/mods-enabled/detail.log
  detail pre_proxy_log {
    filename = "/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/pre-proxy-detail-%Y%m%d"
    header = "%t"
    permissions = 384
    locking = no
    escape_filenames = no
    log_packet_header = no
  }
  # Loading module "post_proxy_log" from file /etc/raddb/mods-enabled/detail.log
  detail post_proxy_log {
    filename = "/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/post-proxy-detail-%Y%m%d"
    header = "%t"
    permissions = 384
    locking = no
    escape_filenames = no
    log_packet_header = no
  }
  # Loaded module rlm_exec
  # Loading module "exec" from file /etc/raddb/mods-enabled/exec
  exec {
    wait = no
    input_pairs = "request"
    shell_escape = yes
    timeout = 10
  }
  # Loading module "ntlm_auth" from file /etc/raddb/mods-enabled/ntlm_auth
  exec ntlm_auth {
    wait = yes
    program = "/path/to/ntlm_auth --request-nt-key --domain=MYDOMAIN
--username=%{mschap:User-Name} --password=%{User-Password}"
    shell_escape = yes
  }
  # Loaded module rlm_dynamic_clients
  # Loading module "dynamic_clients" from file
/etc/raddb/mods-enabled/dynamic_clients
  # Loaded module rlm_unpack
  # Loading module "unpack" from file /etc/raddb/mods-enabled/unpack
  # Loaded module rlm_realm
  # Loading module "IPASS" from file /etc/raddb/mods-enabled/realm
  realm IPASS {
    format = "prefix"
    delimiter = "/"
    ignore_default = no
    ignore_null = no
  }
  # Loading module "suffix" from file /etc/raddb/mods-enabled/realm
  realm suffix {
    format = "suffix"
    delimiter = "@"
    ignore_default = no
    ignore_null = no
  }
  # Loading module "realmpercent" from file /etc/raddb/mods-enabled/realm
  realm realmpercent {
    format = "suffix"
    delimiter = "%"
    ignore_default = no
    ignore_null = no
  }
  # Loading module "ntdomain" from file /etc/raddb/mods-enabled/realm
  realm ntdomain {
    format = "prefix"
    delimiter = "\\"
    ignore_default = no
    ignore_null = no
  }
  # Loading module "detail" from file /etc/raddb/mods-enabled/detail
  detail {
    filename = "/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d"
    header = "%t"
    permissions = 384
    locking = no
    escape_filenames = no
    log_packet_header = no
  }
  # Loaded module rlm_preprocess
  # Loading module "preprocess" from file /etc/raddb/mods-enabled/preprocess
  preprocess {
    huntgroups = "/etc/raddb/mods-config/preprocess/huntgroups"
    hints = "/etc/raddb/mods-config/preprocess/hints"
    with_ascend_hack = no
    ascend_channels_per_line = 23
    with_ntdomain_hack = no
    with_specialix_jetstream_hack = no
    with_cisco_vsa_hack = no
    with_alvarion_vsa_hack = no
  }
  # Loaded module rlm_expr
  # Loading module "expr" from file /etc/raddb/mods-enabled/expr
  expr {
    safe_characters =
"@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_:
/äéöüàâæçèéêëîïôœùûüaÿÄÉÖÜßÀÂÆÇÈÉÊËÎÏÔŒÙÛÜŸ"
  }
  # Loaded module rlm_soh
  # Loading module "soh" from file /etc/raddb/mods-enabled/soh
  soh {
    dhcp = yes
  }
  # Loaded module rlm_files
  # Loading module "files" from file /etc/raddb/mods-enabled/files
  files {
    filename = "/etc/raddb/mods-config/files/authorize"
    acctusersfile = "/etc/raddb/mods-config/files/accounting"
    preproxy_usersfile = "/etc/raddb/mods-config/files/pre-proxy"
  }
  # Loaded module rlm_cache
  # Loading module "cache_eap" from file /etc/raddb/mods-enabled/cache_eap
  cache cache_eap {
    driver = "rlm_cache_rbtree"
    key = "%{%{control:State}:-%{%{reply:State}:-%{State}}}"
    ttl = 15
    max_entries = 0
    epoch = 0
    add_stats = no
  }
  # Loaded module rlm_eap
  # Loading module "eap" from file /etc/raddb/mods-enabled/eap
  eap {
    default_eap_type = "mschapv2"
    timer_expire = 60
    ignore_unknown_eap_types = no
    cisco_accounting_username_bug = no
    max_sessions = 16384
  }
  # Loaded module rlm_replicate
  # Loading module "replicate" from file /etc/raddb/mods-enabled/replicate
  # Loaded module rlm_chap
  # Loading module "chap" from file /etc/raddb/mods-enabled/chap
  # Loaded module rlm_expiration
  # Loading module "expiration" from file /etc/raddb/mods-enabled/expiration
  # Loaded module rlm_logintime
  # Loading module "logintime" from file /etc/raddb/mods-enabled/logintime
  logintime {
    minimum_timeout = 60
  }
  # Loading module "echo" from file /etc/raddb/mods-enabled/echo
  exec echo {
    wait = yes
    program = "/bin/echo %{User-Name}"
    input_pairs = "request"
    output_pairs = "reply"
    shell_escape = yes
  }
  # Loaded module rlm_radutmp
  # Loading module "sradutmp" from file /etc/raddb/mods-enabled/sradutmp
  radutmp sradutmp {
    filename = "/var/log/radius/sradutmp"
    username = "%{User-Name}"
    case_sensitive = yes
    check_with_nas = yes
    permissions = 420
    caller_id = no
  }
  # Loading module "radutmp" from file /etc/raddb/mods-enabled/radutmp
  radutmp {
    filename = "/var/log/radius/radutmp"
    username = "%{User-Name}"
    case_sensitive = yes
    check_with_nas = yes
    permissions = 384
    caller_id = yes
  }
  # Loaded module rlm_date
  # Loading module "date" from file /etc/raddb/mods-enabled/date
  date {
    format = "%b %e %Y %H:%M:%S %Z"
    utc = no
  }
  # Loaded module rlm_attr_filter
  # Loading module "attr_filter.post-proxy" from file
/etc/raddb/mods-enabled/attr_filter
  attr_filter attr_filter.post-proxy {
    filename = "/etc/raddb/mods-config/attr_filter/post-proxy"
    key = "%{Realm}"
    relaxed = no
  }
  # Loading module "attr_filter.pre-proxy" from file
/etc/raddb/mods-enabled/attr_filter
  attr_filter attr_filter.pre-proxy {
    filename = "/etc/raddb/mods-config/attr_filter/pre-proxy"
    key = "%{Realm}"
    relaxed = no
  }
  # Loading module "attr_filter.access_reject" from file
/etc/raddb/mods-enabled/attr_filter
  attr_filter attr_filter.access_reject {
    filename = "/etc/raddb/mods-config/attr_filter/access_reject"
    key = "%{User-Name}"
    relaxed = no
  }
  # Loading module "attr_filter.access_challenge" from file
/etc/raddb/mods-enabled/attr_filter
  attr_filter attr_filter.access_challenge {
    filename = "/etc/raddb/mods-config/attr_filter/access_challenge"
    key = "%{User-Name}"
    relaxed = no
  }
  # Loading module "attr_filter.accounting_response" from file
/etc/raddb/mods-enabled/attr_filter
  attr_filter attr_filter.accounting_response {
    filename = "/etc/raddb/mods-config/attr_filter/accounting_response"
    key = "%{User-Name}"
    relaxed = no
  }
  # Loaded module rlm_digest
  # Loading module "digest" from file /etc/raddb/mods-enabled/digest
  # Loaded module rlm_unix
  # Loading module "unix" from file /etc/raddb/mods-enabled/unix
  unix {
    radwtmp = "/var/log/radius/radwtmp"
  }
Creating attribute Unix-Group
  # Loaded module rlm_sql
  # Loading module "sql" from file /etc/raddb/mods-enabled/sql
  sql {
    driver = "rlm_sql_mysql"
    server = "database-server"
    port = 3306
    login = "lhadmin"
    password = <<< secret >>>
    radius_db = "radius"
    read_groups = yes
    read_profiles = yes
    read_clients = yes
    delete_stale_sessions = yes
    sql_user_name = "%{User-Name}"
    default_user_profile = ""
    client_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"
    group_membership_query = "SELECT groupname FROM radusergroup WHERE
username = '%{SQL-User-Name}' ORDER BY priority"
    simul_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"
    safe_characters =
"@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_:
/"
    auto_escape = no
   accounting {
    reference = "%{tolower:type.%{Acct-Status-Type}.query}"
    type {
     accounting-on {
      query = "UPDATE radacct SET acctstoptime =
FROM_UNIXTIME(%{integer:Event-Timestamp}), acctsessiontime =
'%{integer:Event-Timestamp}' - UNIX_TIMESTAMP(acctstarttime),
acctterminatecause = '%{%{Acct-Terminate-Cause}:-NAS-Reboot}' WHERE
acctstoptime IS NULL AND nasipaddress   = '%{NAS-IP-Address}' AND
acctstarttime <= FROM_UNIXTIME(%{integer:Event-Timestamp})"
     }
     accounting-off {
      query = "UPDATE radacct SET acctstoptime =
FROM_UNIXTIME(%{integer:Event-Timestamp}), acctsessiontime =
'%{integer:Event-Timestamp}' - UNIX_TIMESTAMP(acctstarttime),
acctterminatecause = '%{%{Acct-Terminate-Cause}:-NAS-Reboot}' WHERE
acctstoptime IS NULL AND nasipaddress   = '%{NAS-IP-Address}' AND
acctstarttime <= FROM_UNIXTIME(%{integer:Event-Timestamp})"
     }
     start {
      query = "INSERT INTO radacct (acctsessionid,    acctuniqueid,
username, realm,      nasipaddress,   nasportid, nasporttype,
acctstarttime,    acctupdatetime, acctstoptime,   acctsessiontime,
acctauthentic, connectinfo_start, connectinfo_stop,   acctinputoctets,
acctoutputoctets,  calledstationid,  callingstationid,
acctterminatecause, servicetype,    framedprotocol, framedipaddress)
VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',
'%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}',
'%{%{NAS-Port-ID}:-%{NAS-Port}}', '%{NAS-Port-Type}',
FROM_UNIXTIME(%{integer:Event-Timestamp}),
FROM_UNIXTIME(%{integer:Event-Timestamp}), NULL, '0',
'%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0',
'%{Called-Station-Id}', '%{Calling-Station-Id}', '',
'%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}')"
     }
     interim-update {
      query = "UPDATE radacct SET acctupdatetime  =
(@acctupdatetime_old:=acctupdatetime), acctupdatetime  =
FROM_UNIXTIME(%{integer:Event-Timestamp}), acctinterval    =
%{integer:Event-Timestamp} - UNIX_TIMESTAMP(@acctupdatetime_old),
framedipaddress = '%{Framed-IP-Address}', acctsessiontime =
%{%{Acct-Session-Time}:-NULL}, acctinputoctets =
'%{%{Acct-Input-Gigawords}:-0}' << 32 | '%{%{Acct-Input-Octets}:-0}',
acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' << 32 |
'%{%{Acct-Output-Octets}:-0}' WHERE AcctUniqueId =
'%{Acct-Unique-Session-Id}'"
     }
     stop {
      query = "UPDATE radacct SET acctstoptime  =
FROM_UNIXTIME(%{integer:Event-Timestamp}), acctsessiontime  =
%{%{Acct-Session-Time}:-NULL}, acctinputoctets  =
'%{%{Acct-Input-Gigawords}:-0}' << 32 | '%{%{Acct-Input-Octets}:-0}',
acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' << 32 |
'%{%{Acct-Output-Octets}:-0}', acctterminatecause =
'%{Acct-Terminate-Cause}', connectinfo_stop = '%{Connect-Info}' WHERE
AcctUniqueId = '%{Acct-Unique-Session-Id}'"
     }
    }
   }
   post-auth {
    reference = ".query"
    query = "INSERT INTO radpostauth (username, pass, reply, authdate)
VALUES ( '%{SQL-User-Name}', '%{%{User-Password}:-%{Chap-Password}}',
'%{reply:Packet-Type}', '%S')"
   }
  }
rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
Creating attribute SQL-Group
  # Loaded module rlm_pap
  # Loading module "pap" from file /etc/raddb/mods-enabled/pap
  pap {
    normalise = yes
  }
  # Loaded module rlm_totp
  # Loading module "totp" from file /etc/raddb/mods-enabled/totp
  # Loaded module rlm_utf8
  # Loading module "utf8" from file /etc/raddb/mods-enabled/utf8
  # Loaded module rlm_linelog
  # Loading module "linelog" from file /etc/raddb/mods-enabled/linelog
  linelog {
    filename = "/var/log/radius/linelog"
    escape_filenames = no
    syslog_severity = "info"
    permissions = 384
    format = "This is a log message for %{User-Name}"
    reference = "messages.%{%{reply:Packet-Type}:-default}"
  }
  # Loading module "log_accounting" from file /etc/raddb/mods-enabled/linelog
  linelog log_accounting {
    filename = "/var/log/radius/linelog-accounting"
    escape_filenames = no
    syslog_severity = "info"
    permissions = 384
    format = ""
    reference = "Accounting-Request.%{%{Acct-Status-Type}:-unknown}"
  }
  # Loaded module rlm_sqlippool
  # Loading module "main_pool" from file /etc/raddb/mods-enabled/sqlippool
  sqlippool main_pool {
    sql_module_instance = "sql"
    lease_duration = 3600
    pool_name = "Pool-Name"
    default_pool = "main_pool"
    allow_duplicates = no
    attribute_name = "Framed-IP-Address"
    allocate_begin = "START TRANSACTION"
    allocate_clear = "UPDATE radippool SET nasipaddress = '', pool_key
= 0, callingstationid = '', username = '', expiry_time = NULL WHERE
expiry_time <= NOW() - INTERVAL 1 SECOND AND nasipaddress =
'%{%{Nas-IP-Address}:-%{Nas-IPv6-Address}}'"
    allocate_clear_timeout = 1
    allocate_existing = ""
    allocate_requested = ""
    allocate_find = "SELECT framedipaddress FROM radippool WHERE
pool_name = '%{control:Pool-Name}' AND (expiry_time < NOW() OR
expiry_time IS NULL) ORDER BY (username <> '%{User-Name}'),
(callingstationid <> '%{Calling-Station-Id}'), expiry_time LIMIT 1 FOR
UPDATE"
    allocate_update = "UPDATE radippool SET nasipaddress =
'%{NAS-IP-Address}', pool_key = '%{NAS-Port}', callingstationid =
'%{Calling-Station-Id}', username = '%{User-Name}', expiry_time =
NOW() + INTERVAL 3600 SECOND WHERE framedipaddress = '%I' AND
expiry_time IS NULL"
    allocate_commit = "COMMIT"
    pool_check = "SELECT id FROM radippool WHERE
pool_name='%{control:Pool-Name}' LIMIT 1"
    start_begin = ""
    start_update = "UPDATE radippool SET expiry_time = NOW() +
INTERVAL 3600 SECOND WHERE nasipaddress = '%{NAS-IP-Address}' AND
pool_key = '%{NAS-Port}' AND username = '%{User-Name}' AND
callingstationid = '%{Calling-Station-Id}' AND framedipaddress =
'%{Framed-IP-Address}'"
    start_commit = ""
    alive_begin = ""
    alive_update = "UPDATE radippool SET expiry_time = NOW() +
INTERVAL 3600 SECOND WHERE nasipaddress =
'%{%{Nas-IP-Address}:-%{Nas-IPv6-Address}}' AND pool_key =
'%{NAS-Port}' AND username = '%{User-Name}' AND callingstationid =
'%{Calling-Station-Id}' AND framedipaddress = '%{Framed-IP-Address}'"
    alive_commit = ""
    stop_begin = ""
    stop_clear = "UPDATE radippool SET nasipaddress = '', pool_key =
0, callingstationid = '', username = '', expiry_time = NULL WHERE
nasipaddress = '%{%{Nas-IP-Address}:-%{Nas-IPv6-Address}}' AND
pool_key = '%{NAS-Port}' AND username = '%{User-Name}' AND
callingstationid = '%{Calling-Station-Id}' AND framedipaddress =
'%{Framed-IP-Address}'"
    stop_commit = ""
    on_begin = ""
    on_clear = "UPDATE radippool SET nasipaddress = '', pool_key = 0,
callingstationid = '', username = '', expiry_time = NULL WHERE
nasipaddress = '%{%{Nas-IP-Address}:-%{Nas-IPv6-Address}}'"
    on_commit = ""
    off_begin = ""
    off_clear = "UPDATE radippool SET nasipaddress = '', pool_key = 0,
callingstationid = '', username = '', expiry_time = NULL WHERE
nasipaddress = '%{%{Nas-IP-Address}:-%{Nas-IPv6-Address}}'"
    off_commit = ""
   messages {
    exists = "Existing IP: %{reply:Framed-IP-Address} (did
%{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user
%{User-Name})"
    success = "Allocated IP: %{reply:Framed-IP-Address} from
%{control:Pool-Name} (did %{Called-Station-Id} cli
%{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
    clear = "Released IP Framed-IP-Address (did %{Called-Station-Id}
cli %{Calling-Station-Id} user %{User-Name})"
    failed = "IP Allocation FAILED from %{control:Pool-Name} (did
%{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user
%{User-Name})"
    nopool = "No Pool-Name defined (did %{Called-Station-Id} cli
%{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
   }
  }
  instantiate {
  }
  # Instantiating module "mschap" from file /etc/raddb/mods-enabled/mschap
rlm_mschap (mschap): using internal authentication
  # Instantiating module "etc_passwd" from file /etc/raddb/mods-enabled/passwd
rlm_passwd: nfields: 3 keyfield 0(User-Name) listable: no
  # Instantiating module "reject" from file /etc/raddb/mods-enabled/always
  # Instantiating module "fail" from file /etc/raddb/mods-enabled/always
  # Instantiating module "ok" from file /etc/raddb/mods-enabled/always
  # Instantiating module "handled" from file /etc/raddb/mods-enabled/always
  # Instantiating module "invalid" from file /etc/raddb/mods-enabled/always
  # Instantiating module "userlock" from file /etc/raddb/mods-enabled/always
  # Instantiating module "notfound" from file /etc/raddb/mods-enabled/always
  # Instantiating module "noop" from file /etc/raddb/mods-enabled/always
  # Instantiating module "updated" from file /etc/raddb/mods-enabled/always
  # Instantiating module "auth_log" from file /etc/raddb/mods-enabled/detail.log
rlm_detail (auth_log): 'User-Password' suppressed, will not appear in
detail output
  # Instantiating module "reply_log" from file
/etc/raddb/mods-enabled/detail.log
  # Instantiating module "pre_proxy_log" from file
/etc/raddb/mods-enabled/detail.log
  # Instantiating module "post_proxy_log" from file
/etc/raddb/mods-enabled/detail.log
  # Instantiating module "IPASS" from file /etc/raddb/mods-enabled/realm
  # Instantiating module "suffix" from file /etc/raddb/mods-enabled/realm
  # Instantiating module "realmpercent" from file /etc/raddb/mods-enabled/realm
  # Instantiating module "ntdomain" from file /etc/raddb/mods-enabled/realm
  # Instantiating module "detail" from file /etc/raddb/mods-enabled/detail
  # Instantiating module "preprocess" from file
/etc/raddb/mods-enabled/preprocess
reading pairlist file /etc/raddb/mods-config/preprocess/huntgroups
reading pairlist file /etc/raddb/mods-config/preprocess/hints
  # Instantiating module "files" from file /etc/raddb/mods-enabled/files
reading pairlist file /etc/raddb/mods-config/files/authorize
reading pairlist file /etc/raddb/mods-config/files/accounting
reading pairlist file /etc/raddb/mods-config/files/pre-proxy
  # Instantiating module "cache_eap" from file /etc/raddb/mods-enabled/cache_eap
rlm_cache (cache_eap): Driver rlm_cache_rbtree (module
rlm_cache_rbtree) loaded and linked
  # Instantiating module "eap" from file /etc/raddb/mods-enabled/eap
   # Linked to sub-module rlm_eap_md5
rlm_eap (EAP): Ignoring EAP method 'leap', because it is no longer supported
   # Linked to sub-module rlm_eap_gtc
   gtc {
    challenge = "Password: "
    auth_type = "PAP"
   }
   # Linked to sub-module rlm_eap_tls
   tls {
    tls = "tls-common"
   }
   tls-config tls-common {
    verify_depth = 0
    ca_path = "/etc/raddb/certs"
    pem_file_type = yes
    private_key_file = "/etc/raddb/certs/server.pem"
    certificate_file = "/etc/raddb/certs/server.pem"
    ca_file = "/etc/raddb/certs/ca.pem"
    private_key_password = <<< secret >>>
    dh_file = "/etc/raddb/certs/dh"
    fragment_size = 1024
    include_length = yes
    auto_chain = yes
    check_crl = no
    check_all_crl = no
    ca_path_reload_interval = 0
    cipher_list = "DEFAULT"
    cipher_server_preference = no
    ecdh_curve = "prime256v1"
    tls_min_version = "1.2"
    cache {
      enable = no
      lifetime = 24
      max_entries = 255
    }
    verify {
      skip_if_ocsp_ok = no
    }
    ocsp {
      enable = no
      override_cert_url = yes
      url = "http://127.0.0.1/ocsp/"
      use_nonce = yes
      timeout = 0
      softfail = no
    }
   }
   # Linked to sub-module rlm_eap_ttls
   ttls {
    tls = "tls-common"
    default_eap_type = "md5"
    copy_request_to_tunnel = no
    use_tunneled_reply = no
    virtual_server = "inner-tunnel"
    include_length = yes
    require_client_cert = no
   }
tls: Using cached TLS configuration from previous invocation
   # Linked to sub-module rlm_eap_peap
   peap {
    tls = "tls-common"
    default_eap_type = "mschapv2"
    copy_request_to_tunnel = no
    use_tunneled_reply = no
    proxy_tunneled_request_as_eap = yes
    virtual_server = "inner-tunnel"
    soh = no
    require_client_cert = no
   }
tls: Using cached TLS configuration from previous invocation
   # Linked to sub-module rlm_eap_mschapv2
   mschapv2 {
    with_ntdomain_hack = no
    send_error = no
   }
  # Instantiating module "expiration" from file
/etc/raddb/mods-enabled/expiration
  # Instantiating module "logintime" from file /etc/raddb/mods-enabled/logintime
  # Instantiating module "attr_filter.post-proxy" from file
/etc/raddb/mods-enabled/attr_filter
reading pairlist file /etc/raddb/mods-config/attr_filter/post-proxy
  # Instantiating module "attr_filter.pre-proxy" from file
/etc/raddb/mods-enabled/attr_filter
reading pairlist file /etc/raddb/mods-config/attr_filter/pre-proxy
  # Instantiating module "attr_filter.access_reject" from file
/etc/raddb/mods-enabled/attr_filter
reading pairlist file /etc/raddb/mods-config/attr_filter/access_reject
[/etc/raddb/mods-config/attr_filter/access_reject]:11 Check item
"FreeRADIUS-Response-Delay"  found in filter list for realm "DEFAULT".
[/etc/raddb/mods-config/attr_filter/access_reject]:11 Check item
"FreeRADIUS-Response-Delay-USec"   found in filter list for realm
"DEFAULT".
  # Instantiating module "attr_filter.access_challenge" from file
/etc/raddb/mods-enabled/attr_filter
reading pairlist file /etc/raddb/mods-config/attr_filter/access_challenge
  # Instantiating module "attr_filter.accounting_response" from file
/etc/raddb/mods-enabled/attr_filter
reading pairlist file /etc/raddb/mods-config/attr_filter/accounting_response
  # Instantiating module "sql" from file /etc/raddb/mods-enabled/sql
rlm_sql_mysql: libmysql version: 10.5.5
   mysql {
    tls {
      tls_required = no
      check_cert = no
      check_cert_cn = no
    }
    warnings = "auto"
   }
rlm_sql (sql): Attempting to connect to database "radius"
rlm_sql (sql): Initialising connection pool
   pool {
    start = 5
    min = 3
    max = 32
    spare = 10
    uses = 0
    lifetime = 0
    cleanup_interval = 30
    idle_timeout = 60
    retry_delay = 30
    spread = no
   }
rlm_sql (sql): Opening additional connection (0), 1 of 32 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'radius' on database-server via
TCP/IP, server version 5.7.33-log, protocol version 10
rlm_sql (sql): Opening additional connection (1), 1 of 31 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'radius' on database-server via
TCP/IP, server version 5.7.33-log, protocol version 10
rlm_sql (sql): Opening additional connection (2), 1 of 30 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'radius' on database-server via
TCP/IP, server version 5.7.33-log, protocol version 10
rlm_sql (sql): Opening additional connection (3), 1 of 29 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'radius' on database-server via
TCP/IP, server version 5.7.33-log, protocol version 10
rlm_sql (sql): Opening additional connection (4), 1 of 28 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'radius' on database-server via
TCP/IP, server version 5.7.33-log, protocol version 10
rlm_sql (sql): Processing generate_sql_clients
rlm_sql (sql) in generate_sql_clients: query is SELECT id, nasname,
shortname, type, secret, server FROM nas
rlm_sql (sql): Reserved connection (0)
rlm_sql (sql): Executing select query: SELECT id, nasname, shortname,
type, secret, server FROM nas
rlm_sql (sql): Released connection (0)
Need 5 more connections to reach 10 spares
rlm_sql (sql): Opening additional connection (5), 1 of 27 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'radius' on database-server via
TCP/IP, server version 5.7.33-log, protocol version 10
  # Instantiating module "pap" from file /etc/raddb/mods-enabled/pap
  # Instantiating module "linelog" from file /etc/raddb/mods-enabled/linelog
  # Instantiating module "log_accounting" from file
/etc/raddb/mods-enabled/linelog
  # Instantiating module "main_pool" from file /etc/raddb/mods-enabled/sqlippool
Ignoring "allocate_clear_timeout = 1", forcing to "allocate_clear_timeout = 1"
 } # modules
radiusd: #### Loading Virtual Servers ####
server { # from file /etc/raddb/radiusd.conf
} # server
server inner-tunnel { # from file /etc/raddb/sites-enabled/inner-tunnel
 # Loading authenticate {...}
Compiling Auth-Type PAP for attr Auth-Type
Compiling Auth-Type CHAP for attr Auth-Type
Compiling Auth-Type MS-CHAP for attr Auth-Type
 # Loading authorize {...}
Ignoring "ldap" (see raddb/mods-available/README.rst)
 # Loading session {...}
 # Loading post-auth {...}
 # Skipping contents of 'if' as it is always 'false' --
/etc/raddb/sites-enabled/inner-tunnel:331
Compiling Post-Auth-Type REJECT for attr Post-Auth-Type
} # server inner-tunnel
server default { # from file /etc/raddb/sites-enabled/default
 # Loading authenticate {...}
Compiling Auth-Type PAP for attr Auth-Type
Compiling Auth-Type CHAP for attr Auth-Type
Compiling Auth-Type MS-CHAP for attr Auth-Type
 # Loading authorize {...}
 # Loading preacct {...}
 # Skipping contents of 'if' as it is always 'false' --
/etc/raddb/policy.d/canonicalization:115
 # Loading accounting {...}
 # Loading session {...}
 # Loading post-auth {...}
Compiling Post-Auth-Type REJECT for attr Post-Auth-Type
Compiling Post-Auth-Type Challenge for attr Post-Auth-Type
} # server default
radiusd: #### Opening IP addresses and Ports ####
listen {
    type = "auth"
    ipaddr = 127.0.0.1
    port = 18120
}
listen {
    type = "auth"
    ipaddr = *
    port = 0
   limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
   }
}
listen {
    type = "acct"
    ipaddr = *
    port = 0
   limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
   }
}
listen {
    type = "auth"
    ipv6addr = ::
    port = 0
   limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
   }
}
listen {
    type = "acct"
    ipv6addr = ::
    port = 0
   limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
   }
}
Listening on auth address 127.0.0.1 port 18120 bound to server inner-tunnel
Listening on auth address * port 1812 bound to server default
Listening on acct address * port 1813 bound to server default
Listening on auth address :: port 1812 bound to server default
Listening on acct address :: port 1813 bound to server default
Ready to process requests
(0) Received Access-Request Id 88 from 192.168.16.3:53691 to
192.168.16.2:1812 length 159
(0)   User-Name = "chris"
(0)   NAS-Port-Type = Virtual
(0)   Service-Type = Framed-User
(0)   NAS-Port = 2
(0)   NAS-Port-Id = "ikev2-vpn"
(0)   NAS-IP-Address = 192.168.16.3
(0)   Called-Station-Id = "192.168.16.3[4500]"
(0)   Calling-Station-Id = "192.168.16.1[63912]"
(0)   Acct-Session-Id = "1631739281-2"
(0)   EAP-Message = 0x0200000a016368726973
(0)   NAS-Identifier = "strongSwan"
(0)   Message-Authenticator = 0xe51864168a426ac69642bd942379651d
(0) # Executing section authorize from file /etc/raddb/sites-enabled/default
(0)   authorize {
(0)     [preprocess] = ok
(0)     [chap] = noop
(0)     [mschap] = noop
(0) sql: EXPAND %{User-Name}
(0) sql:    --> chris
(0) sql: SQL-User-Name set to 'chris'
rlm_sql (sql): Reserved connection (1)
(0) sql: EXPAND SELECT id, username, attribute, value, op FROM
radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id
(0) sql:    --> SELECT id, username, attribute, value, op FROM
radcheck WHERE username = 'chris' ORDER BY id
(0) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radcheck WHERE username = 'chris' ORDER BY id
(0) sql: User found in radcheck table
(0) sql: Conditional check items matched, merging assignment check items
(0) sql:   Cleartext-Password := "chris123"
(0) sql: EXPAND SELECT id, username, attribute, value, op FROM
radreply WHERE username = '%{SQL-User-Name}' ORDER BY id
(0) sql:    --> SELECT id, username, attribute, value, op FROM
radreply WHERE username = 'chris' ORDER BY id
(0) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radreply WHERE username = 'chris' ORDER BY id
(0) sql: EXPAND SELECT groupname FROM radusergroup WHERE username =
'%{SQL-User-Name}' ORDER BY priority
(0) sql:    --> SELECT groupname FROM radusergroup WHERE username =
'chris' ORDER BY priority
(0) sql: Executing select query: SELECT groupname FROM radusergroup
WHERE username = 'chris' ORDER BY priority
(0) sql: User not found in any groups
rlm_sql (sql): Released connection (1)
Need 4 more connections to reach 10 spares
rlm_sql (sql): Opening additional connection (6), 1 of 26 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'radius' on database-server via
TCP/IP, server version 5.7.33-log, protocol version 10
(0)     [sql] = ok
(0) eap: Peer sent EAP Response (code 2) ID 0 length 10
(0) eap: EAP-Identity reply, returning 'ok' so we can short-circuit
the rest of authorize
(0)     [eap] = ok
(0)   } # authorize = ok
(0) Found Auth-Type = eap
(0) # Executing group from file /etc/raddb/sites-enabled/default
(0)   authenticate {
(0) eap: Peer sent packet with method EAP Identity (1)
(0) eap: Calling submodule eap_mschapv2 to process data
(0) eap_mschapv2: Issuing Challenge
(0) eap: Sending EAP Request (code 1) ID 1 length 43
(0) eap: EAP session adding &reply:State = 0xa062692ba0637332
(0)     [eap] = handled
(0)   } # authenticate = handled
(0) Using Post-Auth-Type Challenge
(0) # Executing group from file /etc/raddb/sites-enabled/default
(0)   Challenge { ... } # empty sub-section is ignored
(0) Sent Access-Challenge Id 88 from 192.168.16.2:1812 to
192.168.16.3:53691 length 0
(0)   EAP-Message =
0x0101002b1a01010026100786a83b5c92f867b2f0051ee35f44a3667265657261646975732d332e302e3233
(0)   Message-Authenticator = 0x00000000000000000000000000000000
(0)   State = 0xa062692ba063733231a5799c7a6450a4
(0) Finished request
Waking up in 4.9 seconds.
(1) Received Access-Request Id 89 from 192.168.16.3:53691 to
192.168.16.2:1812 length 231
(1)   User-Name = "chris"
(1)   NAS-Port-Type = Virtual
(1)   Service-Type = Framed-User
(1)   NAS-Port = 2
(1)   NAS-Port-Id = "ikev2-vpn"
(1)   NAS-IP-Address = 192.168.16.3
(1)   Called-Station-Id = "192.168.16.3[4500]"
(1)   Calling-Station-Id = "192.168.16.1[63912]"
(1)   Acct-Session-Id = "1631739281-2"
(1)   EAP-Message =
0x020100401a0201003b31fe15369f3bee85c15ac51f811312bb8b000000000000000028ea920c9777e19788369862212c21c487e3d8056f9e6b81006368726973
(1)   NAS-Identifier = "strongSwan"
(1)   State = 0xa062692ba063733231a5799c7a6450a4
(1)   Message-Authenticator = 0x0db7d129328f67c55a4a5db35ce77a32
(1) session-state: No cached attributes
(1) # Executing section authorize from file /etc/raddb/sites-enabled/default
(1)   authorize {
(1)     [preprocess] = ok
(1)     [chap] = noop
(1)     [mschap] = noop
(1) sql: EXPAND %{User-Name}
(1) sql:    --> chris
(1) sql: SQL-User-Name set to 'chris'
rlm_sql (sql): Reserved connection (2)
(1) sql: EXPAND SELECT id, username, attribute, value, op FROM
radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id
(1) sql:    --> SELECT id, username, attribute, value, op FROM
radcheck WHERE username = 'chris' ORDER BY id
(1) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radcheck WHERE username = 'chris' ORDER BY id
(1) sql: User found in radcheck table
(1) sql: Conditional check items matched, merging assignment check items
(1) sql:   Cleartext-Password := "chris123"
(1) sql: EXPAND SELECT id, username, attribute, value, op FROM
radreply WHERE username = '%{SQL-User-Name}' ORDER BY id
(1) sql:    --> SELECT id, username, attribute, value, op FROM
radreply WHERE username = 'chris' ORDER BY id
(1) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radreply WHERE username = 'chris' ORDER BY id
(1) sql: EXPAND SELECT groupname FROM radusergroup WHERE username =
'%{SQL-User-Name}' ORDER BY priority
(1) sql:    --> SELECT groupname FROM radusergroup WHERE username =
'chris' ORDER BY priority
(1) sql: Executing select query: SELECT groupname FROM radusergroup
WHERE username = 'chris' ORDER BY priority
(1) sql: User not found in any groups
rlm_sql (sql): Released connection (2)
(1)     [sql] = ok
(1) eap: Peer sent EAP Response (code 2) ID 1 length 64
(1) eap: No EAP Start, assuming it's an on-going EAP conversation
(1)     [eap] = updated
(1)   } # authorize = updated
(1) Found Auth-Type = eap
(1) # Executing group from file /etc/raddb/sites-enabled/default
(1)   authenticate {
(1) eap: Expiring EAP session with state 0xa062692ba0637332
(1) eap: Finished EAP session with state 0xa062692ba0637332
(1) eap: Previous EAP request found for state 0xa062692ba0637332,
released from the list
(1) eap: Peer sent packet with method EAP MSCHAPv2 (26)
(1) eap: Calling submodule eap_mschapv2 to process data
(1) eap_mschapv2: # Executing group from file /etc/raddb/sites-enabled/default
(1) eap_mschapv2:   authenticate {
(1) mschap: Found Cleartext-Password, hashing to create NT-Password
(1) mschap: Creating challenge hash with username: chris
(1) mschap: Client is using MS-CHAPv2
(1) mschap: Adding MS-CHAPv2 MPPE keys
(1) eap_mschapv2:     [mschap] = ok
(1) eap_mschapv2:   } # authenticate = ok
(1) eap_mschapv2: MSCHAP Success
(1) eap: Sending EAP Request (code 1) ID 2 length 51
(1) eap: EAP session adding &reply:State = 0xa062692ba1607332
(1)     [eap] = handled
(1)   } # authenticate = handled
(1) Using Post-Auth-Type Challenge
(1) # Executing group from file /etc/raddb/sites-enabled/default
(1)   Challenge { ... } # empty sub-section is ignored
(1) Sent Access-Challenge Id 89 from 192.168.16.2:1812 to
192.168.16.3:53691 length 0
(1)   EAP-Message =
0x010200331a0301002e533d38383031343432353230344637314339313636443344344445323632363830383630463845454530
(1)   Message-Authenticator = 0x00000000000000000000000000000000
(1)   State = 0xa062692ba160733231a5799c7a6450a4
(1) Finished request
Waking up in 4.9 seconds.
(2) Received Access-Request Id 90 from 192.168.16.3:53691 to
192.168.16.2:1812 length 173
(2)   User-Name = "chris"
(2)   NAS-Port-Type = Virtual
(2)   Service-Type = Framed-User
(2)   NAS-Port = 2
(2)   NAS-Port-Id = "ikev2-vpn"
(2)   NAS-IP-Address = 192.168.16.3
(2)   Called-Station-Id = "192.168.16.3[4500]"
(2)   Calling-Station-Id = "192.168.16.1[63912]"
(2)   Acct-Session-Id = "1631739281-2"
(2)   EAP-Message = 0x020200061a03
(2)   NAS-Identifier = "strongSwan"
(2)   State = 0xa062692ba160733231a5799c7a6450a4
(2)   Message-Authenticator = 0x68446a7f4f92c89f1bbd123de9e4e84d
(2) session-state: No cached attributes
(2) # Executing section authorize from file /etc/raddb/sites-enabled/default
(2)   authorize {
(2)     [preprocess] = ok
(2)     [chap] = noop
(2)     [mschap] = noop
(2) sql: EXPAND %{User-Name}
(2) sql:    --> chris
(2) sql: SQL-User-Name set to 'chris'
rlm_sql (sql): Reserved connection (3)
(2) sql: EXPAND SELECT id, username, attribute, value, op FROM
radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id
(2) sql:    --> SELECT id, username, attribute, value, op FROM
radcheck WHERE username = 'chris' ORDER BY id
(2) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radcheck WHERE username = 'chris' ORDER BY id
(2) sql: User found in radcheck table
(2) sql: Conditional check items matched, merging assignment check items
(2) sql:   Cleartext-Password := "chris123"
(2) sql: EXPAND SELECT id, username, attribute, value, op FROM
radreply WHERE username = '%{SQL-User-Name}' ORDER BY id
(2) sql:    --> SELECT id, username, attribute, value, op FROM
radreply WHERE username = 'chris' ORDER BY id
(2) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radreply WHERE username = 'chris' ORDER BY id
(2) sql: EXPAND SELECT groupname FROM radusergroup WHERE username =
'%{SQL-User-Name}' ORDER BY priority
(2) sql:    --> SELECT groupname FROM radusergroup WHERE username =
'chris' ORDER BY priority
(2) sql: Executing select query: SELECT groupname FROM radusergroup
WHERE username = 'chris' ORDER BY priority
(2) sql: User not found in any groups
rlm_sql (sql): Released connection (3)
(2)     [sql] = ok
(2) eap: Peer sent EAP Response (code 2) ID 2 length 6
(2) eap: No EAP Start, assuming it's an on-going EAP conversation
(2)     [eap] = updated
(2)   } # authorize = updated
(2) Found Auth-Type = eap
(2) # Executing group from file /etc/raddb/sites-enabled/default
(2)   authenticate {
(2) eap: Expiring EAP session with state 0xa062692ba1607332
(2) eap: Finished EAP session with state 0xa062692ba1607332
(2) eap: Previous EAP request found for state 0xa062692ba1607332,
released from the list
(2) eap: Peer sent packet with method EAP MSCHAPv2 (26)
(2) eap: Calling submodule eap_mschapv2 to process data
(2) eap: Sending EAP Success (code 3) ID 2 length 4
(2) eap: Freeing handler
(2)     [eap] = ok
(2)   } # authenticate = ok
(2) # Executing section post-auth from file /etc/raddb/sites-enabled/default
(2)   post-auth {
(2)     update {
(2)       No attributes updated for RHS &session-state:
(2)     } # update = noop
(2) main_pool: No Pool-Name defined
(2) main_pool: EXPAND No Pool-Name defined (did %{Called-Station-Id}
cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})
(2) main_pool:    --> No Pool-Name defined (did 192.168.16.3[4500] cli
192.168.16.1[63912] port 2 user chris)
(2)     [main_pool] = noop
(2)     if ( yes == "yes" ) {
(2)     if ( yes == "yes" )  -> TRUE
(2)     if ( yes == "yes" )  {
(2) sql: EXPAND .query
(2) sql:    --> .query
(2) sql: Using query template 'query'
rlm_sql (sql): Reserved connection (4)
(2) sql: EXPAND %{User-Name}
(2) sql:    --> chris
(2) sql: SQL-User-Name set to 'chris'
(2) sql: EXPAND INSERT INTO radpostauth (username, pass, reply,
authdate) VALUES ( '%{SQL-User-Name}',
'%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%S')
(2) sql:    --> INSERT INTO radpostauth (username, pass, reply,
authdate) VALUES ( 'chris', '', 'Access-Accept', '2021-09-15
20:54:53')
(2) sql: Executing query: INSERT INTO radpostauth (username, pass,
reply, authdate) VALUES ( 'chris', '', 'Access-Accept', '2021-09-15
20:54:53')
(2) sql: SQL query returned: success
(2) sql: 1 record(s) updated
rlm_sql (sql): Released connection (4)
(2)       [sql] = ok
(2)     } # if ( yes == "yes" )  = ok
(2)     [exec] = noop
(2)     policy remove_reply_message_if_eap {
(2)       if (&reply:EAP-Message && &reply:Reply-Message) {
(2)       if (&reply:EAP-Message && &reply:Reply-Message)  -> FALSE
(2)       else {
(2)         [noop] = noop
(2)       } # else = noop
(2)     } # policy remove_reply_message_if_eap = noop
(2)   } # post-auth = ok
(2) Login OK: [chris/<via Auth-Type = eap>] (from client rad_clients
port 2 cli 192.168.16.1[63912])
(2) Sent Access-Accept Id 90 from 192.168.16.2:1812 to
192.168.16.3:53691 length 0
(2)   MS-MPPE-Encryption-Policy = Encryption-Allowed
(2)   MS-MPPE-Encryption-Types = RC4-40or128-bit-Allowed
(2)   MS-MPPE-Send-Key = 0xec5e3b7b837c7e477cb5dca9762c9764
(2)   MS-MPPE-Recv-Key = 0x17992e954fb17f5f80ad3bbe8e397ce0
(2)   EAP-Message = 0x03020004
(2)   Message-Authenticator = 0x00000000000000000000000000000000
(2)   User-Name = "chris"
(2) Finished request
Waking up in 4.9 seconds.
(3) Received Accounting-Request Id 91 from 192.168.16.3:35093 to
192.168.16.2:1813 length 135
(3)   Acct-Status-Type = Start
(3)   Acct-Session-Id = "1631739281-2"
(3)   NAS-Port-Type = Virtual
(3)   Service-Type = Framed-User
(3)   NAS-Port = 2
(3)   NAS-Port-Id = "ikev2-vpn"
(3)   NAS-IP-Address = 192.168.16.3
(3)   Called-Station-Id = "192.168.16.3[4500]"
(3)   Calling-Station-Id = "192.168.16.1[63912]"
(3)   User-Name = "chris"
(3)   NAS-Identifier = "strongSwan"
(3) # Executing section preacct from file /etc/raddb/sites-enabled/default
(3)   preacct {
(3)     policy mask_accounting_data {
(3)       if ( yes == "no" ) {
(3)       if ( yes == "no" )  -> FALSE
(3)     } # policy mask_accounting_data = noop
(3)     [preprocess] = ok
(3)     policy acct_unique {
(3)       update request {
(3)         &Tmp-String-9 := "ai:"
(3)       } # update request = noop
(3)       if (("%{hex:&Class}" =~ /^%{hex:&Tmp-String-9}/) &&
("%{string:&Class}" =~ /^ai:([0-9a-f]{32})/i)) {
(3)       EXPAND %{hex:&Class}
(3)          -->
(3)       EXPAND ^%{hex:&Tmp-String-9}
(3)          --> ^61693a
(3)       if (("%{hex:&Class}" =~ /^%{hex:&Tmp-String-9}/) &&
("%{string:&Class}" =~ /^ai:([0-9a-f]{32})/i))  -> FALSE
(3)       else {
(3)         update request {
(3)           EXPAND
%{md5:%{User-Name},%{Acct-Session-ID},%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}},%{NAS-Identifier},%{NAS-Port-ID},%{NAS-Port}}
(3)              --> e3709683e400e095c5fa458587a94463
(3)           &Acct-Unique-Session-Id := e3709683e400e095c5fa458587a94463
(3)         } # update request = noop
(3)       } # else = noop
(3)     } # policy acct_unique = noop
(3) suffix: Checking for suffix after "@"
(3) suffix: No '@' in User-Name = "chris", looking up realm NULL
(3) suffix: No such realm "NULL"
(3)     [suffix] = noop
(3)     [files] = noop
(3)   } # preacct = ok
(3) # Executing section accounting from file /etc/raddb/sites-enabled/default
(3)   accounting {
rlm_sql (sql): Reserved connection (0)
(3) main_pool: EXPAND %{User-Name}
(3) main_pool:    --> chris
(3) main_pool: SQL-User-Name set to 'chris'
(3) main_pool: EXPAND UPDATE radippool SET expiry_time = NOW() +
INTERVAL 3600 SECOND WHERE nasipaddress = '%{NAS-IP-Address}' AND
pool_key = '%{NAS-Port}' AND username = '%{User-Name}' AND
callingstationid = '%{Calling-Station-Id}' AND framedipaddress =
'%{Framed-IP-Address}'
(3) main_pool:    --> UPDATE radippool SET expiry_time = NOW() +
INTERVAL 3600 SECOND WHERE nasipaddress = '192.168.16.3' AND pool_key
= '2' AND username = 'chris' AND callingstationid =
'192.168.16.1=5B63912=5D' AND framedipaddress = ''
(3) main_pool: Executing query: UPDATE radippool SET expiry_time =
NOW() + INTERVAL 3600 SECOND WHERE nasipaddress = '192.168.16.3' AND
pool_key = '2' AND username = 'chris' AND callingstationid =
'192.168.16.1=5B63912=5D' AND framedipaddress = ''
rlm_sql_mysql: Rows matched: 0  Changed: 0  Warnings: 0
rlm_sql (sql): Released connection (0)
(3)     [main_pool] = ok
(3) sql: EXPAND %{tolower:type.%{Acct-Status-Type}.query}
(3) sql:    --> type.start.query
(3) sql: Using query template 'query'
rlm_sql (sql): Reserved connection (5)
(3) sql: EXPAND %{User-Name}
(3) sql:    --> chris
(3) sql: SQL-User-Name set to 'chris'
(3) sql: EXPAND INSERT INTO radacct (acctsessionid,   acctuniqueid,
username, realm,      nasipaddress,   nasportid, nasporttype,
acctstarttime,    acctupdatetime, acctstoptime,   acctsessiontime,
acctauthentic, connectinfo_start, connectinfo_stop,   acctinputoctets,
acctoutputoctets,  calledstationid,  callingstationid,
acctterminatecause, servicetype,    framedprotocol, framedipaddress)
VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',
'%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}',
'%{%{NAS-Port-ID}:-%{NAS-Port}}', '%{NAS-Port-Type}',
FROM_UNIXTIME(%{integer:Event-Timestamp}),
FROM_UNIXTIME(%{integer:Event-Timestamp}), NULL, '0',
'%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0',
'%{Called-Station-Id}', '%{Calling-Station-Id}', '',
'%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}')
(3) sql:    --> INSERT INTO radacct (acctsessionid,   acctuniqueid,
username, realm,      nasipaddress,   nasportid, nasporttype,
acctstarttime,    acctupdatetime, acctstoptime,   acctsessiontime,
acctauthentic, connectinfo_start, connectinfo_stop,   acctinputoctets,
acctoutputoctets,  calledstationid,  callingstationid,
acctterminatecause, servicetype,    framedprotocol, framedipaddress)
VALUES ('1631739281-2', 'e3709683e400e095c5fa458587a94463', 'chris',
'', '192.168.16.3', 'ikev2-vpn', 'Virtual', FROM_UNIXTIME(1631739293),
FROM_UNIXTIME(1631739293), NULL, '0', '', '', '', '0', '0',
'192.168.16.3=5B4500=5D', '192.168.16.1=5B63912=5D', '',
'Framed-User', '', '')
(3) sql: Executing query: INSERT INTO radacct (acctsessionid,
acctuniqueid,   username, realm,      nasipaddress,   nasportid,
nasporttype,   acctstarttime,    acctupdatetime, acctstoptime,
acctsessiontime,  acctauthentic, connectinfo_start, connectinfo_stop,
 acctinputoctets, acctoutputoctets,  calledstationid,
callingstationid, acctterminatecause, servicetype,  framedprotocol,
framedipaddress) VALUES ('1631739281-2',
'e3709683e400e095c5fa458587a94463', 'chris', '', '192.168.16.3',
'ikev2-vpn', 'Virtual', FROM_UNIXTIME(1631739293),
FROM_UNIXTIME(1631739293), NULL, '0', '', '', '', '0', '0',
'192.168.16.3=5B4500=5D', '192.168.16.1=5B63912=5D', '',
'Framed-User', '', '')
(3) sql: SQL query returned: success
(3) sql: 1 record(s) updated
rlm_sql (sql): Released connection (5)
(3)     [sql] = ok
(3)     [exec] = noop
(3) attr_filter.accounting_response: EXPAND %{User-Name}
(3) attr_filter.accounting_response:    --> chris
(3) attr_filter.accounting_response: Matched entry DEFAULT at line 12
(3)     [attr_filter.accounting_response] = updated
(3)   } # accounting = updated
(3) Sent Accounting-Response Id 91 from 192.168.16.2:1813 to
192.168.16.3:35093 length 0
(3) Finished request
(3) Cleaning up request packet ID 91 with timestamp +11
Waking up in 4.9 seconds.
(4) Received Access-Request Id 92 from 192.168.16.3:53691 to
192.168.16.2:1812 length 159
(4)   User-Name = "chris"
(4)   NAS-Port-Type = Virtual
(4)   Service-Type = Framed-User
(4)   NAS-Port = 4
(4)   NAS-Port-Id = "ikev2-vpn"
(4)   NAS-IP-Address = 192.168.16.3
(4)   Called-Station-Id = "192.168.16.3[4500]"
(4)   Calling-Station-Id = "192.168.16.1[63912]"
(4)   Acct-Session-Id = "1631739281-4"
(4)   EAP-Message = 0x0200000a016368726973
(4)   NAS-Identifier = "strongSwan"
(4)   Message-Authenticator = 0xfe511ea2674ededf841589bbec75055c
(4) # Executing section authorize from file /etc/raddb/sites-enabled/default
(4)   authorize {
(4)     [preprocess] = ok
(4)     [chap] = noop
(4)     [mschap] = noop
(4) sql: EXPAND %{User-Name}
(4) sql:    --> chris
(4) sql: SQL-User-Name set to 'chris'
rlm_sql (sql): Reserved connection (1)
(4) sql: EXPAND SELECT id, username, attribute, value, op FROM
radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id
(4) sql:    --> SELECT id, username, attribute, value, op FROM
radcheck WHERE username = 'chris' ORDER BY id
(4) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radcheck WHERE username = 'chris' ORDER BY id
(4) sql: User found in radcheck table
(4) sql: Conditional check items matched, merging assignment check items
(4) sql:   Cleartext-Password := "chris123"
(4) sql: EXPAND SELECT id, username, attribute, value, op FROM
radreply WHERE username = '%{SQL-User-Name}' ORDER BY id
(4) sql:    --> SELECT id, username, attribute, value, op FROM
radreply WHERE username = 'chris' ORDER BY id
(4) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radreply WHERE username = 'chris' ORDER BY id
(4) sql: EXPAND SELECT groupname FROM radusergroup WHERE username =
'%{SQL-User-Name}' ORDER BY priority
(4) sql:    --> SELECT groupname FROM radusergroup WHERE username =
'chris' ORDER BY priority
(4) sql: Executing select query: SELECT groupname FROM radusergroup
WHERE username = 'chris' ORDER BY priority
(4) sql: User not found in any groups
rlm_sql (sql): Released connection (1)
(4)     [sql] = ok
(4) eap: Peer sent EAP Response (code 2) ID 0 length 10
(4) eap: EAP-Identity reply, returning 'ok' so we can short-circuit
the rest of authorize
(4)     [eap] = ok
(4)   } # authorize = ok
(4) Found Auth-Type = eap
(4) # Executing group from file /etc/raddb/sites-enabled/default
(4)   authenticate {
(4) eap: Peer sent packet with method EAP Identity (1)
(4) eap: Calling submodule eap_mschapv2 to process data
(4) eap_mschapv2: Issuing Challenge
(4) eap: Sending EAP Request (code 1) ID 1 length 43
(4) eap: EAP session adding &reply:State = 0xabe504faabe41e91
(4)     [eap] = handled
(4)   } # authenticate = handled
(4) Using Post-Auth-Type Challenge
(4) # Executing group from file /etc/raddb/sites-enabled/default
(4)   Challenge { ... } # empty sub-section is ignored
(4) Sent Access-Challenge Id 92 from 192.168.16.2:1812 to
192.168.16.3:53691 length 0
(4)   EAP-Message =
0x0101002b1a0101002610ab98d028fae47f4a47c11c5906e96af4667265657261646975732d332e302e3233
(4)   Message-Authenticator = 0x00000000000000000000000000000000
(4)   State = 0xabe504faabe41e91efcf5143178b5b38
(4) Finished request
Waking up in 4.7 seconds.
(5) Received Access-Request Id 93 from 192.168.16.3:53691 to
192.168.16.2:1812 length 231
(5)   User-Name = "chris"
(5)   NAS-Port-Type = Virtual
(5)   Service-Type = Framed-User
(5)   NAS-Port = 4
(5)   NAS-Port-Id = "ikev2-vpn"
(5)   NAS-IP-Address = 192.168.16.3
(5)   Called-Station-Id = "192.168.16.3[4500]"
(5)   Calling-Station-Id = "192.168.16.1[63912]"
(5)   Acct-Session-Id = "1631739281-4"
(5)   EAP-Message =
0x020100401a0201003b31fa0f7abc8048417ff713c9ba17c9ae1f000000000000000009134db0d846f9b8fbad56158d3a7e261e19332e1d56424e006368726973
(5)   NAS-Identifier = "strongSwan"
(5)   State = 0xabe504faabe41e91efcf5143178b5b38
(5)   Message-Authenticator = 0xbcbbd9e35cdfc8218ad3d6a7b7efeae1
(5) session-state: No cached attributes
(5) # Executing section authorize from file /etc/raddb/sites-enabled/default
(5)   authorize {
(5)     [preprocess] = ok
(5)     [chap] = noop
(5)     [mschap] = noop
(5) sql: EXPAND %{User-Name}
(5) sql:    --> chris
(5) sql: SQL-User-Name set to 'chris'
rlm_sql (sql): Reserved connection (6)
(5) sql: EXPAND SELECT id, username, attribute, value, op FROM
radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id
(5) sql:    --> SELECT id, username, attribute, value, op FROM
radcheck WHERE username = 'chris' ORDER BY id
(5) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radcheck WHERE username = 'chris' ORDER BY id
(5) sql: User found in radcheck table
(5) sql: Conditional check items matched, merging assignment check items
(5) sql:   Cleartext-Password := "chris123"
(5) sql: EXPAND SELECT id, username, attribute, value, op FROM
radreply WHERE username = '%{SQL-User-Name}' ORDER BY id
(5) sql:    --> SELECT id, username, attribute, value, op FROM
radreply WHERE username = 'chris' ORDER BY id
(5) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radreply WHERE username = 'chris' ORDER BY id
(5) sql: EXPAND SELECT groupname FROM radusergroup WHERE username =
'%{SQL-User-Name}' ORDER BY priority
(5) sql:    --> SELECT groupname FROM radusergroup WHERE username =
'chris' ORDER BY priority
(5) sql: Executing select query: SELECT groupname FROM radusergroup
WHERE username = 'chris' ORDER BY priority
(5) sql: User not found in any groups
rlm_sql (sql): Released connection (6)
(5)     [sql] = ok
(5) eap: Peer sent EAP Response (code 2) ID 1 length 64
(5) eap: No EAP Start, assuming it's an on-going EAP conversation
(5)     [eap] = updated
(5)   } # authorize = updated
(5) Found Auth-Type = eap
(5) # Executing group from file /etc/raddb/sites-enabled/default
(5)   authenticate {
(5) eap: Expiring EAP session with state 0xabe504faabe41e91
(5) eap: Finished EAP session with state 0xabe504faabe41e91
(5) eap: Previous EAP request found for state 0xabe504faabe41e91,
released from the list
(5) eap: Peer sent packet with method EAP MSCHAPv2 (26)
(5) eap: Calling submodule eap_mschapv2 to process data
(5) eap_mschapv2: # Executing group from file /etc/raddb/sites-enabled/default
(5) eap_mschapv2:   authenticate {
(5) mschap: Found Cleartext-Password, hashing to create NT-Password
(5) mschap: Creating challenge hash with username: chris
(5) mschap: Client is using MS-CHAPv2
(5) mschap: Adding MS-CHAPv2 MPPE keys
(5) eap_mschapv2:     [mschap] = ok
(5) eap_mschapv2:   } # authenticate = ok
(5) eap_mschapv2: MSCHAP Success
(5) eap: Sending EAP Request (code 1) ID 2 length 51
(5) eap: EAP session adding &reply:State = 0xabe504faaae71e91
(5)     [eap] = handled
(5)   } # authenticate = handled
(5) Using Post-Auth-Type Challenge
(5) # Executing group from file /etc/raddb/sites-enabled/default
(5)   Challenge { ... } # empty sub-section is ignored
(5) Sent Access-Challenge Id 93 from 192.168.16.2:1812 to
192.168.16.3:53691 length 0
(5)   EAP-Message =
0x010200331a0301002e533d33393938464535463144314233413543323536304333453644314335393441433038363545314232
(5)   Message-Authenticator = 0x00000000000000000000000000000000
(5)   State = 0xabe504faaae71e91efcf5143178b5b38
(5) Finished request
Waking up in 4.6 seconds.
(6) Received Access-Request Id 94 from 192.168.16.3:53691 to
192.168.16.2:1812 length 173
(6)   User-Name = "chris"
(6)   NAS-Port-Type = Virtual
(6)   Service-Type = Framed-User
(6)   NAS-Port = 4
(6)   NAS-Port-Id = "ikev2-vpn"
(6)   NAS-IP-Address = 192.168.16.3
(6)   Called-Station-Id = "192.168.16.3[4500]"
(6)   Calling-Station-Id = "192.168.16.1[63912]"
(6)   Acct-Session-Id = "1631739281-4"
(6)   EAP-Message = 0x020200061a03
(6)   NAS-Identifier = "strongSwan"
(6)   State = 0xabe504faaae71e91efcf5143178b5b38
(6)   Message-Authenticator = 0x713a671049987382f8b34eeeff49e6bd
(6) session-state: No cached attributes
(6) # Executing section authorize from file /etc/raddb/sites-enabled/default
(6)   authorize {
(6)     [preprocess] = ok
(6)     [chap] = noop
(6)     [mschap] = noop
(6) sql: EXPAND %{User-Name}
(6) sql:    --> chris
(6) sql: SQL-User-Name set to 'chris'
rlm_sql (sql): Reserved connection (2)
(6) sql: EXPAND SELECT id, username, attribute, value, op FROM
radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id
(6) sql:    --> SELECT id, username, attribute, value, op FROM
radcheck WHERE username = 'chris' ORDER BY id
(6) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radcheck WHERE username = 'chris' ORDER BY id
(6) sql: User found in radcheck table
(6) sql: Conditional check items matched, merging assignment check items
(6) sql:   Cleartext-Password := "chris123"
(6) sql: EXPAND SELECT id, username, attribute, value, op FROM
radreply WHERE username = '%{SQL-User-Name}' ORDER BY id
(6) sql:    --> SELECT id, username, attribute, value, op FROM
radreply WHERE username = 'chris' ORDER BY id
(6) sql: Executing select query: SELECT id, username, attribute,
value, op FROM radreply WHERE username = 'chris' ORDER BY id
(6) sql: EXPAND SELECT groupname FROM radusergroup WHERE username =
'%{SQL-User-Name}' ORDER BY priority
(6) sql:    --> SELECT groupname FROM radusergroup WHERE username =
'chris' ORDER BY priority
(6) sql: Executing select query: SELECT groupname FROM radusergroup
WHERE username = 'chris' ORDER BY priority
(6) sql: User not found in any groups
rlm_sql (sql): Released connection (2)
(6)     [sql] = ok
(6) eap: Peer sent EAP Response (code 2) ID 2 length 6
(6) eap: No EAP Start, assuming it's an on-going EAP conversation
(6)     [eap] = updated
(6)   } # authorize = updated
(6) Found Auth-Type = eap
(6) # Executing group from file /etc/raddb/sites-enabled/default
(6)   authenticate {
(6) eap: Expiring EAP session with state 0xabe504faaae71e91
(6) eap: Finished EAP session with state 0xabe504faaae71e91
(6) eap: Previous EAP request found for state 0xabe504faaae71e91,
released from the list
(6) eap: Peer sent packet with method EAP MSCHAPv2 (26)
(6) eap: Calling submodule eap_mschapv2 to process data
(6) eap: Sending EAP Success (code 3) ID 2 length 4
(6) eap: Freeing handler
(6)     [eap] = ok
(6)   } # authenticate = ok
(6) # Executing section post-auth from file /etc/raddb/sites-enabled/default
(6)   post-auth {
(6)     update {
(6)       No attributes updated for RHS &session-state:
(6)     } # update = noop
(6) main_pool: No Pool-Name defined
(6) main_pool: EXPAND No Pool-Name defined (did %{Called-Station-Id}
cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})
(6) main_pool:    --> No Pool-Name defined (did 192.168.16.3[4500] cli
192.168.16.1[63912] port 4 user chris)
(6)     [main_pool] = noop
(6)     if ( yes == "yes" ) {
(6)     if ( yes == "yes" )  -> TRUE
(6)     if ( yes == "yes" )  {
(6) sql: EXPAND .query
(6) sql:    --> .query
(6) sql: Using query template 'query'
rlm_sql (sql): Reserved connection (3)
(6) sql: EXPAND %{User-Name}
(6) sql:    --> chris
(6) sql: SQL-User-Name set to 'chris'
(6) sql: EXPAND INSERT INTO radpostauth (username, pass, reply,
authdate) VALUES ( '%{SQL-User-Name}',
'%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%S')
(6) sql:    --> INSERT INTO radpostauth (username, pass, reply,
authdate) VALUES ( 'chris', '', 'Access-Accept', '2021-09-15
20:54:53')
(6) sql: Executing query: INSERT INTO radpostauth (username, pass,
reply, authdate) VALUES ( 'chris', '', 'Access-Accept', '2021-09-15
20:54:53')
(6) sql: SQL query returned: success
(6) sql: 1 record(s) updated
rlm_sql (sql): Released connection (3)
(6)       [sql] = ok
(6)     } # if ( yes == "yes" )  = ok
(6)     [exec] = noop
(6)     policy remove_reply_message_if_eap {
(6)       if (&reply:EAP-Message && &reply:Reply-Message) {
(6)       if (&reply:EAP-Message && &reply:Reply-Message)  -> FALSE
(6)       else {
(6)         [noop] = noop
(6)       } # else = noop
(6)     } # policy remove_reply_message_if_eap = noop
(6)   } # post-auth = ok
(6) Login OK: [chris/<via Auth-Type = eap>] (from client rad_clients
port 4 cli 192.168.16.1[63912])
(6) Sent Access-Accept Id 94 from 192.168.16.2:1812 to
192.168.16.3:53691 length 0
(6)   MS-MPPE-Encryption-Policy = Encryption-Allowed
(6)   MS-MPPE-Encryption-Types = RC4-40or128-bit-Allowed
(6)   MS-MPPE-Send-Key = 0x73a3e83c71ab4121eecc027e2a0dc549
(6)   MS-MPPE-Recv-Key = 0x3f1993884c4e0a20c7d355ce08f60924
(6)   EAP-Message = 0x03020004
(6)   Message-Authenticator = 0x00000000000000000000000000000000
(6)   User-Name = "chris"
(6) Finished request
Waking up in 4.6 seconds.
(7) Received Accounting-Request Id 95 from 192.168.16.3:35093 to
192.168.16.2:1813 length 135
(7)   Acct-Status-Type = Start
(7)   Acct-Session-Id = "1631739281-4"
(7)   NAS-Port-Type = Virtual
(7)   Service-Type = Framed-User
(7)   NAS-Port = 4
(7)   NAS-Port-Id = "ikev2-vpn"
(7)   NAS-IP-Address = 192.168.16.3
(7)   Called-Station-Id = "192.168.16.3[4500]"
(7)   Calling-Station-Id = "192.168.16.1[63912]"
(7)   User-Name = "chris"
(7)   NAS-Identifier = "strongSwan"
(7) # Executing section preacct from file /etc/raddb/sites-enabled/default
(7)   preacct {
(7)     policy mask_accounting_data {
(7)       if ( yes == "no" ) {
(7)       if ( yes == "no" )  -> FALSE
(7)     } # policy mask_accounting_data = noop
(7)     [preprocess] = ok
(7)     policy acct_unique {
(7)       update request {
(7)         &Tmp-String-9 := "ai:"
(7)       } # update request = noop
(7)       if (("%{hex:&Class}" =~ /^%{hex:&Tmp-String-9}/) &&
("%{string:&Class}" =~ /^ai:([0-9a-f]{32})/i)) {
(7)       EXPAND %{hex:&Class}
(7)          -->
(7)       EXPAND ^%{hex:&Tmp-String-9}
(7)          --> ^61693a
(7)       if (("%{hex:&Class}" =~ /^%{hex:&Tmp-String-9}/) &&
("%{string:&Class}" =~ /^ai:([0-9a-f]{32})/i))  -> FALSE
(7)       else {
(7)         update request {
(7)           EXPAND
%{md5:%{User-Name},%{Acct-Session-ID},%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}},%{NAS-Identifier},%{NAS-Port-ID},%{NAS-Port}}
(7)              --> 5934b524234a8af869add8fbcdd5609b
(7)           &Acct-Unique-Session-Id := 5934b524234a8af869add8fbcdd5609b
(7)         } # update request = noop
(7)       } # else = noop
(7)     } # policy acct_unique = noop
(7) suffix: Checking for suffix after "@"
(7) suffix: No '@' in User-Name = "chris", looking up realm NULL
(7) suffix: No such realm "NULL"
(7)     [suffix] = noop
(7)     [files] = noop
(7)   } # preacct = ok
(7) # Executing section accounting from file /etc/raddb/sites-enabled/default
(7)   accounting {
rlm_sql (sql): Reserved connection (4)
(7) main_pool: EXPAND %{User-Name}
(7) main_pool:    --> chris
(7) main_pool: SQL-User-Name set to 'chris'
(7) main_pool: EXPAND UPDATE radippool SET expiry_time = NOW() +
INTERVAL 3600 SECOND WHERE nasipaddress = '%{NAS-IP-Address}' AND
pool_key = '%{NAS-Port}' AND username = '%{User-Name}' AND
callingstationid = '%{Calling-Station-Id}' AND framedipaddress =
'%{Framed-IP-Address}'
(7) main_pool:    --> UPDATE radippool SET expiry_time = NOW() +
INTERVAL 3600 SECOND WHERE nasipaddress = '192.168.16.3' AND pool_key
= '4' AND username = 'chris' AND callingstationid =
'192.168.16.1=5B63912=5D' AND framedipaddress = ''
(7) main_pool: Executing query: UPDATE radippool SET expiry_time =
NOW() + INTERVAL 3600 SECOND WHERE nasipaddress = '192.168.16.3' AND
pool_key = '4' AND username = 'chris' AND callingstationid =
'192.168.16.1=5B63912=5D' AND framedipaddress = ''
rlm_sql_mysql: Rows matched: 0  Changed: 0  Warnings: 0
rlm_sql (sql): Released connection (4)
(7)     [main_pool] = ok
(7) sql: EXPAND %{tolower:type.%{Acct-Status-Type}.query}
(7) sql:    --> type.start.query
(7) sql: Using query template 'query'
rlm_sql (sql): Reserved connection (0)
(7) sql: EXPAND %{User-Name}
(7) sql:    --> chris
(7) sql: SQL-User-Name set to 'chris'
(7) sql: EXPAND INSERT INTO radacct (acctsessionid,   acctuniqueid,
username, realm,      nasipaddress,   nasportid, nasporttype,
acctstarttime,    acctupdatetime, acctstoptime,   acctsessiontime,
acctauthentic, connectinfo_start, connectinfo_stop,   acctinputoctets,
acctoutputoctets,  calledstationid,  callingstationid,
acctterminatecause, servicetype,    framedprotocol, framedipaddress)
VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',
'%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}',
'%{%{NAS-Port-ID}:-%{NAS-Port}}', '%{NAS-Port-Type}',
FROM_UNIXTIME(%{integer:Event-Timestamp}),
FROM_UNIXTIME(%{integer:Event-Timestamp}), NULL, '0',
'%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0',
'%{Called-Station-Id}', '%{Calling-Station-Id}', '',
'%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}')
(7) sql:    --> INSERT INTO radacct (acctsessionid,   acctuniqueid,
username, realm,      nasipaddress,   nasportid, nasporttype,
acctstarttime,    acctupdatetime, acctstoptime,   acctsessiontime,
acctauthentic, connectinfo_start, connectinfo_stop,   acctinputoctets,
acctoutputoctets,  calledstationid,  callingstationid,
acctterminatecause, servicetype,    framedprotocol, framedipaddress)
VALUES ('1631739281-4', '5934b524234a8af869add8fbcdd5609b', 'chris',
'', '192.168.16.3', 'ikev2-vpn', 'Virtual', FROM_UNIXTIME(1631739293),
FROM_UNIXTIME(1631739293), NULL, '0', '', '', '', '0', '0',
'192.168.16.3=5B4500=5D', '192.168.16.1=5B63912=5D', '',
'Framed-User', '', '')
(7) sql: Executing query: INSERT INTO radacct (acctsessionid,
acctuniqueid,   username, realm,      nasipaddress,   nasportid,
nasporttype,   acctstarttime,    acctupdatetime, acctstoptime,
acctsessiontime,  acctauthentic, connectinfo_start, connectinfo_stop,
 acctinputoctets, acctoutputoctets,  calledstationid,
callingstationid, acctterminatecause, servicetype,  framedprotocol,
framedipaddress) VALUES ('1631739281-4',
'5934b524234a8af869add8fbcdd5609b', 'chris', '', '192.168.16.3',
'ikev2-vpn', 'Virtual', FROM_UNIXTIME(1631739293),
FROM_UNIXTIME(1631739293), NULL, '0', '', '', '', '0', '0',
'192.168.16.3=5B4500=5D', '192.168.16.1=5B63912=5D', '',
'Framed-User', '', '')
(7) sql: SQL query returned: success
(7) sql: 1 record(s) updated
rlm_sql (sql): Released connection (0)
(7)     [sql] = ok
(7)     [exec] = noop
(7) attr_filter.accounting_response: EXPAND %{User-Name}
(7) attr_filter.accounting_response:    --> chris
(7) attr_filter.accounting_response: Matched entry DEFAULT at line 12
(7)     [attr_filter.accounting_response] = updated
(7)   } # accounting = updated
(7) Sent Accounting-Response Id 95 from 192.168.16.2:1813 to
192.168.16.3:35093 length 0
(7) Finished request
(7) Cleaning up request packet ID 95 with timestamp +11
Waking up in 4.6 seconds.
(0) Cleaning up request packet ID 88 with timestamp +11
(1) Cleaning up request packet ID 89 with timestamp +11
(2) Cleaning up request packet ID 90 with timestamp +11
Waking up in 0.2 seconds.
(4) Cleaning up request packet ID 92 with timestamp +11
(5) Cleaning up request packet ID 93 with timestamp +11
(6) Cleaning up request packet ID 94 with timestamp +11
Ready to process requests

__
Regards
Chris Myburgh

On Wed, Sep 15, 2021 at 10:41 PM Matthew Newton <mcn at freeradius.org> wrote:
>
>
>
> On 15/09/2021 21:28, Chris Myburgh wrote:
> > Listening on acct address :: port 1813 bound to server default
> > Ready to process requests
> > (0) Received Access-Request Id 147 from 172.31.0.3:49093 to
> > 172.31.0.2:1812 length 155
> ...
> > (0) eap: Peer sent packet with method EAP Identity (1)
> > (0) eap: Calling submodule eap_md5 to process data
> > (0) eap_md5: Issuing MD5 Challenge
>
> If the incoming request is always (or predominantly) mschapv2, you'll
> save a round trip by updating the default eap type.
>
>
> > (2) Received Access-Request Id 149 from 172.31.0.3:49093 to
> > 172.31.0.2:1812 length 227
> > (2)   User-Name = "chris"
> ...
> > (2)   Message-Authenticator = 0x8382b4b312204426bfcb9822696d9ff1
> > (2) session-state: No cached attributes
> > (2) # Executing section authorize from file /etc/raddb/sites-enabled/default
> > (2)   authorize {
> > (2)     [preprocess] = ok
> > (2)     [chap] = noop
> > (2)     [mschap] = noop
> > (2) eap: Peer sent EAP Response (code 2) ID 2 length 64
> > (2) eap: No EAP Start, assuming it's an on-going EAP conversation
> > (2)     [eap] = updated
> > (2)   } # authorize = updated
> > (2) Found Auth-Type = eap
> ...
> > (2) eap: Peer sent packet with method EAP MSCHAPv2 (26)
> > (2) eap: Calling submodule eap_mschapv2 to process data
> > (2) eap_mschapv2: # Executing group from file /etc/raddb/sites-enabled/default
> > (2) eap_mschapv2:   authenticate {
> > (2) mschap: WARNING: No Cleartext-Password configured.  Cannot create
> > NT-Password
> > (2) mschap: Creating challenge hash with username: chris
> > (2) mschap: Client is using MS-CHAPv2
> > (2) mschap: ERROR: FAILED: No NT-Password.  Cannot perform authentication
> > (2) mschap: ERROR: MS-CHAP2-Response is incorrect
> > (2) eap_mschapv2:     [mschap] = reject
> > (2) eap_mschapv2:   } # authenticate = reject
>
>
> Here. You're calling eap, but haven't called sql beforehand, so the
> attribute hasn't been added. (It's afterwards in the default config as
> you normally want to short circuit on eap, but this is direct
> eap-mschapv2, so there's no inner tunnel.)
>
> Add a call to `sql` before the call to `eap` and you should get further.
>
> --
> Matthew
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list