Giter VIP home page Giter VIP logo

openmesher's Introduction

OpenMesher v0.6.3

Copyright (c) 2010 Aaron C. de Bruyn [email protected]

Build Status

OpenMesher is a better TunnelDigger. They both basically create OpenVPN point to point tunnels, but OpenMesher has newer features and fixes.

First off, I would like to say thank you to the developers of TunnelDigger. I hope they don't take the following list of improvements as a slam on a great tool that helped me for many years.

Here is a list of improvements:

  • OpenMesher takes a simple list of routers and meshes them. TunnelDigger requires you to explicitly specify each link between routers.
  • OpenMesher takes a list of netblocks (10.1.2.0/24, 10.1.15.0/28, or whatever) and automatically allocates /30s from each block for assignment to P2P interfaces. TunnelDigger requires you to manually specify IPs on each side of the p2p link.
  • OpenMesher has support for plugins: We currently support generating Quagga, reverse DNS, OpenVPN, Shorewall, and deb config files for deployment from a deb.
  • Module -- Quagga: We can generate a ripd.conf and zebra.conf for each router
  • Module -- ReverseDNS: We can generate a BIND reverse DNS file for each IP used in the p2p /30 blocks.
  • Module -- OpenVPN: Obviously we generate the OpenVPN config files for the p2p links
  • Module -- Shorewall: We generate files that can be included by your interfaces and rules file to allow the VPN p2p links to connect and route
  • Module -- MakeDEBs: We generate deb files that include all the module files along with commands to restart services and package them up for deployment
  • Module -- Deploy: Not quite ready yet--SCPs the DEB files up to the routers for easier deployment.
  • Perl sucks
  • TunnelDigger appears unmaintained
  • TunnelDigger generates config files that aren't compatible with the latest version of OpenVPN
  • TunnelDigger generates debs using an old format
  • TunnelDigger uses PKI where I think shared keys work just fine--although adding CA support is fairly easy and is planned for a future release.

Dependencies

An easy way to install the dependencies is: pip install -r /path/to/openmesher/requirements.txt

If you don't have 'pip', try the following on a Debian-based system: sudo apt-get install python-pip

Please be careful with the generated deb files--they contain OpenVPN .key files as well as Quagga ripd.conf and zebra.conf files which have passwords in them. Keep them safe.

If you specify the --sshdeploy switch, OpenMesher will attempt to copy the generated debs to the routers. OpenMesher WILL NOT attempt to auto-install the packages or restart services. You will need to do it by hand at the moment. (I use cssh to connect to all the routers and then run 'dpkg -i hostname.deb').

When you install the package, the openvpn, shorewall, and quagga services will be restarted. You can make your own custom postinst.conf file that does not restart the services. Eventually there will be a flag to restart or not.

Developers and other geek-ilk

  • Github rocks, fork it.
  • Patches are welcome
  • No mailing lists, IRC channels, etc... Not a big-enough project at the moment.

openmesher's People

Contributors

computergeek125 avatar darkpixel 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  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

openmesher's Issues

Fix argparse default issue

When argparse is given a default value with the action 'append', the cli-provided values get appended to the default instead of replacing the default.

Build crash if --openvpn NOT specified

INFO:root:Building package for router: router1
chmod: missing operand after 400' Trychmod --help' for more information.
Traceback (most recent call last):
File "/home/aaron/.virtualenvs/omtest/bin/openmesher.py", line 154, in
main()
File "/home/aaron/.virtualenvs/omtest/bin/openmesher.py", line 142, in main
plugin.plugin_object.process(m, include_dirs=includedirs, restart_services=includedirs, configPlugins=configPlugins, cliargs=arg)
File "/home/aaron/.virtualenvs/omtest/lib/python2.7/site-packages/OpenMesher/plugins/makedebs/init.py", line 96, in process
raise Exception('Package generation failed in %s. Do you have debhelper and fakeroot installed?' %(base_path))
Exception: Package generation failed in /tmp/openmesher-nrRPK2. Do you have debhelper and fakeroot installed?
(omtest)19:56 ~ $

This fails due to the following line in debian/rules:
find -name "*.key" | xargs chmod 400

If --openvpn is not specified, don't try to chmod non-existent key files.

Update the project...

It's probably time I dust this project off. I haven't had a need for it since a company decided to switch to pfSense because point-and-click is 'easier' than command line. Unfortunately my argument that I would have to spend 5 minutes setting up each of n x (n-1)/2 connections they still switched to pfSense. So the network became hub-and-spoke. Now that the 100 down 25 up 'hub' office is completely overloaded and they are thinking of switching back.

But I wanted to put a few things to a vote.

Is anyone still using the project?

Should I keep it in Python, or re-write it in Node?

Any preferences?

Switches to activate plugins

I kinda feel stupid for just noticing this, but plugins should have cli args to enable them. For example, of you don't pass '--shorewall' as a switch to openmesher, you don't generate the shorewall config. (Rather than waiting for me to get around to designing the per-router plugin system)

Client-only or server-only node

Need to be able to specify a router as client-only or server-only--useful for handling situations where a router might be behind NAT. (Think: Opus Interactive and their special-ed and their non-ability to assign a static IP via DHCP for their broken bridged mode modems.)

Template-based config files

The current system of generating OpenVPN and Quagga config files sucks.
It would be nice to suck in a text file template similar to a django template and apply it to one or more routers.

Path change?

Upgraded to Ubuntu 11.10, openvpn is no longer in my path. Has always been in /usr/sbin, but for some reason /usr/sbin is not in my path anymore.

Custom per-router quagga files

Support one-off quagga configs per router.
For example, see the internal ticket on SFD and the 'route add 10.1.15.0/24' statement for ripd.conf.

Fail gracefully if debhelper is not installed

(openmesher)11:51 /code/openmesher (feature/new-interfaces)$ ./openmesher.py
DEBUG:root:PluginManager skips /usr/share/openmesher/plugins (not a directory)
DEBUG:root:PluginManager skips /home/aaron/code/openmesher/
/.openmesher/plugins (not a directory)
DEBUG:root:PluginManager walks into directory: /home/aaron/code/openmesher/plugins
DEBUG:root:PluginManager found a candidate:
/home/aaron/code/openmesher/plugins/openvpn.yapsy-plugin
DEBUG:root:PluginManager found a candidate:
/home/aaron/code/openmesher/plugins/shorewall.yapsy-plugin
DEBUG:root:PluginManager found a candidate:
/home/aaron/code/openmesher/plugins/makedebs.yapsy-plugin
DEBUG:root:PluginManager found a candidate:
/home/aaron/code/openmesher/plugins/quagga.yapsy-plugin
Loaded 64 /30s
Generating Reverse DNS config...
DEBUG:root:Activating plugin: Default.OpenVPN
DEBUG:root:Generating OpenVPN config...
DEBUG:root:Activating plugin: Default.Shorewall
DEBUG:root:Generating Shorewall config...
DEBUG:root:Activating plugin: Default.MakeDEBs
DEBUG:root:Generating debs...
DEBUG:root:Activating plugin: Default.Quagga
DEBUG:root:Generating Quagga config...
Base path: /tmp/openmesher-yIsLYz
Building package for router: test2.crfr.local
debian/rules: 2: dh_testdir: not found
Traceback (most recent call last):
File "./openmesher.py", line 94, in
main()
File "./openmesher.py", line 90, in main
package_generator(files)
File "/home/aaron/code/openmesher/makepackage.py", line 34, in package_generator
raise Exception('Package generation failed in %s' %(base_path))
Exception: Package generation failed in /tmp/openmesher-yIsLYz

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.