Giter Site home page Giter Site logo

sxiii / fralp Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 63 KB

FreeRadius 3 docker container with EAP-TLS based on alpine:edge

Dockerfile 66.99% Shell 33.01%
freeradius freeradius-server freeradius-setup tls tls-certificate eap eap-tls alpine alpine-linux alpine-edge docker dockerfile radius wpa2-enterprise radius-server radius-tls

fralp's Introduction

FreeRadius over alpine:edge with EAP-TLS (fralp)

Steps to build container

Downloading repo

git clone https://github.com/sxiii/fralp
cd fralp

Build EasyRSA container (for certificate generation)

docker build easyrsa -t easyrsa

Generate certificates (example client name: toshiba)

You can specify as many clients as you want (re-run this command each time, replacing word "toshiba" with any client names you like.

docker run -it -v pki:/easyrsa/pki easyrsa build-client-full toshiba

After generating certificates and private keys, you need to copy them manually from a "pki" docker volume to your client machine (total of 3 files):

  • ca.crt (Central Authority Certificate)
  • toshiba.crt (Your own certificate file)
  • toshiba.key (Your own key file) The files inside PKI docker volume can be located by navigating to /easyrsa/pki path.

Build FRALP docker container

docker build -t fralp .

Running freshly-built docker container (in visible mode)

sudo docker run -it -p 1812:1812/udp --restart=always -v pki:/etc/raddb/certs -e CLIENT_ADDRESS=192.168.1.1 -e CLIENT_SECRET=password -e PRIVATE_KEY_PASSWORD=password fralp:latest

Replace "-it" flag with "-d" to daemonize the process to background. Replace CLIENT_ADDRESS with wifi-hotspot address, as long as CLIENT_SECRET and PRIVATE_KEY_PASSWORD with according values.

Client configuration

Now you can configure your AP with WPA2 Enterprise, AES, the server IP and client secret. Use two certificates along with user private key to authenticate against freeradius tls. Here's how you can do it for example: img

Windows and other P12 client configuration

If you need a P12-type certificate (for example, to import it on windows), you can use openssl to convert your results to it like this:

openssl pkcs12 -export -out certificate.pfx -inkey toshiba.key -in toshiba.crt -certfile ca.crt

Be sure to state all 3 files correctly and you'll get "certificate.pfx" as output that you'll be able to use on windows and other OSes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.