Code Monkey home page Code Monkey logo

meraki_captive_portal's Introduction

Meraki External Captive Portal

The External Captive portal will allow you to authenticate users against MySQL database and assign group policy based on their membership levels stored in the database against the user. The below instructions are based on Ubuntu server.

Configuration

Here is the YouTube link for the implmentation steps here.

Obtain Meraki API key

Meraki API write Key is needed to allow the transfer of the configuration. Obtain Meraki API key here.

Create Meraki Group Policy

Create Meraki Group policies and make sure the name matches what will be configured in the database against each user. Details of creating group policy can be found here

Installation

Getting started

  • Update Ubuntu packages
    $ sudo apt update
  • Install python3 pip package
    $ sudo apt install python3-pip

Install MySQL Database

  • Install MySQL packages
    $ sudo apt install mysql-server
  • Edit mysqld.cnf file (change the bind-address from 127.0.0.1 to 0.0.0.0)
    $ sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
  • Restart the MySQL service
    $ sudo systemctl restart mysql
  • Add admin user to allow remote access to the database
    $ sudo mysql
    $mysql> GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' IDENTIFIED BY 'Password' WITH GRANT OPTION;
    $mysql> FLUSH PRIVILEGES;

Installing the Captive Portal App

  • Install the libraries required
    $ sudo pip3 install -r requirements.txt
  • Allow admin access to the Captive Portal Repo
    $ sudo chmod 777 ../Meraki_Captive_Portal
    $ sudo chmod -R a+rw ../Meraki_Captive_Portal
  • Run the app
    $ python3 app.py

Use

  • From any browser enter http://ip_address:5000 or http://localhost:5000
  • Choose Admin from top right corner

  • Enter username: admin, Password: admin
  • Provide the details and hit save
  • Go back to Captive Portal page
  • Enter any username and password to allow the script build the database
  • Login to Database via MySQLWorkbench. Download here
  • Add users in Captive table inside the database

meraki_captive_portal's People

Contributors

fadysharobeem avatar

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.