StrongSwan IKEv2 - eap-radius - Auth Failing

Chris Myburgh chris.myburgh1 at gmail.com
Wed Sep 15 22:28:33 CEST 2021


Hi Matthew

Thanks for reaching out, please see the full debug log below.

The inner-tunnel site is enabled.  Both the default site and the
inner-tunnel sites have the sql module listed under authorize {

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 = "md5"
  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 147 from 172.31.0.3:49093 to
172.31.0.2:1812 length 155
(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 = 172.31.0.3
(0)   Called-Station-Id = "172.31.0.3[4500]"
(0)   Calling-Station-Id = "172.31.0.1[59303]"
(0)   Acct-Session-Id = "1631737208-2"
(0)   EAP-Message = 0x0200000a016368726973
(0)   NAS-Identifier = "strongSwan"
(0)   Message-Authenticator = 0x9ee3d1a870432d15de3e91a9fc537a69
(0) # Executing section authorize from file /etc/raddb/sites-enabled/default
(0)   authorize {
(0)     [preprocess] = ok
(0)     [chap] = noop
(0)     [mschap] = noop
(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_md5 to process data
(0) eap_md5: Issuing MD5 Challenge
(0) eap: Sending EAP Request (code 1) ID 1 length 22
(0) eap: EAP session adding &reply:State = 0x96532bcc96522f9f
(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 147 from 172.31.0.2:1812 to
172.31.0.3:49093 length 0
(0)   EAP-Message = 0x010100160410c9cee8e8a82f232e862cd1da9ced0b67
(0)   Message-Authenticator = 0x00000000000000000000000000000000
(0)   State = 0x96532bcc96522f9fe0523492387e8d26
(0) Finished request
Waking up in 4.9 seconds.
(1) Received Access-Request Id 148 from 172.31.0.3:49093 to
172.31.0.2:1812 length 169
(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 = 172.31.0.3
(1)   Called-Station-Id = "172.31.0.3[4500]"
(1)   Calling-Station-Id = "172.31.0.1[59303]"
(1)   Acct-Session-Id = "1631737208-2"
(1)   EAP-Message = 0x02010006031a
(1)   NAS-Identifier = "strongSwan"
(1)   State = 0x96532bcc96522f9fe0523492387e8d26
(1)   Message-Authenticator = 0x2d7e8e0a1f748b09bc3a4d02a9671716
(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) eap: Peer sent EAP Response (code 2) ID 1 length 6
(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 0x96532bcc96522f9f
(1) eap: Finished EAP session with state 0x96532bcc96522f9f
(1) eap: Previous EAP request found for state 0x96532bcc96522f9f,
released from the list
(1) eap: Peer sent packet with method EAP NAK (3)
(1) eap: Found mutually acceptable type MSCHAPv2 (26)
(1) eap: Calling submodule eap_mschapv2 to process data
(1) eap_mschapv2: Issuing Challenge
(1) eap: Sending EAP Request (code 1) ID 2 length 43
(1) eap: EAP session adding &reply:State = 0x96532bcc9751319f
(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 148 from 172.31.0.2:1812 to
172.31.0.3:49093 length 0
(1)   EAP-Message =
0x0102002b1a010200261029d4dc23fc1cd5dffa1efa1bfc203273667265657261646975732d332e302e3233
(1)   Message-Authenticator = 0x00000000000000000000000000000000
(1)   State = 0x96532bcc9751319fe0523492387e8d26
(1) Finished request
Waking up in 4.9 seconds.
(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)   NAS-Port-Type = Virtual
(2)   Service-Type = Framed-User
(2)   NAS-Port = 2
(2)   NAS-Port-Id = "ikev2-vpn"
(2)   NAS-IP-Address = 172.31.0.3
(2)   Called-Station-Id = "172.31.0.3[4500]"
(2)   Calling-Station-Id = "172.31.0.1[59303]"
(2)   Acct-Session-Id = "1631737208-2"
(2)   EAP-Message =
0x020200401a0202003b319c243cc8b1719c1198648566828c9281000000000000000008295198cd1d294945987ade75def4eba9ac32780d2c8a35006368726973
(2)   NAS-Identifier = "strongSwan"
(2)   State = 0x96532bcc9751319fe0523492387e8d26
(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) # Executing group from file /etc/raddb/sites-enabled/default
(2)   authenticate {
(2) eap: Expiring EAP session with state 0x96532bcc9751319f
(2) eap: Finished EAP session with state 0x96532bcc9751319f
(2) eap: Previous EAP request found for state 0x96532bcc9751319f,
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_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
(2) eap: Sending EAP Failure (code 4) ID 2 length 4
(2) eap: Freeing handler
(2)     [eap] = reject
(2)   } # authenticate = reject
(2) Failed to authenticate the user
(2) Using Post-Auth-Type Reject
(2) # Executing group from file /etc/raddb/sites-enabled/default
(2)   Post-Auth-Type REJECT {
(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 (1)
(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-Reject', '2021-09-15
20:20:16')
(2) sql: Executing query: INSERT INTO radpostauth (username, pass,
reply, authdate) VALUES ( 'chris', '', 'Access-Reject', '2021-09-15
20:20:16')
(2) sql: SQL query returned: success
(2) sql: 1 record(s) updated
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
(2)       [sql] = ok
(2)     } # if ( yes == "yes" )  = ok
(2) attr_filter.access_reject: EXPAND %{User-Name}
(2) attr_filter.access_reject:    --> chris
(2) attr_filter.access_reject: Matched entry DEFAULT at line 11
(2)     [attr_filter.access_reject] = updated
(2)     [eap] = 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-Type REJECT = updated
(2) Login incorrect (mschap: FAILED: No NT-Password.  Cannot perform
authentication): [chris/<via Auth-Type = eap>] (from client
rad_clients port 2 cli 172.31.0.1[59303])
(2) Delaying response for 1.000000 seconds
Waking up in 0.6 seconds.
Waking up in 0.3 seconds.
(2) Sending delayed response
(2) Sent Access-Reject Id 149 from 172.31.0.2:1812 to 172.31.0.3:49093
length 127
(2)   MS-CHAP-Error = "\002E=691 R=1
C=3e7991a106cd73b83bf0835778db9228 V=3 M=Authentication rejected"
(2)   EAP-Message = 0x04020004
(2)   Message-Authenticator = 0x00000000000000000000000000000000
Waking up in 3.9 seconds.
(3) Received Access-Request Id 150 from 172.31.0.3:49093 to
172.31.0.2:1812 length 155
(3)   User-Name = "chris"
(3)   NAS-Port-Type = Virtual
(3)   Service-Type = Framed-User
(3)   NAS-Port = 4
(3)   NAS-Port-Id = "ikev2-vpn"
(3)   NAS-IP-Address = 172.31.0.3
(3)   Called-Station-Id = "172.31.0.3[4500]"
(3)   Calling-Station-Id = "172.31.0.1[59303]"
(3)   Acct-Session-Id = "1631737208-4"
(3)   EAP-Message = 0x0200000a016368726973
(3)   NAS-Identifier = "strongSwan"
(3)   Message-Authenticator = 0x02ce384e445951dce93d00b29e37a957
(3) # Executing section authorize from file /etc/raddb/sites-enabled/default
(3)   authorize {
(3)     [preprocess] = ok
(3)     [chap] = noop
(3)     [mschap] = noop
(3) eap: Peer sent EAP Response (code 2) ID 0 length 10
(3) eap: EAP-Identity reply, returning 'ok' so we can short-circuit
the rest of authorize
(3)     [eap] = ok
(3)   } # authorize = ok
(3) Found Auth-Type = eap
(3) # Executing group from file /etc/raddb/sites-enabled/default
(3)   authenticate {
(3) eap: Peer sent packet with method EAP Identity (1)
(3) eap: Calling submodule eap_md5 to process data
(3) eap_md5: Issuing MD5 Challenge
(3) eap: Sending EAP Request (code 1) ID 1 length 22
(3) eap: EAP session adding &reply:State = 0x4a50d16c4a51d5af
(3)     [eap] = handled
(3)   } # authenticate = handled
(3) Using Post-Auth-Type Challenge
(3) # Executing group from file /etc/raddb/sites-enabled/default
(3)   Challenge { ... } # empty sub-section is ignored
(3) Sent Access-Challenge Id 150 from 172.31.0.2:1812 to
172.31.0.3:49093 length 0
(3)   EAP-Message = 0x010100160410b722f325f451938e7258a3026e758f5e
(3)   Message-Authenticator = 0x00000000000000000000000000000000
(3)   State = 0x4a50d16c4a51d5af70b290d9c2260560
(3) Finished request
Waking up in 3.7 seconds.
(4) Received Access-Request Id 151 from 172.31.0.3:49093 to
172.31.0.2:1812 length 169
(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 = 172.31.0.3
(4)   Called-Station-Id = "172.31.0.3[4500]"
(4)   Calling-Station-Id = "172.31.0.1[59303]"
(4)   Acct-Session-Id = "1631737208-4"
(4)   EAP-Message = 0x02010006031a
(4)   NAS-Identifier = "strongSwan"
(4)   State = 0x4a50d16c4a51d5af70b290d9c2260560
(4)   Message-Authenticator = 0x76597d187186bcc0fcaecee9eb73cdde
(4) session-state: No cached attributes
(4) # Executing section authorize from file /etc/raddb/sites-enabled/default
(4)   authorize {
(4)     [preprocess] = ok
(4)     [chap] = noop
(4)     [mschap] = noop
(4) eap: Peer sent EAP Response (code 2) ID 1 length 6
(4) eap: No EAP Start, assuming it's an on-going EAP conversation
(4)     [eap] = updated
(4)   } # authorize = updated
(4) Found Auth-Type = eap
(4) # Executing group from file /etc/raddb/sites-enabled/default
(4)   authenticate {
(4) eap: Expiring EAP session with state 0x4a50d16c4a51d5af
(4) eap: Finished EAP session with state 0x4a50d16c4a51d5af
(4) eap: Previous EAP request found for state 0x4a50d16c4a51d5af,
released from the list
(4) eap: Peer sent packet with method EAP NAK (3)
(4) eap: Found mutually acceptable type MSCHAPv2 (26)
(4) eap: Calling submodule eap_mschapv2 to process data
(4) eap_mschapv2: Issuing Challenge
(4) eap: Sending EAP Request (code 1) ID 2 length 43
(4) eap: EAP session adding &reply:State = 0x4a50d16c4b52cbaf
(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 151 from 172.31.0.2:1812 to
172.31.0.3:49093 length 0
(4)   EAP-Message =
0x0102002b1a0102002610957e5ad4418ab4595d7cda09ef07e86a667265657261646975732d332e302e3233
(4)   Message-Authenticator = 0x00000000000000000000000000000000
(4)   State = 0x4a50d16c4b52cbaf70b290d9c2260560
(4) Finished request
Waking up in 3.7 seconds.
(5) Received Access-Request Id 152 from 172.31.0.3:49093 to
172.31.0.2:1812 length 227
(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 = 172.31.0.3
(5)   Called-Station-Id = "172.31.0.3[4500]"
(5)   Calling-Station-Id = "172.31.0.1[59303]"
(5)   Acct-Session-Id = "1631737208-4"
(5)   EAP-Message =
0x020200401a0202003b31c9a1cdd59ada93fa347cc2cd7b46f75900000000000000000e1be7f8206c5ebcc456c1b11f4b1b1745b329f2bf8bdc35006368726973
(5)   NAS-Identifier = "strongSwan"
(5)   State = 0x4a50d16c4b52cbaf70b290d9c2260560
(5)   Message-Authenticator = 0x5fa51ee284bd707e8ffe05e423b469ca
(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) eap: Peer sent EAP Response (code 2) ID 2 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 0x4a50d16c4b52cbaf
(5) eap: Finished EAP session with state 0x4a50d16c4b52cbaf
(5) eap: Previous EAP request found for state 0x4a50d16c4b52cbaf,
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: WARNING: No Cleartext-Password configured.  Cannot create
NT-Password
(5) mschap: Creating challenge hash with username: chris
(5) mschap: Client is using MS-CHAPv2
(5) mschap: ERROR: FAILED: No NT-Password.  Cannot perform authentication
(5) mschap: ERROR: MS-CHAP2-Response is incorrect
(5) eap_mschapv2:     [mschap] = reject
(5) eap_mschapv2:   } # authenticate = reject
(5) eap: Sending EAP Failure (code 4) ID 2 length 4
(5) eap: Freeing handler
(5)     [eap] = reject
(5)   } # authenticate = reject
(5) Failed to authenticate the user
(5) Using Post-Auth-Type Reject
(5) # Executing group from file /etc/raddb/sites-enabled/default
(5)   Post-Auth-Type REJECT {
(5)     if ( yes == "yes" ) {
(5)     if ( yes == "yes" )  -> TRUE
(5)     if ( yes == "yes" )  {
(5) sql: EXPAND .query
(5) sql:    --> .query
(5) sql: Using query template 'query'
rlm_sql (sql): Reserved connection (2)
(5) sql: EXPAND %{User-Name}
(5) sql:    --> chris
(5) sql: SQL-User-Name set to 'chris'
(5) sql: EXPAND INSERT INTO radpostauth (username, pass, reply,
authdate) VALUES ( '%{SQL-User-Name}',
'%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%S')
(5) sql:    --> INSERT INTO radpostauth (username, pass, reply,
authdate) VALUES ( 'chris', '', 'Access-Reject', '2021-09-15
20:20:17')
(5) sql: Executing query: INSERT INTO radpostauth (username, pass,
reply, authdate) VALUES ( 'chris', '', 'Access-Reject', '2021-09-15
20:20:17')
(5) sql: SQL query returned: success
(5) sql: 1 record(s) updated
rlm_sql (sql): Released connection (2)
Need 3 more connections to reach 10 spares
rlm_sql (sql): Opening additional connection (7), 1 of 25 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
(5)       [sql] = ok
(5)     } # if ( yes == "yes" )  = ok
(5) attr_filter.access_reject: EXPAND %{User-Name}
(5) attr_filter.access_reject:    --> chris
(5) attr_filter.access_reject: Matched entry DEFAULT at line 11
(5)     [attr_filter.access_reject] = updated
(5)     [eap] = noop
(5)     policy remove_reply_message_if_eap {
(5)       if (&reply:EAP-Message && &reply:Reply-Message) {
(5)       if (&reply:EAP-Message && &reply:Reply-Message)  -> FALSE
(5)       else {
(5)         [noop] = noop
(5)       } # else = noop
(5)     } # policy remove_reply_message_if_eap = noop
(5)   } # Post-Auth-Type REJECT = updated
(5) Login incorrect (mschap: FAILED: No NT-Password.  Cannot perform
authentication): [chris/<via Auth-Type = eap>] (from client
rad_clients port 4 cli 172.31.0.1[59303])
(5) Delaying response for 1.000000 seconds
Waking up in 0.6 seconds.
Waking up in 0.3 seconds.
(5) Sending delayed response
(5) Sent Access-Reject Id 152 from 172.31.0.2:1812 to 172.31.0.3:49093
length 127
(5)   MS-CHAP-Error = "\002E=691 R=1
C=f593ba91c010873d11c077fee7815e45 V=3 M=Authentication rejected"
(5)   EAP-Message = 0x04020004
(5)   Message-Authenticator = 0x00000000000000000000000000000000
Waking up in 2.7 seconds.
(0) Cleaning up request packet ID 147 with timestamp +8
(1) Cleaning up request packet ID 148 with timestamp +8
(2) Cleaning up request packet ID 149 with timestamp +8
Waking up in 1.1 seconds.
(3) Cleaning up request packet ID 150 with timestamp +9
(4) Cleaning up request packet ID 151 with timestamp +9
(5) Cleaning up request packet ID 152 with timestamp +9
Ready to process requests


TIA
__
Regards
Chris Myburgh

__
Regards
Chris Myburgh


On Wed, Sep 15, 2021 at 9:54 PM Matthew Newton <mcn at freeradius.org> wrote:
>
>
>
> On 15/09/2021 20:40, Chris Myburgh wrote:
> > Any assistance or additional information I can provide to help the
> > investigation?
>
> The full debug log from radiusd -X, as requested all the time on this list?
>
> https://wiki.freeradius.org/list-help
>
> At a guess, you're probably calling sql in the outer virtual server, and
> not in the inner. But without the logs we're all just guessing.
>
> --
> Matthew
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list