Using configuration items in strings

Caines, Max Max.Caines at wlv.ac.uk
Fri Feb 14 17:06:42 CET 2014


Hi

I'm trying to make some of my configuration dependent on whether I've configured SQL, so I can create an easy way to turn off all use of SQL by our servers (we don't have a cluster, and we don't use the SQL server for authentication, so if it went down, we could do without it for a bit). I've used an "if" statement testing "%{config:modules.sql.server}", which I expected to give me the value "NPS" if I had set the value and null otherwise. That way I thought I could just comment out the "$INCLUDE mssql.conf" in radius.conf, and the "sql" in the "instantiate" section (we are only using SQL in "xlat" expressions) and avoid the "xlat" expressions being evaluated. However, it looks like whether I include "mssql.conf" or not, that expression always evaluates to "localhost". I'm baffled. Should this work? I got this expression format from https://github.com/FreeRADIUS/www.freeradius.org/blob/master/radiusd/doc/variables.txt. 

This is the debug log, including a query that uses the expression:

Script started on Fri Feb 14 15:49:49 2014
ccuh-old# /usr/local/sbin/radiusd -X
FreeRADIUS Version 2.2.0, for host sparc-sun-solaris2.8, built on Apr 28 2013 at 13:14:32
Copyright (C) 1999-2012 The FreeRADIUS server project and contributors. 
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE. 
You may redistribute copies of FreeRADIUS under the terms of the 
GNU General Public License v2. 
Starting - reading configuration files ...
including configuration file /usr/local/etc/raddb/radiusd.conf
including configuration file /usr/local/etc/raddb/proxy.conf
including configuration file /usr/local/etc/raddb/eduroam.conf
including configuration file /usr/local/etc/raddb/clients.conf
including files in directory /usr/local/etc/raddb/modules/
including configuration file /usr/local/etc/raddb/modules/realm
including configuration file /usr/local/etc/raddb/modules/acct_unique
including configuration file /usr/local/etc/raddb/modules/always
including configuration file /usr/local/etc/raddb/modules/attr_filter
including configuration file /usr/local/etc/raddb/modules/attr_rewrite
including configuration file /usr/local/etc/raddb/modules/chap
including configuration file /usr/local/etc/raddb/modules/checkval
including configuration file /usr/local/etc/raddb/modules/counter
including configuration file /usr/local/etc/raddb/modules/cui
including configuration file /usr/local/etc/raddb/modules/detail
including configuration file /usr/local/etc/raddb/modules/detail.example.com
including configuration file /usr/local/etc/raddb/modules/detail.log
including configuration file /usr/local/etc/raddb/modules/digest
including configuration file /usr/local/etc/raddb/modules/dynamic_clients
including configuration file /usr/local/etc/raddb/modules/echo
including configuration file /usr/local/etc/raddb/modules/etc_group
including configuration file /usr/local/etc/raddb/modules/exec
including configuration file /usr/local/etc/raddb/modules/expiration
including configuration file /usr/local/etc/raddb/modules/expr
including configuration file /usr/local/etc/raddb/modules/files
including configuration file /usr/local/etc/raddb/modules/inner-eap
including configuration file /usr/local/etc/raddb/modules/ippool
including configuration file /usr/local/etc/raddb/modules/krb5
including configuration file /usr/local/etc/raddb/modules/ldap
including configuration file /usr/local/etc/raddb/modules/linelog
including configuration file /usr/local/etc/raddb/modules/logintime
including configuration file /usr/local/etc/raddb/modules/mac2ip
including configuration file /usr/local/etc/raddb/modules/mschap
including configuration file /usr/local/etc/raddb/modules/mac2vlan
including configuration file /usr/local/etc/raddb/modules/ntlm_auth
including configuration file /usr/local/etc/raddb/modules/opendirectory
including configuration file /usr/local/etc/raddb/modules/otp
including configuration file /usr/local/etc/raddb/modules/pam
including configuration file /usr/local/etc/raddb/modules/pap
including configuration file /usr/local/etc/raddb/modules/passwd
including configuration file /usr/local/etc/raddb/modules/perl
including configuration file /usr/local/etc/raddb/modules/policy
including configuration file /usr/local/etc/raddb/modules/preprocess
including configuration file /usr/local/etc/raddb/modules/radutmp
including configuration file /usr/local/etc/raddb/modules/cache
including configuration file /usr/local/etc/raddb/modules/smbpasswd
including configuration file /usr/local/etc/raddb/modules/smsotp
including configuration file /usr/local/etc/raddb/modules/sql_log
including configuration file /usr/local/etc/raddb/modules/sqlcounter_expire_on_login
including configuration file /usr/local/etc/raddb/modules/sradutmp
including configuration file /usr/local/etc/raddb/modules/unix
including configuration file /usr/local/etc/raddb/modules/wimax
including configuration file /usr/local/etc/raddb/modules/redis
including configuration file /usr/local/etc/raddb/modules/rediswho
including configuration file /usr/local/etc/raddb/modules/replicate
including configuration file /usr/local/etc/raddb/modules/soh
including configuration file /usr/local/etc/raddb/modules/dhcp_sqlippool
including configuration file /usr/local/etc/raddb/sql/mysql/ippool-dhcp.conf
including configuration file /usr/local/etc/raddb/modules/radrelay
including configuration file /usr/local/etc/raddb/eap.conf
including configuration file /usr/local/etc/raddb/mssql.conf
including configuration file /usr/local/etc/raddb/policy.conf
including files in directory /usr/local/etc/raddb/sites-enabled/
including configuration file /usr/local/etc/raddb/sites-enabled/default
including configuration file /usr/local/etc/raddb/sites-enabled/inner-tunnel
including configuration file /usr/local/etc/raddb/sites-enabled/control-socket
including configuration file /usr/local/etc/raddb/sites-enabled/vmps
main {
	user = "radius"
	group = "radius"
	allow_core_dumps = no
}
including dictionary file /usr/local/etc/raddb/dictionary
main {
	name = "radiusd"
	prefix = "/usr/local"
	localstatedir = "/usr/local/var"
	sbindir = "/usr/local/sbin"
	logdir = "/usr/local/var/log/radius"
	run_dir = "/usr/local/var/run/radiusd"
	libdir = "/usr/local/lib"
	radacctdir = "/usr/local/var/log/radius/radacct"
	hostname_lookups = no
	max_request_time = 30
	cleanup_delay = 5
	max_requests = 1024
	pidfile = "/usr/local/var/run/radiusd/radiusd.pid"
	checkrad = "/usr/local/sbin/checkrad"
	debug_level = 0
	proxy_requests = yes
 log {
	stripped_names = no
	auth = yes
	auth_badpass = no
	auth_goodpass = no
 }
 security {
	max_attributes = 200
	reject_delay = 0
	status_server = yes
 }
}
radiusd: #### Loading Realms and Home Servers ####
 proxy server {
	retry_delay = 5
	retry_count = 3
	default_fallback = no
	dead_time = 120
	wake_all_if_all_dead = no
 }
 home_server nap1 {
	ipaddr = 134.220.1.125
	port = 1812
	type = "auth+acct"
	response_window = 20
	max_outstanding = 65536
	require_message_authenticator = yes
	zombie_period = 40
	status_check = "none"
	ping_interval = 30
	check_interval = 30
	num_answers_to_alive = 3
	num_pings_to_alive = 3
	revive_interval = 120
	status_check_timeout = 4
 }
 home_server nap2 {
	ipaddr = 134.220.1.120
	port = 1812
	type = "auth+acct"
	response_window = 20
	max_outstanding = 65536
	require_message_authenticator = yes
	zombie_period = 40
	status_check = "none"
	ping_interval = 30
	check_interval = 30
	num_answers_to_alive = 3
	num_pings_to_alive = 3
	revive_interval = 120
	status_check_timeout = 4
 }
 home_server eduroam0 {
	ipaddr = roaming0.ja.net IP address [194.82.174.185]
	port = 1812
	type = "auth+acct"
	response_window = 30
	max_outstanding = 65536
	require_message_authenticator = yes
	zombie_period = 40
	status_check = "status-server"
	ping_interval = 30
	check_interval = 30
	num_answers_to_alive = 3
	num_pings_to_alive = 3
	revive_interval = 300
	status_check_timeout = 4
 }
 home_server eduroam1 {
	ipaddr = roaming1.ja.net IP address [194.83.56.233]
	port = 1812
	type = "auth+acct"
	response_window = 30
	max_outstanding = 65536
	require_message_authenticator = yes
	zombie_period = 40
	status_check = "status-server"
	ping_interval = 30
	check_interval = 30
	num_answers_to_alive = 3
	num_pings_to_alive = 3
	revive_interval = 300
	status_check_timeout = 4
 }
 home_server eduroam2 {
	ipaddr = roaming2.ja.net IP address [194.83.56.249]
	port = 1812
	type = "auth+acct"
	response_window = 30
	max_outstanding = 65536
	require_message_authenticator = yes
	zombie_period = 40
	status_check = "status-server"
	ping_interval = 30
	check_interval = 30
	num_answers_to_alive = 3
	num_pings_to_alive = 3
	revive_interval = 300
	status_check_timeout = 4
 }
 home_server_pool nap_pool {
	type = fail-over
	home_server = nap2
	home_server = nap1
 }
 realm ~(.*)\.wlv\.ac\.uk$ {
	pool = nap_pool
 }
 realm wlv.ac.uk {
	pool = nap_pool
	nostrip
 }
 realm NULL {
	pool = nap_pool
 }
 home_server_pool eduroam_pool {
	type = client-port-balance
	home_server = eduroam0
	home_server = eduroam1
	home_server = eduroam2
 }
 realm DEFAULT {
	pool = eduroam_pool
	nostrip
 }
 realm LOCAL {
 }
