How to Add CoA On Docker?
To enable Change of Authorization (CoA) in a Docker, Copy the below script and run it on your server terminal
sudo -i;
cd zalpro
usermod -aG docker $USER;
Run the script given below on your server terminal, where 'tipaddr' is the NAS IP, 'tport' is Incoming Port and 'tsecret' is Radius Seceret. The 'secret' key cannot include special characters like commas, periods, or symbols such as @, #, $, %, ^, &, *, /, or -.
echo -e "home_server nas_$(date +%s) {\n\ttype = coa\n\tipaddr = 192.168.10.100\n\tport = 3799\n\tsecret = 123456\n\tcoa {\n\t\tirt = 2\n\t\tmrt = 16\n\t\tmrc = 5\n\t\tmrd = 30\n\t}\n}\n" >> freeradius/clients.conf
When you've done all of these, restart the docker by the command below.
docker compose stop $(docker ps -aq);
docker compose up -d;