hacor / unifi-freeradius-ldap

A freeradius docker container to connect to the Google Secure LDAP service
80 stars 31 forks source link

Generating the certs #13

Closed undeadindustries closed 3 years ago

undeadindustries commented 3 years ago

Hi there @hacor , sorry for this noob question. In the README.md, I didn't understand the generating certs for EAP part.

Would I need to attach the container to do that? If so, nothing I tried worked. I just get a blank attached screen. Once I'm in, would I'd just run the make command in the correct folder, right? I just don't know how I'd get the cert files it creates into the ./certs folder.

Any steps for that part would be appreciated.

Thank you so much!

hacor commented 3 years ago

Hey @undeadindustries I'll try to be as clear as possible, I know it's a bit confusing.

First of all you need to get into the docker container:

$ docker exec -it CONTAINER_NAME /bin/bash

There read the raddb docs on how to create certificates. This way you don't need to install something on your main system.

# cd /etc/raddb/certs
# cat README

Read everything from the chapter 'MAKING A ROOT CERTIFICATE'

If you run through all those steps you will create all the needed certificates. But: if you stop the container, those will get lost. So: You need to copy all the files that need to persist to the /certs directory

# cp FILENAME /certs

The files you need to copy are, as mentioned in the main README:

This certs directory is a volume that will survive container or computer reboots. a script replaces the files of the certs folder to the correct places in the container. This is done through the init.sh script on line 37

Hope this helps you out! Good luck

undeadindustries commented 3 years ago

Thank you so much! I'm a linux guy but never used Docker. It's a mystery to me. So this is greatly appreciated.

Most people on GitHub either would respond that it's not their job to teach Docker, or send me to Stackoverflow.

So seriously and sincerely, THANK YOU!!