radiusd: #### Loading Clients ####
 client localhost {
	ipaddr = 127.0.0.1
	require_message_authenticator = no
	nastype = "other"
 }
 client max {
	ipaddr = 134.220.193.4
	require_message_authenticator = no
	nastype = "other"
 }
 client Wism1 {
	ipaddr = 10.4.0.2
	require_message_authenticator = no
	nastype = "cisco"
 }
 client Wism2 {
	ipaddr = 10.4.0.4
	require_message_authenticator = no
	nastype = "cisco"
 }
 client Wism3 {
	ipaddr = 10.4.0.6
	require_message_authenticator = no
	nastype = "cisco"
 }
 client roaming0.ja.net {
	ipaddr = roaming0.ja.net IP address [194.82.174.185]
	require_message_authenticator = no
	shortname = "roaming0.ja.net"
	nastype = "other"
 }
 client roaming1.ja.net {
	ipaddr = roaming1.ja.net IP address [194.83.56.233]
	require_message_authenticator = no
	shortname = "roaming1.ja.net"
	nastype = "other"
 }
 client roaming2.ja.net {
	ipaddr = roaming2.ja.net IP address [194.83.56.249]
	require_message_authenticator = no
	shortname = "roaming2.ja.net"
	nastype = "other"
 }
radiusd: #### Instantiating modules ####
 instantiate {
 Module: Linked to module rlm_exec
 Module: Instantiating module "exec" from file /usr/local/etc/raddb/modules/exec
  exec {
	wait = no
	input_pairs = "request"
	shell_escape = yes
  }
 Module: Linked to module rlm_expr
 Module: Instantiating module "expr" from file /usr/local/etc/raddb/modules/expr
 Module: Linked to module rlm_expiration
 Module: Instantiating module "expiration" from file /usr/local/etc/raddb/modules/expiration
  expiration {
	reply-message = "Password Has Expired  "
  }
 Module: Linked to module rlm_logintime
 Module: Instantiating module "logintime" from file /usr/local/etc/raddb/modules/logintime
  logintime {
	reply-message = "You are calling outside your allowed timespan  "
	minimum-timeout = 60
  }
 Module: Linked to module rlm_sql
 Module: Instantiating module "sql" from file /usr/local/etc/raddb/mssql.conf
  sql {
	driver = "rlm_sql_unixodbc"
	server = "NPS"
	port = ""
	login = "NPS"
	password = "il*Gw&._"
	radius_db = "radius"
	read_groups = yes
	sqltrace = no
	sqltracefile = "/usr/local/var/log/radius/sqltrace.log"
	readclients = no
	deletestalesessions = yes
	num_sql_socks = 4
	lifetime = 0
	max_queries = 0
	sql_user_name = ""
	default_user_profile = ""
	nas_query = "SELECT id,nasname,shortname,type,secret FROM nas"
	authorize_check_query = ""
	authorize_group_check_query = ""
	authorize_group_reply_query = ""
	accounting_onoff_query = ""
	accounting_update_query = ""
	accounting_update_query_alt = ""
	accounting_start_query = ""
	accounting_start_query_alt = ""
	accounting_stop_query = ""
	accounting_stop_query_alt = ""
	connect_failure_retry_delay = 60
	simul_count_query = ""
	simul_verify_query = ""
	postauth_query = ""
	safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
  }
rlm_sql (sql): Driver rlm_sql_unixodbc (module rlm_sql_unixodbc) loaded and linked
rlm_sql (sql): Attempting to connect to NPS at NPS:/radius
rlm_sql (sql): starting 0
rlm_sql (sql): Attempting to connect rlm_sql_unixodbc #0
rlm_sql (sql): Connected new DB handle, #0
rlm_sql (sql): starting 1
rlm_sql (sql): Attempting to connect rlm_sql_unixodbc #1
rlm_sql (sql): Connected new DB handle, #1
rlm_sql (sql): starting 2
rlm_sql (sql): Attempting to connect rlm_sql_unixodbc #2
rlm_sql (sql): Connected new DB handle, #2
rlm_sql (sql): starting 3
rlm_sql (sql): Attempting to connect rlm_sql_unixodbc #3
rlm_sql (sql): Connected new DB handle, #3
 Module: Linked to module rlm_ldap
 Module: Instantiating module "ldap" from file /usr/local/etc/raddb/modules/ldap
  ldap {
	server = "dc2.unv.wlv.ac.uk"
	port = 389
	password = "ax2013"
	identity = "cn=UNIX,cn=Users,dc=unv,dc=wlv,dc=ac,dc=uk"
	net_timeout = 1
	timeout = 4
	timelimit = 3
	max_uses = 0
	tls_mode = no
	start_tls = no
	tls_require_cert = "allow"
   tls {
	start_tls = no
	require_cert = "allow"
   }
	basedn = "ou=2kusers,dc=unv,dc=wlv,dc=ac,dc=uk"
	filter = "(uid=%u)"
	base_filter = "(objectclass=radiusprofile)"
	auto_header = no
	access_attr_used_for_allow = yes
	groupname_attribute = "cn"
	groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{Ldap-UserDn})))"
	dictionary_mapping = "/usr/local/etc/raddb/ldap.attrmap"
	ldap_debug = 0
	ldap_connections_number = 5
	compare_check_items = no
	do_xlat = yes
	set_auth_type = no
  }
