Tutorial

Benjamin Kübler edited this page Sep 23, 2017 · 2 revisions

Introduction

This Tutorial explains how to build a simple MeshVPN network that consists of two Linux machines. It is assumed that you already have installed MeshVPN on these two machines, which will be called "Node A" and "Node B" from now on.

Configuration of node A

Create the meshvpn.conf of Node A with the following content:

port 7000
networkname ExampleNet
psk mysecretpassword
enabletunneling yes
interface mvpn0
ifconfig4 192.168.0.1/24

This will open UDP port 7000 and create a virtual ethernet interface with the name mvpn0 and the IP address 192.168.0.1. Please note that Node A needs to be directly reachable from Node B and any further nodes that you will add to the network.

Configuration of node B

Create the meshvpn.conf of Node B with the following content:

port 7000
networkname ExampleNet
psk mysecretpassword
enabletunneling yes
interface mvpn0
ifconfig4 192.168.0.2/24
initpeers node-a.example.org 7000

Replace node-a.example.org with the real address of Node A.

Testing the configuration

To test if everything works, start MeshVPN on both nodes. Each node should now have created its own mvpn0 interface. It may take some time until the VPN tunnel is built. Try to ping 192.168.0.2 from Node A or ping 192.168.0.1 from Node B. If you get a response, the VPN has been set up successfully!

Adding more nodes to the VPN

Copy the meshvpn.conf of Node B to the new node and change the IP address in the ifconfig command to 192.168.0.3, 192.168.0.4, and so on. If you start the node, there will be a tunnel to Node A first. After some time, tunnels to Node B and all other nodes should be automatically built.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.