GithubHelp home page GithubHelp logo

praiskup / myvpn Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 24 KB

Using the 'n2n' toolset, connect to vpn.

License: GNU General Public License v3.0

Makefile 8.50% Shell 0.77% M4 5.61% C++ 85.13%

myvpn's Introduction

MyVPN - create quickly your personal VPN
========================================

This is a trivial but convenient wrapper around 'n2n' software [1] (that said
/bin/edge utility).  It allows you to very quickly configure your own personal
VPN network, while the only prerequisite is a (Linux) server with public IP
address.  This software provides an alternative to e.g. what Hamachi software
used to provide, but fully free and Open Source.


Installation steps
------------------

On CentOS 7/Fedora, install from [2] Copr repository.  Otherwise use the
classic autotools installation steps (autoreconf -vfi && ./configure && make &&
sudo make install), but make sure that the /usr/bin/myvpn_client binary has suid
bit if you want to allow non-privileged users to connect to the VPN.


Typical configuration on server
-------------------------------

1. install 'n2n' package
2. run '/usr/sbin/supernode -l <PORT>' command as a non-privileged user
3. usually you want to add line like
   `@reboot /usr/sbin/supernode -l <PORT> -v -f >> /var/log/n2n.log`
   into your crontab so your VPN server is started after each reboot (non-root
   crontab ideally)


Typical configuration on clients
--------------------------------

1. install this software (see installation steps above) and 'n2n' package
2. edit /etc/myvpn.cfg:
   a) connection to server
      - 'server' parameter - IP or hostname of your server (configured above)
      - 'server_port' - set to the same <PORT> value as above

   b) network configuration
      - pick a meaningful name for your network in 'network_name' option,
        this needs to be consistently set on each client and can not
        collide with network names on clients (`ip a`).
      - pick an _unique_ 'ip' address among other clients in your new VPN
        network
      - use the same, (generated) secure 'password' option on each client
        (see 'man edge' and -k option)

   An example configuration:
     server = "vpn.example.com"
     server_port = "4444"
     network_name = "my_family_vpn_network"
     ip = "10.1.2.100"
     password = "rai3Yeek"

3. execute 'myvpn_client' suid binary
4. optionally configure a crontab entry to execute 'myvpn_client' periodically


References
----------
[1] https://github.com/ntop/n2n
[2] https://copr.fedorainfracloud.org/coprs/praiskup/myvpn/

myvpn's People

Contributors

praiskup avatar

Watchers

James Cloos avatar  avatar  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.