Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation-linux-openwrt.md #253

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 28 additions & 17 deletions installation-linux-openwrt.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,40 @@ sitemap: true

# Installing on OpenWrt

`yggdrasil` v0.4+ packages are available in OpenWRT since 17.01!
`yggdrasil` v0.4+ packages are available in OpenWrt since 17.01!

To configure Yggdrasil with the LuCI web interface, install the package `luci-app-yggdrasil`.
To configure Yggdrasil with the LuCI web interface, install the package `luci-proto-yggdrasil`.

## Configuration

Use the LuCI web interface to configure Yggdrasil, see the "Network" section.
Use the LuCI web interface to configure Yggdrasil - in "Interfaces", add a new interface and set the protocol to Yggdrasil. Then, follow the configuration steps in the settings menu - in particular, the main tab and "Peers" which allows to edit peers and connections.

Alternatively, you can configure Yggdrasil with just a command line.

To show currently configured options, run the following command:

```
uci show yggdrasil
```

To add a new peer:
Alternatively, you can configure Yggdrasil with just a command line, by editing /etc/config/network.

An example of an Yggdrasil configuration, with interface 'ygg0', is presented below:
```
uci add yggdrasil peer
uci set yggdrasil.@peer[-1].uri='tcp://1.2.3.4:5678'
uci commit
/etc/init.d/yggdrasil restart
config interface 'ygg0' # Should be appended to the existing configuration
option proto 'yggdrasil'
list listen_address 'tls://127.0.0.1:9090' # (Repeatable) List of ports to listen for peers on
option private_key 'YOUR_PRIVATE_KEY' # Private key. Leave empty to generate an anonymous one every run, or set to "auto" to auto-generate
option node_info_privacy '1' # Enable node info privacy. Set to 0 or omit to disable.
option node_info '{"a": "b"}' # Custom node info fields, formatted as JSON
list allowed_public_key 'ALLOWED_PUBLIC_KEY' # (Repeatable) Public key whitelist. Omit to allow all.

config yggdrasil_ygg0_interface # (Repeatable) Multicast interfaces. ygg0 is replaced by the network name.
list interface 'br-lan' # (Repeatable) Interfaces to listen on.
list interface 'phy0-ibss0'
option beacon '1' # Send a discovery beacon
option listen '1' # Listen for discovery beacons
option port '9090' # Auto-discovery ports
option password 'INTERFACE_PASSWORD' # Password. Needs to be the same across peers to connect.

config yggdrasil_ygg0_peer # (Repeatable) Peers.
option address 'tls://1.2.3.4:5678' # Peer address.
option interface 'eth0' # Interfacce to restrict peer to. Omit to attempt on all.

config yggdrasil_ygg0_peer
option address 'tls://9.10.11.12:1314'
```

## OpenWrt Yggdrasil on Matrix
Expand All @@ -38,7 +49,7 @@ Please stop by `#yggdrasil-openwrt:matrix.org` to join the community development
## NodeInfo enabled by default

The Yggdrasil daemon will provide some basic NodeInfo information to the mesh by default.
This can be disabled by configuring the section in `/etc/config/yggdrasil` or LuCI admin.
This can be disabled by configuring the section in `/etc/config/network` or LuCI admin.

This means the following example can be queried by others in the network:

Expand Down