rlm_ldap: Registering ldap_groupcmp for Ldap-Group
rlm_ldap: Registering ldap_xlat with xlat_name ldap
rlm_ldap: reading ldap<->radius mappings from file /usr/local/etc/raddb/ldap.attrmap
rlm_ldap: LDAP radiusCheckItem mapped to RADIUS $GENERIC$
rlm_ldap: LDAP radiusReplyItem mapped to RADIUS $GENERIC$
rlm_ldap: LDAP radiusAuthType mapped to RADIUS Auth-Type
rlm_ldap: LDAP radiusSimultaneousUse mapped to RADIUS Simultaneous-Use
rlm_ldap: LDAP radiusCalledStationId mapped to RADIUS Called-Station-Id
rlm_ldap: LDAP radiusCallingStationId mapped to RADIUS Calling-Station-Id
rlm_ldap: LDAP lmPassword mapped to RADIUS LM-Password
rlm_ldap: LDAP ntPassword mapped to RADIUS NT-Password
rlm_ldap: LDAP sambaLmPassword mapped to RADIUS LM-Password
rlm_ldap: LDAP sambaNtPassword mapped to RADIUS NT-Password
rlm_ldap: LDAP dBCSPwd mapped to RADIUS LM-Password
rlm_ldap: LDAP userPassword mapped to RADIUS Password-With-Header
rlm_ldap: LDAP acctFlags mapped to RADIUS SMB-Account-CTRL-TEXT
rlm_ldap: LDAP radiusExpiration mapped to RADIUS Expiration
rlm_ldap: LDAP radiusNASIpAddress mapped to RADIUS NAS-IP-Address
rlm_ldap: LDAP radiusServiceType mapped to RADIUS Service-Type
rlm_ldap: LDAP radiusFramedProtocol mapped to RADIUS Framed-Protocol
rlm_ldap: LDAP radiusFramedIPAddress mapped to RADIUS Framed-IP-Address
rlm_ldap: LDAP radiusFramedIPNetmask mapped to RADIUS Framed-IP-Netmask
rlm_ldap: LDAP radiusFramedRoute mapped to RADIUS Framed-Route
rlm_ldap: LDAP radiusFramedRouting mapped to RADIUS Framed-Routing
rlm_ldap: LDAP radiusFilterId mapped to RADIUS Filter-Id
rlm_ldap: LDAP radiusFramedMTU mapped to RADIUS Framed-MTU
rlm_ldap: LDAP radiusFramedCompression mapped to RADIUS Framed-Compression
rlm_ldap: LDAP radiusLoginIPHost mapped to RADIUS Login-IP-Host
rlm_ldap: LDAP radiusLoginService mapped to RADIUS Login-Service
rlm_ldap: LDAP radiusLoginTCPPort mapped to RADIUS Login-TCP-Port
rlm_ldap: LDAP radiusCallbackNumber mapped to RADIUS Callback-Number
rlm_ldap: LDAP radiusCallbackId mapped to RADIUS Callback-Id
rlm_ldap: LDAP radiusFramedIPXNetwork mapped to RADIUS Framed-IPX-Network
rlm_ldap: LDAP radiusClass mapped to RADIUS Class
rlm_ldap: LDAP radiusSessionTimeout mapped to RADIUS Session-Timeout
rlm_ldap: LDAP radiusIdleTimeout mapped to RADIUS Idle-Timeout
rlm_ldap: LDAP radiusTerminationAction mapped to RADIUS Termination-Action
rlm_ldap: LDAP radiusLoginLATService mapped to RADIUS Login-LAT-Service
rlm_ldap: LDAP radiusLoginLATNode mapped to RADIUS Login-LAT-Node
rlm_ldap: LDAP radiusLoginLATGroup mapped to RADIUS Login-LAT-Group
rlm_ldap: LDAP radiusFramedAppleTalkLink mapped to RADIUS Framed-AppleTalk-Link
rlm_ldap: LDAP radiusFramedAppleTalkNetwork mapped to RADIUS Framed-AppleTalk-Network
rlm_ldap: LDAP radiusFramedAppleTalkZone mapped to RADIUS Framed-AppleTalk-Zone
rlm_ldap: LDAP radiusPortLimit mapped to RADIUS Port-Limit
rlm_ldap: LDAP radiusLoginLATPort mapped to RADIUS Login-LAT-Port
rlm_ldap: LDAP radiusReplyMessage mapped to RADIUS Reply-Message
rlm_ldap: LDAP radiusTunnelType mapped to RADIUS Tunnel-Type
rlm_ldap: LDAP radiusTunnelMediumType mapped to RADIUS Tunnel-Medium-Type
rlm_ldap: LDAP radiusTunnelPrivateGroupId mapped to RADIUS Tunnel-Private-Group-Id
conns: 1ee8f8
 }
radiusd: #### Loading Virtual Servers ####
server { # from file /usr/local/etc/raddb/radiusd.conf
 modules {
  Module: Creating Post-Auth-Type = REJECT
 Module: Checking authenticate {...} for more modules to load
 Module: Linked to module rlm_pap
 Module: Instantiating module "pap" from file /usr/local/etc/raddb/modules/pap
  pap {
	encryption_scheme = "auto"
	auto_header = no
  }
 Module: Linked to module rlm_chap
 Module: Instantiating module "chap" from file /usr/local/etc/raddb/modules/chap
 Module: Linked to module rlm_mschap
 Module: Instantiating module "mschap" from file /usr/local/etc/raddb/modules/mschap
  mschap {
	use_mppe = yes
	require_encryption = no
	require_strong = no
	with_ntdomain_hack = no
	allow_retry = yes
  }
 Module: Checking authorize {...} for more modules to load
 Module: Linked to module rlm_preprocess
 Module: Instantiating module "preprocess" from file /usr/local/etc/raddb/modules/preprocess
  preprocess {
	huntgroups = "/usr/local/etc/raddb/huntgroups"
	hints = "/usr/local/etc/raddb/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
  }
reading pairlist file /usr/local/etc/raddb/huntgroups
reading pairlist file /usr/local/etc/raddb/hints
 Module: Loading virtual module filter_username
 Module: Linked to module rlm_always
 Module: Instantiating module "reject" from file /usr/local/etc/raddb/modules/always
  always reject {
	rcode = "reject"
	simulcount = 0
	mpp = no
  }
 Module: Linked to module rlm_realm
 Module: Instantiating module "suffix" from file /usr/local/etc/raddb/modules/realm
  realm suffix {
	format = "suffix"
	delimiter = "@"
	ignore_default = no
	ignore_null = no
  }
 Module: Loading virtual module rewrite_calling_station_id
 Module: Instantiating module "noop" from file /usr/local/etc/raddb/modules/always
  always noop {
	rcode = "noop"
	simulcount = 0
	mpp = no
  }
 Module: Instantiating module "ok" from file /usr/local/etc/raddb/modules/always
  always ok {
	rcode = "ok"
	simulcount = 0
	mpp = no
  }
 Module: Checking preacct {...} for more modules to load
 Module: Linked to module rlm_acct_unique
 Module: Instantiating module "acct_unique" from file /usr/local/etc/raddb/modules/acct_unique
  acct_unique {
	key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"
  }
 Module: Loading virtual module rewrite_calling_station_id
 Module: Linked to module rlm_perl
 Module: Instantiating module "perl" from file /usr/local/etc/raddb/modules/perl
  perl {
	module = "/usr/local/etc/raddb/paloalto.pl"
	func_authorize = "authorize"
	func_authenticate = "authenticate"
	func_accounting = "accounting"
	func_preacct = "preacct"
	func_checksimul = "checksimul"
	func_detach = "detach"
	func_xlat = "xlat"
	func_pre_proxy = "pre_proxy"
	func_post_proxy = "post_proxy"
	func_post_auth = "post_auth"
	func_recv_coa = "recv_coa"
	func_send_coa = "send_coa"
  }
 Module: Checking accounting {...} for more modules to load
 Module: Checking session {...} for more modules to load
 Module: Linked to module rlm_radutmp
 Module: Instantiating module "radutmp" from file /usr/local/etc/raddb/modules/radutmp
  radutmp {
	filename = "/usr/local/var/log/radius/radutmp"
	username = "%{User-Name}"
	case_sensitive = yes
	check_with_nas = yes
	perm = 384
	callerid = yes
  }
 Module: Checking post-auth {...} for more modules to load
 Module: Loading virtual module rewrite_calling_station_id
 Module: Linked to module rlm_attr_filter
 Module: Instantiating module "attr_filter.access_reject" from file /usr/local/etc/raddb/modules/attr_filter
  attr_filter attr_filter.access_reject {
	attrsfile = "/usr/local/etc/raddb/attrs.access_reject"
	key = "%{User-Name}"
	relaxed = no
  }
reading pairlist file /usr/local/etc/raddb/attrs.access_reject
 } # modules
} # server
server inner-tunnel { # from file /usr/local/etc/raddb/sites-enabled/inner-tunnel
 modules {
 Module: Checking authenticate {...} for more modules to load
 Module: Linked to module rlm_unix
 Module: Instantiating module "unix" from file /usr/local/etc/raddb/modules/unix
  unix {
	radwtmp = "/usr/local/var/log/radius/radwtmp"
  }
 Module: Linked to module rlm_eap
 Module: Instantiating module "eap" from file /usr/local/etc/raddb/eap.conf
  eap {
	default_eap_type = "md5"
	timer_expire = 60
	ignore_unknown_eap_types = no
	cisco_accounting_username_bug = no
	max_sessions = 4096
  }
 Module: Linked to sub-module rlm_eap_md5
 Module: Instantiating eap-md5
 Module: Linked to sub-module rlm_eap_leap
 Module: Instantiating eap-leap
 Module: Linked to sub-module rlm_eap_gtc
 Module: Instantiating eap-gtc
   gtc {
	challenge = "Password: "
	auth_type = "PAP"
   }
 Module: Linked to sub-module rlm_eap_tls
 Module: Instantiating eap-tls
   tls {
	rsa_key_exchange = no
	dh_key_exchange = yes
	rsa_key_length = 512
	dh_key_length = 512
	verify_depth = 0
	CA_path = "/usr/local/etc/raddb/certs"
	pem_file_type = yes
	private_key_file = "/usr/local/etc/raddb/certs/server.pvk"
	certificate_file = "/usr/local/etc/raddb/certs/server.pem"
	CA_file = "/usr/local/etc/raddb/certs/ca.pem"
	dh_file = "/usr/local/etc/raddb/certs/dh"
	random_file = "/usr/local/etc/raddb/certs/random"
	fragment_size = 1024
	include_length = yes
	check_crl = no
	cipher_list = "DEFAULT"
	ecdh_curve = "prime256v1"
    cache {
	enable = no
	lifetime = 24
	max_entries = 255
    }
    verify {
    }
   }
 Module: Linked to sub-module rlm_eap_ttls
 Module: Instantiating eap-ttls
   ttls {
	default_eap_type = "md5"
	copy_request_to_tunnel = no
	use_tunneled_reply = no
	virtual_server = "inner-tunnel"
	include_length = yes
   }
 Module: Linked to sub-module rlm_eap_peap
 Module: Instantiating eap-peap
   peap {
	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
   }
 Module: Linked to sub-module rlm_eap_mschapv2
 Module: Instantiating eap-mschapv2
   mschapv2 {
	with_ntdomain_hack = no
	send_error = no
   }
 Module: Checking authorize {...} for more modules to load
 Module: Linked to module rlm_files
 Module: Instantiating module "files" from file /usr/local/etc/raddb/modules/files
  files {
	usersfile = "/usr/local/etc/raddb/users"
	acctusersfile = "/usr/local/etc/raddb/acct_users"
	preproxy_usersfile = "/usr/local/etc/raddb/preproxy_users"
	compat = "no"
  }
reading pairlist file /usr/local/etc/raddb/users
reading pairlist file /usr/local/etc/raddb/acct_users
reading pairlist file /usr/local/etc/raddb/preproxy_users
 Module: Checking session {...} for more modules to load
 Module: Checking post-proxy {...} for more modules to load
 Module: Checking post-auth {...} for more modules to load
 } # modules
} # server
server vmps { # from file /usr/local/etc/raddb/sites-enabled/vmps
 modules {
 Module: Checking vmps {...} for more modules to load
 Module: Linked to module rlm_linelog
 Module: Instantiating module "linelog.vmps" from file /usr/local/etc/raddb/modules/linelog
  linelog linelog.vmps {
	filename = "syslog"
	permissions = 384
	format = "Wired access by %{VMPS-Mac} -> VLAN %{VMPS-Vlan-Name}"
  }
 } # modules
} # server
radiusd: #### Opening IP addresses and Ports ####
listen {
	type = "auth"
	ipaddr = *
	port = 0
}
listen {
	type = "acct"
	ipaddr = *
	port = 0
}
listen {
	type = "control"
 listen {
	socket = "/usr/local/var/run/radiusd/radiusd.sock"
 }
}
listen {
	type = "auth"
	ipaddr = 127.0.0.1
	port = 18120
}
listen {
	type = "vmps"
	ipaddr = *
	port = 1589
  client switches {
	ipaddr = 134.220.128.0
	netmask = 21
	require_message_authenticator = no
	shortname = "switches"
	nastype = "other"
  }
}
 ... adding new socket proxy address * port 34971
 ... adding new socket proxy address * port 34972
 ... adding new socket proxy address * port 34973
 ... adding new socket proxy address * port 34974
 ... adding new socket proxy address * port 34975
 ... adding new socket proxy address * port 34976
 ... adding new socket proxy address * port 34977
 ... adding new socket proxy address * port 34978
 ... adding new socket proxy address * port 34979
 ... adding new socket proxy address * port 34980
