freeradiussettings
FreeRADIUS: Settings
Users
/pkg_edit.php?xml=freeradius.xml
Clients
/pkg_edit.php?xml=freeradiusclients.xml
Settings
/pkg_edit.php?xml=freeradiussettings.xml
installedpackages->package->$packagename->configuration->settings
Listening Interface(s)
interface
Enter the desired listening interface(s) here
interfaces_selection
Port
port
Enter the desired port here
input
function sync_package() {
global $config;
$fout = fopen("/usr/local/etc/raddb/radiusd.conf.dynamic","w");
if($config['installedpackages']['freeradiusclients']['config'] != "") {
/* Comment out port entries to use listen directives instead.
if($config['installedpackages']['freeradiussettings']['config']['port'] != "") {
fwrite($fout, "port = " . $port . "\n\n");
} else {
fwrite($fout, "port = 0\n\n");
}
*/
if($config['installedpackages']['freeradiussettings']['config']['interface'] != "") {
$split_int = split(" ", $config['installedpackages']['freeradiussettings']['config']['interface']);
foreach($split_int as $int) {
$int_ip = find_interface_ip($int);
fwrite($fout, "{\nipaddr = " . $int_ip . "\n");
if($config['installedpackages']['freeradiussettings']['config']['port'] != "") {
fwrite($fout, "port = " . $config['installedpackages']['freeradiussettings']['config']['port'] . "\n");
} else {
fwrite($fout, "port = 0\n");
}
fwrite($fout, "type = auth\n}");
}
}
}
fclose($fout);
}
sync_package();
sync_package();