small_5
5c1c65cd5a
|
3 years ago | |
---|---|---|
.. | ||
etc/init.d | 4 years ago | |
patches | 3 years ago | |
Makefile | 3 years ago | |
README.md | 4 years ago |
README.md
Prerequisites
This instructions explain how to build an OpenWRT .ipk package for n2n.
Before going on, it is required to have a working cross-compiling build environment for the OpenWRT version installed into your device. This usually comes down to the following steps:
-
Download and extract the SDK toolchain for your device. The toolchain must match the exact OpenWRT version installed in your device. Toolchain for official OpenWRT images can be downloaded from https://downloads.openwrt.org
-
Build the toolchain: run
make menuconfig
, save the configuration, then runmake
to build the cross compiling tools -
Download the feeds with
./scripts/feeds update -a
Compilation
From the OpenWRT build directory:
git clone https://github.com/ntop/n2n n2n
cp -r n2n/packages/openwrt package/n2n
make menuconfig # select Network -> VPN -> n2n-edge and n2n-supernode
make package/n2n/compile V=s
If everything went fine, two ipk will be generated, one for the n2n-edge
and the other for n2n-supernode. They can be found with find . -name "n2n*.ipk"
,
copied to the target device, and installed with opkg install
.
Configuration
The edge node can be started with /etc/init.d/edge start
.
Its configuration file is /etc/n2n/edge.conf
.
The supernode can be started with /etc/init.d/supernode start
.
Its configuration file is /etc/n2n/supernode.conf
.