Listening on authentication address * port 1812
Listening on accounting address * port 1813
Listening on command file /usr/local/var/run/radiusd/radiusd.sock
Listening on authentication address 127.0.0.1 port 18120 as server inner-tunnel
Listening on vmps address * port 1589 as server vmps
Listening on proxy address * port 1814
Ready to process requests.
rad_recv: Access-Request packet from host 134.220.193.4 port 57295, id=21, length=59
	User-Name = "S.Maxtest at wlv.ac.uk"
	User-Password = "bq9383bq"
# Executing section authorize from file /usr/local/etc/raddb/sites-enabled/default
+- entering group authorize {...}
++[preprocess] returns ok
++- entering policy filter_username {...}
+++? if (User-Name =~ / /)
? Evaluating (User-Name =~ / /) -> FALSE
+++? if (User-Name =~ / /) -> FALSE
+++? if (User-Name =~ /@(.+)?@/i )
? Evaluating (User-Name =~ /@(.+)?@/i) -> FALSE
+++? if (User-Name =~ /@(.+)?@/i ) -> FALSE
+++? if (User-Name =~ /\\.\\./ )
? Evaluating (User-Name =~ /\\.\\./) -> FALSE
+++? if (User-Name =~ /\\.\\./ ) -> FALSE
+++? if (User-Name =~ /\\.$/)
? Evaluating (User-Name =~ /\\.$/) -> FALSE
+++? if (User-Name =~ /\\.$/) -> FALSE
+++? if (User-Name =~ /@\\./)
? Evaluating (User-Name =~ /@\\./) -> FALSE
+++? if (User-Name =~ /@\\./) -> FALSE
+++? if (User-Name =~ /@.*(3gppnetwork\\.org|myabc\\.com|hotmail\\.com|uniwlv\\ac\\.uk|\\.a[^c]\\.uk)$/i)
? Evaluating (User-Name =~ /@.*(3gppnetwork\\.org|myabc\\.com|hotmail\\.com|uniwlv\\ac\\.uk|\\.a[^c]\\.uk)$/i) -> FALSE
+++? if (User-Name =~ /@.*(3gppnetwork\\.org|myabc\\.com|hotmail\\.com|uniwlv\\ac\\.uk|\\.a[^c]\\.uk)$/i) -> FALSE
+++? if (User-Name =~ /\\\\/ && User-Name !~ /^unv\\\\.+/i)
? Evaluating (User-Name =~ /\\\\/) -> FALSE
? Skipping (User-Name !~ /^unv\\\\.+/i)
+++? if (User-Name =~ /\\\\/ && User-Name !~ /^unv\\\\.+/i) -> FALSE
++- policy filter_username returns ok
[suffix] Looking up realm "wlv.ac.uk" for User-Name = "S.Maxtest at wlv.ac.uk"
[suffix] Found realm "wlv.ac.uk"
[suffix] Adding Realm = "wlv.ac.uk"
[suffix] Proxying request from user S.Maxtest to realm wlv.ac.uk
[suffix] Preparing to proxy authentication request to realm "wlv.ac.uk" 
++[suffix] returns updated
++? if (Service-Type == 'Call-Check')
    (Attribute Service-Type was not found)
