This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

Cisco Meraki - API VPN Map

Using Cisco Meraki and Google Maps API's, plot MX's on world map and draw lines between Spokes and Hubs to show VPN paths. Use the VPN Checker Tool for IP reachability across your VPNs.

Features

  • Nodejs server performs API calls and acts as web server.
  • Plot MX/Z devices with VPN enabled on Map
  • Show Offline/Online Devices
  • VPN paths between spokes and hubs
  • Device information on hover
  • VPN Checker Tool

Demo

View live demo: https://vpn-map.herokuapp.com.

Installation

Clone the source locally:

$ git clone https://github.com/benbenbenbenbenbenbenbenbenben/meraki-vpn-map.git
$ cd meraki-vpn-map

Install npm and nodejs:

$ sudo apt-get install npm nodejs

Install project dependencies:

$ npm install

Add your Meraki api key and your organization ID values to src/config-default.js. Rename to config.js

Add Google Maps api key to templates/views/index.hbs
https://maps.googleapis.com/maps/api/js?key=YOURKEYGOESHERE&callback=initMap&sensor=false&libraries=geometry,places&ext=.js

Start the nodejs server:

$ node src/app.js

Open web browser and go to:
http://localhost:3000/

VPN Checker Tool

Check source and destination IP Addresses for vpn reachability across your Meraki VPN estate.

Usage

Enter source and destination IP addresses and select check connectivity to run 4 tests:

  1. Check both IPs exist in a subnet
  2. Check subnets are not on the same router
  3. Check subnets are enabled for VPN
  4. Check IPs are not blocked by VPN Firewall

If all checks pass VPN paths will highlight in green!

Otherwise user will be alerted on failed check.

Note

This tool only checks device/dashboard configuration and does not check if MX is online or VPN tunnel is up and passing traffic.

API Flow

Get Org VPN firewall rules:

  • add to new vpn rules array

Get DeviceStatuses:

  • Returns list of all devices's, sort those with WAN1IP property

Get Device details:

  • append lat, lng, address and model to MX array

Get Perf score for each online MX:

  • append to MX array

Get VPN Details for each MX:

  • append to MX array

Dependencies

  • Express
  • Hbs
  • Bottleneck
  • Axios
  • JSON-Bigint

Built with

License

MIT © Ben 2019

View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.