API Server for FreeRadius3 with DaloRadius
- Users
- /user-all/
- /user-id/{id}
- /user-username/{username}
- /user-group/{groupname}
- Nas
- /nas-all
- /nas-id/{id}
- /nas-name/{shortname}
- /nas-ip/{nasname}
- Users
- /user-create/
- Nas
- /nas-create/
- Users
- /user-update/{username}
- Users
- /user-delete-id/{id}
- /user-delete-username/{username}
- Nas
- /nas-delete-id/{id}
- /nas-delete-name/{shortname}
- /nas-delete-ip/{nasname}
- Swagger Documentation
- /api-docs
- Missing Authorization
- Only HTTP Scheme for now
This guide will take you through setting up your Radius API Server
git clone https://github.com/jozefrebjak/radius-api.git /opt/radius-api
cd /opt/radius-api
npm install
After instalation of dependencies you need to specife .env
parameters
# Create .env file in root folder
touch .env
# Insert this parameters and edit them with your parameters
DB_HOST=YOUR_DATABASE_HOSTNAME_OR_IP
DB_USER=YOUR_USER
DB_PASS=YOUR_USER_PASS
DB_DATABASE=YOUR_DATABASE_NAME
DB_PORT=YOUR_DATABASE_PORT
Go to the /opt/radius-api/extra/database
There is two procedures needed for production. They are need for POST and UPDATE of USER and NAS.
- procedure-userAddOrEdit.sql
- procedure-nasAdd.sql
Log to your database and run the sql statements from that files.
Once installed or cloned locally and all packages are installed you can setup service.
# Copy example service file to your systemd
cp /opt/radius-api/extra/radius-api.service /etc/systemd/system/radius-api.service
systemctl daemon-reload
systemctl enable radius-api
systemctl start radius-api
service api status