Skip to content

Meraki External Captive portal that allows you to assign group policy to users based on their identity

License

Notifications You must be signed in to change notification settings

fadysharobeem/Meraki_Captive_Portal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Meraki External Captive portal that allows you to assign group policy to users based on their identity

Resources

License

Stars

Watchers

Forks

Packages

No packages published