Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freeradius certs & Docker #582

Open
KLelong opened this issue Dec 11, 2024 · 2 comments
Open

Freeradius certs & Docker #582

KLelong opened this issue Dec 11, 2024 · 2 comments

Comments

@KLelong
Copy link

KLelong commented Dec 11, 2024

Hi,
Any suggestions how I can incorporate certs for freeradius in the docker-stack ?
Docker-noob asking, but willing to learn ;-)

Thanks.

@bboy8012
Copy link

I would look at a git repo called 2stacks/docker-freeradius that should get you the start you need and then just map you certs in the volume mounted. Something that I didn't know until googling is you can't just map the /etc/raddb, you have to do individual files and folders.

@KLelong
Copy link
Author

KLelong commented Dec 13, 2024

Thanks, but I created my own version.
I started with the version of this site and modified Dockerfile-freeradius . Near the end I added this :

RUN sed -i 's/private_key_password = whatever/private_key_password = <your_private_key_password>/'  /etc/freeradius/mods-available/eap
RUN sed -i 's/certdir = ${confdir}\/certs/certdir = ${confdir}\/certs\/2024/' /etc/freeradius/radiusd.conf
RUN mkdir /etc/freeradius/certs/2024
ADD ./2024/* /etc/freeradius/certs/2024
ADD make-certs /etc/freeradius
RUN chmod +x /etc/freeradius/make-certs
RUN /etc/freeradius/make-certs

Since I like to store my certs in a directory of my own I created the 2024 directory.
And the local 2024 directory contains my .cnf files. It contains also the make-file, although I don't know if that is needed. I could have copied it from the certs directory in the container's certs-dir though.
This is "make-certs" :

#!/bin/bash
CERTDIR="2024"
cd /etc/freeradius/certs
cp inner-server.cnf certs/$CERTDIR
cp xpextensions certs/$CERTDIR
cp bootstrap certs/$CERTDIR
cd $CERTDIR
./bootstrap

After the containers are started I need to extract the ca.pem/ca.der files from the container and distribute them to my users.

I would like to have my modifications separate, but I don't know how to do that yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants