n2n/doc/Advanced.md
Logan oos Even 99b6b6b66d
added n2n-route tool (#982)
* moved dev to version 3.1.1

* laid ground for n2n-route tool

* adapted code style

* overhauled n2n-route's tool program logic and removed route code from edge

* added missing initialization of federation's purgeable field

* lifted un/purgeable confusion

* added warning about removed -n cli option

* realized that Windows does not offer inet_aton()

* removed -n option documentation from edge's man page

* slightly simplified n2n-route program logic

* applied more logic changes to n2n-route tool

* added 'info' read command to edge's management port

* corrected indention

* added Linux route control to n2n-route tool

* temporarily restricted n2n-route tool to Linux only

* We must be over the routing!

* pulled default gateway change detection into main loop to cover mobile use, and added devstr_t type

* corrected use of new UNPURGEABLE - so far gone unnoticed

* addresses possiible address issue

* i broke it

* reverted bad ideas

* added command line options, help text, and prevented vpn gateway being used for supernode/peer traffic routes

* added option to manually provide default gateway, also verbosity options

* getting there

* added option to limit networks to be routed (-n), adapted documentation

* fine-tuned minor things
2022-05-24 20:38:51 +02:00

2.0 KiB
Raw Blame History

Advanced Configuration

Configuration Files

Read about Configuration Files as they might come in handy especially, but not limited to, if edges or supernodes shall be run as a service (see below) or in case of bulk automated parameter generation for mass deployment.

Running edge as a Service

edge can also be run as a service instead of cli:

  1. Edit /etc/n2n/edge.conf with your custom options. See /etc/n2n/edge.conf.sample.
  2. Start the service: sudo systemctl start edge
  3. Optionally enable edge start on boot: sudo systemctl enable edge

You can run multiple edge service instances by creating /etc/n2n/edge-instance1.conf and starting it with sudo systemctl start edge@instance1.

Communities

You might be interested to learn some details about Communities and understand how to limit supernodes' services to only a specified set of communities.

Federation

It is available a special community which provides interconnection between supernodes. Details about how it works and how you can use it are available in Federation.

Virtual Network Device Configuration

The TAP Configuration Guide contains hints on various settings that can be applied to the virtual network device, including IPv6 addresses as well as notes on MTU and on how to draw IP addresses from DHCP servers.

Routing the Traffic

Reaching a remote network or tunneling all the internet traffic via n2n are two common tasks which require a proper routing setup. n2n supports routing needs providing options for packet forwarding (-r) including broadcasts (-E) as well as temporarily modifying the routing table (tools/n2n-route). Details can be found in the Routing document.

Traffic Restrictions

It is possible to drop or accept specific packet transmit over edge network interface by rules. Rules can be specify by (-R rule_str) multiple times. Details can be found in the Traffic Restrictions.