LibreVPN:Crear una red nueva/en

De HackLab
Saltar a: navegación, buscar

<languages/>

LibreVPN es a la vez una red y un software para generar y administrar redes libres virtuales. Esta guía tiene los pasos para que puedas crear tu propia red (y/o de paso entender cómo se creó LibreVPN?)

Requisites

Network name

Pick a short name for your network, thinking it'll also be the virtual interface name, so it shouldn't be anything that actually exists. For instance, LibreVPN's network name is lvpn.


IPv4

If you're going to use IPv4 addresses, pick a subnet that contains any possible node. LibreVPN uses 192.168.9.0/24. They aren't many nodes (~250) and the subnet is ugly, but it survived the testing fase.

IPv6

If you're going to use IPv6 addresses, there's three options: don't pick a subnet and let nodes self-assign IPv6 addresses on the fe80:: private subnet; obtain a global subnet from a provider (LibreVPN's 2001:1291:200:83ab::/64 from sixxs) and do Router Advertisement (a sort of DHCP at IP level); or obtain a global subnet but let nodes pick an address (randomly using generate-ipv6-address).

Fork <code>lvpn

The configuration tool called lvpn is preset to LibreVPN's subnets. To change them, you have to distribute a version with your own subnets.

In the Makefile, variables are SUBNET and SUBNET6.

 make SUBNET=192.168.8.0/24 SUBNET6=2002:1291:200:83ab::/64 NETWORK=othernet

On the self-contained lvpn (the one you can use from the repo without installation), you have to export these variables LVPN_SUBNET and LVPN_SUBNET6:

 LVPN_SUBNET=192.168.8.0/24
 LVPN_SUBNET6=2002:1291:200:83ab::/64
 NETWORK=othernet
 export LVPN_SUBNET LVPN_SUBNET6 NETWORK
 ./lvpn init

Or by forking the git repository and editing the Makefile and lvpn files to contain your subnets instead.

TODO

  • Check if lvpn works without one of the subnets.