cat /usr/local/etc/raddb/sites-enabled/nodeny
server default {
listen {
type = auth
ipaddr = *
port = 1812
}
listen {
type = acct
ipaddr = *
port = 0
}
authorize {
sql
pap
update control {
Auth-Type := "Accept"
}
}
authenticate {
Auth-Type PAP {
pap
}
}
preacct {
acct_unique
preprocess
}
accounting {
detail
sql
exec
}
session {
radutmp
sql
}
post-auth {
sql
}
}
cat /usr/local/etc/raddb/mods-enabled/sql
sql {
driver = "rlm_sql_mysql"
mysql {
warnings = auto
}
server = "localhost"
port = 3306
login = "nodeny"
password = "hardpass"
radius_db = "nodeny"
authorize_check_query = "call radcheck('%{User-Name}')"
authorize_reply_query = "call radreply('%{User-Name}')"
accounting {
query = "call radupdate('%{User-Name}','%{Framed-IP-Address}',\
'nas=%{NAS-IP-Address}')"
type {
start {
query = "call radupdate('%{User-Name}','%{Framed-IP-Address}',\
'nas=%{NAS-IP-Address}')"
}
}
}
post-auth {
query = "call radupdate('%{User-Name}','%{reply:Framed-IP-Address}',\
'nas=%{NAS-IP-Address}')"
}
}