? Evaluating (Service-Type == 'Call-Check') -> FALSE
++? if (Service-Type == 'Call-Check') -> FALSE
++[pap] returns noop
  WARNING: Empty pre-proxy section.  Using default return values.
Sending Access-Request of id 115 to 134.220.1.120 port 1812
	User-Name = "S.Maxtest at wlv.ac.uk"
	NAS-IP-Address = 134.220.193.4
	Message-Authenticator := 0x00000000000000000000000000000000
	Proxy-State = 0x3231
Proxying request 0 to home server 134.220.1.120 port 1812
Sending Access-Request of id 115 to 134.220.1.120 port 1812
	User-Name = "S.Maxtest at wlv.ac.uk"
	NAS-IP-Address = 134.220.193.4
	Message-Authenticator := 0x00000000000000000000000000000000
	Proxy-State = 0x3231
Going to the next request
Waking up in 0.9 seconds.
rad_recv: Access-Accept packet from host 134.220.1.120 port 1812, id=115, length=82
	Proxy-State = 0x3231
	Framed-Protocol = PPP
	Service-Type = Framed-User
	Class = 0x78260890000001370001020086dc017800000000000000000000000001cf1c14d4e8eea90000000000bae884
  WARNING: Empty post-proxy section.  Using default return values.
Found Auth-Type = Accept
Auth-Type = Accept, accepting the user
Login OK: [S.Maxtest at wlv.ac.uk] (from client max port 0)
# Executing section post-auth from file /usr/local/etc/raddb/sites-enabled/default
+- entering group post-auth {...}
++- entering policy rewrite_calling_station_id {...}
+++? if (Calling-Station-Id =~ /([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})/i)
    (Attribute Calling-Station-Id was not found)
