This is an old revision of the document!
sudo apt-get install libdatetime-perl sudo apt-get install freeradius freeradius-mysql # Answer yes to install these with their dependencies # Please note that when this package is installed there are some things generated that can take up lots of time on slower machines.
sudo systemctl enable freeradius sudo systemctl start freeradius
sudo systemctl status freeradius
● chilli.service - LSB: Start CoovaChilli daemon at boot time Loaded: loaded (/etc/init.d/chilli; generated) Active: active (exited) since Fri 2019-12-20 20:07:51 UTC; 1s ago Docs: man:systemd-sysv-generator(8) Process: 14452 ExecStop=/etc/init.d/chilli stop (code=exited, status=0/SUCCESS) Process: 14491 ExecStart=/etc/init.d/chilli start (code=exited, status=0/SUCCESS) Dec 20 20:07:51 osboxes chilli[14580]: TX queue length set to 100 Dec 20 20:07:51 osboxes coova-chilli[14585]: PID 14585 loading binary options file /var/run/chilli.14580.cfg.bin Dec 20 20:07:51 osboxes coova-chilli[14585]: Loading modules Dec 20 20:07:51 osboxes coova-chilli[14585]: USER root(0/0), GROUP root(0/0) CHILLI[UID 113, GID 116] Dec 20 20:07:51 osboxes coova-chilli[14585]: Running /etc/chilli/up.sh (0/0) Dec 20 20:07:51 osboxes chilli[14580]: No such device: ioctl(SIOCSIFFLAGS) failed on eth1 Dec 20 20:07:51 osboxes chilli[14580]: No such device: ioctl(SIOCSIFFLAGS) failed Dec 20 20:07:51 osboxes chilli[14580]: No such device: ioctl(SIOCSIFADDR) failed Dec 20 20:07:51 osboxes chilli[14580]: No such device: ioctl(d=2, request=35111) failed Dec 20 20:07:51 osboxes chilli[14580]: Failed to create dhcp listener on eth1
# Stop the service if it is already running sudo systemctl stop freeradius # Backup the original FreeRADIUSdirectory sudo mv /etc/freeradius /etc/freeradius.orig # Extract the AMPcore modified FreeRADIUS directory sudo tar xzf /usr/share/nginx/html/cake2/rd_cake/Setup/Radius/freeradius-3-radiusdesk.tar.gz --one-top-level=/etc/freeradius/ sudo mv /etc/freeradius/freeradius /etc/freeradius/3.0
sudo vi /etc/freeradius/3.0/dictionary # Change $INCLUDE /etc/freeradius/dictionary_overrides/dictionary.mikrotik $INCLUDE /etc/freeradius/dictionary_overrides/dictionary.chillispot # To $INCLUDE /etc/freeradius/3.0/dictionary_overrides/dictionary.mikrotik $INCLUDE /etc/freeradius/3.0/dictionary_overrides/dictionary.chillispot sudo vi /etc/freeradius/3.0/radiusd.conf # Change raddbdir = /etc/freeradius # To raddbdir = /etc/freeradius/3.0
sudo vi /etc/freeradius/3.0/sites-enabled/dynamic-clients
# Echo the IP address of the client. FreeRADIUS-Client-IP-Address = "%{Packet-Src-IP-Address}" # require_message_authenticator FreeRADIUS-Client-Require-MA = no # secret FreeRADIUS-Client-Secret = "testing123" # shortname FreeRADIUS-Client-Shortname = "%{Packet-Src-IP-Address}"
sudo vi /lib/systemd/system/freeradius.service
[Unit] Description=FreeRADIUS multi-protocol policy server After=syslog.target network.target Documentation=man:radiusd(8) man:radiusd.conf(5) http://wiki.freeradius.org/ http://networkradius.com/doc/ [Service] Type=forking PIDFile=/run/freeradius/freeradius.pid #EnvironmentFile=-/etc/default/freeradius #ExecStartPre=/usr/sbin/freeradius $FREERADIUS_OPTIONS -Cxm -lstdout ExecStart=/usr/sbin/freeradius $FREERADIUS_OPTIONS Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target
sudo systemctl daemon-reload sudo systemctl restart freeradius.service sudo systemctl status freeradius.service
#Stop the current FreeRADIUS instance sudo systemctl stop freeradius.service #If it is perhaps stuck use killall sudo killall freeradius #Start it in debug mode sudo freeradius -X
Failing to do this step will leave the advanced features of RADIUSdesk broken.
sudo visudo
# Members of the admin group may gain root privileges %admin ALL=(ALL) ALL www-data ALL = NOPASSWD:/usr/share/nginx/html/cake2/rd_cake/Setup/Scripts/radmin_wrapper.pl
sudo cat /etc/sudoers
sudo vi /usr/share/nginx/html/cake2/rd_cake/Config/MESHdesk.php
//_______________________________________________ //== Pre-set values for the Captive Portals $config['Meshes']['captive_portal']['radius_1'] = '198.27.111.78'; // This will be the public IP Address of the FreeRADIUS / RADIUSdesk //$config['ApProfiles']['captive_portal']['radius_2'] = '198.27.111.78'; //Optional second fallback RADIUS $config['Meshes']['captive_portal']['radius_secret'] = 'testing123'; //Change this to the common site wide secret used by Dynamic RADIUS Clients //Use DNS name in uam_url to looks more professional / or IP Address $config['Meshes']['captive_portal']['uam_url'] = 'http://198.27.111.78/cake2/rd_cake/dynamic_details/chilli_browser_detect/'; $config['Meshes']['captive_portal']['uam_secret'] = 'greatsecret'; //Usually you will not change this value //$config['ApProfiles']['captive_portal']['walled_garden'] = "www.radiusdesk.com,www.google.com"; //Optional $config['Meshes']['captive_portal']['swap_octet'] = true; $config['Meshes']['captive_portal']['mac_auth'] = true; //$config['Meshes']['captive_portal']['coova_optional'] = "ssid=radiusdesk";
sudo vi /usr/share/nginx/html/cake2/rd_cake/Config/ApProfiles.php
//_______________________________________________ //== Pre-set values for the Captive Portals $config['ApProfiles']['captive_portal']['radius_1'] = '198.27.111.78'; // This will be the public IP Address of the FreeRADIUS / RADIUSdesk //$config['ApProfiles']['captive_portal']['radius_2'] = '198.27.111.78'; //Optional second fallback RADIUS $config['ApProfiles']['captive_portal']['radius_secret'] = 'testing123'; //Change this to the common site wide secret used by Dynamic RADIUS Clients //Use DNS name in uam_url to look more professional / or IP Address $config['ApProfiles']['captive_portal']['uam_url'] = 'http://198.27.111.78/cake2/rd_cake/dynamic_details/chilli_browser_detect/'; $config['ApProfiles']['captive_portal']['uam_secret'] = 'greatsecret'; //Usually you will not change this value //$config['ApProfiles']['captive_portal']['walled_garden'] = "www.radiusdesk.com,www.google.com"; //Optional $config['ApProfiles']['captive_portal']['swap_octet'] = true; $config['ApProfiles']['captive_portal']['mac_auth'] = true; //$config['ApProfiles']['captive_portal']['coova_optional'] = "ssid=radiusdesk"; //__________________________________________________