#
# maze.meitech.com/usr/local/etc/raddb/radiusd.conf
#

prefix = /usr/local
exec_prefix = ${prefix}
sysconfdir = ${prefix}/etc
localstatedir = /var
sbindir = ${exec_prefix}/sbin
logdir = /var/log
raddbdir = ${sysconfdir}/raddb
radacctdir = ${logdir}/radacct
confdir = ${raddbdir}
run_dir = ${localstatedir}/run/radiusd

log_file = /usr/local/etc/raddb/radius.log

log_destination = files

libdir=/usr/local/lib

pidfile = /var/run/radiusd/radiusd.pid

user = www
group = www

max_request_time = 30

delete_blocked_requests = no

cleanup_delay = 5

max_requests = 1024

listen {
	ipaddr = 69.33.133.24
	port = 1812
	type = auth
}

listen {
	ipaddr = 69.33.133.24
	port = 1813
	type = acct
}

hostname_lookups = no

allow_core_dumps = no

regular_expressions = no
extended_expressions = no

log {
}

log_stripped_names = no
log_auth = yes
log_auth_badpass = yes
log_auth_goodpass = no

usercollide = no

lower_user = before
lower_pass = before

nospace_user = before
nospace_pass = no

checkrad = /usr/local/sbin/checkrad

security {
	max_attributes = 200
	reject_delay = 1
	status_server = no
}

proxy_requests = no

proxy server {
	synchronous = no
	retry_delay = 5
	retry_count = 3
	dead_time = 120
	default_fallback = yes
	post_proxy_authorize = yes
}

realm LOCAL {
	type = radius
	authhost = LOCAL
	accthost = LOCAL
}

client 127.0.0.1 {
	secret = password
	shortname = localhost
}

client 192.168.100.7 {
	secret = password
	shortname = wireless.meitech.com
}

snmp = no

thread pool {
	start_servers = 5
	max_servers = 32
	min_spare_servers = 3
	max_spare_servers = 10
	max_requests_per_server = 0
}

modules {
	pap {
		encryption_scheme = crypt
	}

	chap {
		authtype = CHAP
	}


	files {
		usersfile = /usr/local/etc/raddb/users
		acctusersfile = /usr/local/etc/raddb/acct_users
		compat = no
	}

	detail {
		detailfile = /usr/local/etc/raddb/radacct/%{Client-IP-Address}/detail-%Y%m%d
		detailperm = 0600
	}

	acct_unique {
		key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"
	}

	eap {
		default_eap_type = tls
		timer_expire = 60
		ignore_unknown_eap_types = no
		cisco_accounting_username_bug = no

		tls {
			private_key_file = /usr/home/ws1001/ca/meitech.com.key
			certificate_file = /usr/home/ws1001/ca/meitech.com.crt
			CA_file = /etc/ssl/cert.pem
			dh_file = /usr/local/etc/raddb/dh
			random_file = /dev/urandom
			fragment_size = 1024
			include_length = yes
		}

		ttls {
			default_eap_type = md5
			copy_request_to_tunnel = yes
		}

		peap {
			default_eap_type = mschapv2
                }
	}

	mschap {
		authtype = MS-CHAP
	}

}

instantiate {
}

authorize {
	files
	eap
}

authenticate {
	Auth-Type PAP {
		pap
	}

	Auth-Type CHAP {
		chap
	}

	Auth-Type MS-CHAP {
		mschap
	}

	eap
}

preacct {
	acct_unique
	files
}

accounting {
	detail
}

session {
}

post-auth {
}

pre-proxy {
}

post-proxy {
}