? Evaluating (Calling-Station-Id =~ /([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})/i) -> FALSE
+++? if (Calling-Station-Id =~ /([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})[-:\.]?([0-9a-f]{2})/i) -> FALSE
+++- entering else else {...}
++++[noop] returns noop
+++- else else returns noop
++- policy rewrite_calling_station_id returns noop
++? if ("%{config:modules.sql.server}" == 'NPS' && !(User-Password && Service-Type == Login-User) && "%{sql:SELECT COUNT(*) FROM identifications WHERE macaddr = '%{Calling-Station-ID}' AND blocked = 1}" >= 1)
	expand: modules.sql.server -> modules.sql.server
	expand: %{config:modules.sql.server} -> localhost
? Evaluating ("%{config:modules.sql.server}" == 'NPS' ) -> FALSE
?? Skipping (User-Password )
?? Skipping (Service-Type == Login-User)
? Skipping ("%{sql:SELECT COUNT(*) FROM identifications WHERE macaddr = '%{Calling-Station-ID}' AND blocked = 1}" >= 1)
++? if ("%{config:modules.sql.server}" == 'NPS' && !(User-Password && Service-Type == Login-User) && "%{sql:SELECT COUNT(*) FROM identifications WHERE macaddr = '%{Calling-Station-ID}' AND blocked = 1}" >= 1) -> FALSE
++? if (control:Proxy-To-Realm == DEFAULT)
? Evaluating (control:Proxy-To-Realm == DEFAULT) -> FALSE
++? if (control:Proxy-To-Realm == DEFAULT) -> FALSE
++[exec] returns noop
Sending Access-Accept of id 21 to 134.220.193.4 port 57295
	Framed-Protocol = PPP
	Service-Type = Framed-User
	Class = 0x78260890000001370001020086dc017800000000000000000000000001cf1c14d4e8eea90000000000bae884
Finished request 0.
Going to the next request
Waking up in 4.9 seconds.
^C
ccuh-old# 
script done on Fri Feb 14 15:50:01 2014
-- 
Scanned by iCritical.


More information about the Freeradius-Users mailing list