Git Product home page Git Product logo

ztp-mikrotik's Introduction

ztp-mikrotik

Zero Touch Provisioning on Mikrotik

This repository contain python script to doing Zero Touch Provisioning on Mikrotik

Topology

This repository is tested using this Topology

Requirement

To run this repository, you need some python library installed on your computer.
  • Python 3.6.5
  • flask
  • paramiko
  • telepot
  • python-mysqldb

Setup

  1. Create Telegram bot, this telegram bot will used to notify us if the provisioning on Mikrotik completed. You can follow tutorial on https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-connect-telegram?view=azure-bot-service-4.0
  2. Clone this repository
  3. Install requirement library
    • virtualenv -p python3 venv
    • source venv/bin/activate
    • pip install -r requirement
    • sudo apt-get install python-mysqldb
  4. Edit ztp_mikrotik.py. Fill the 'your_token' and 'your_chat_id'
  5. Run the python script
    • python3 ztp_mikrotik.py
  6. Configure PPPoE Server on ISP
  7. Add ppp_script_on_up.txt to the on UP script in the PPP Server Profile. Modify the 'your_flask_server_ip_address'. Make sure your flask server can reach PPPoE Client. May be you need to add static route to the PPPoE Client via PPPoE Server
  8. Configure PPPoE Client on Customer, and see that you will reciev Telegram notification and the customer is provisioned automatically

ztp-mikrotik's People

Contributors

arrosid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ztp-mikrotik's Issues

Error when running script: ModuleNotFoundError: No module named 'MySQLdb'

python3 ztp_mikrotik.py
Traceback (most recent call last):
File "ztp_mikrotik.py", line 6, in
import MySQLdb as mdb
ModuleNotFoundError: No module named 'MySQLdb'

Seems there is no ModuleNotFoundError: No module named 'MySQLdb' for python3

I'm new to python Mikrotik API / scripting. Can you help please?

Thanks,

norrie

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.