dn42-on-OpenWRT.md
... ...
@@ -1,3 +1,39 @@
1
-This page gives hints on how to participate to dn42 with an OpenWRT router.
1
+# dn42 on OpenWRT
2
+
3
+This page gives hints on how to participate to dn42 with an OpenWRT router. It assumes Attitude Adjustment (12.09), but you can adapt it for other versions.
4
+
5
+The intended target is a home router, acting as the default gateway for its LAN clients. The goal is to have one or more dn42 peers, announce the LAN subnet with BGP, and thus transparently provide dn42 access to the LAN clients.
6
+
7
+This documentation assumes that the LAN is addressed in the dn42 space (`172.22.0.0/15`), but it's not a big deal to add NAT if it's not.
8
+
9
+## Configuration
10
+
11
+### Peerings
12
+
13
+Nothing fancy: use GRE tunnels, openvpn, anything. Don't forget to install the relevant packages with `opkg` (`kmod-gre` for instance).
14
+
15
+You can't manage GRE tunnels with OpenWRT, so just create them in `/etc/rc.local` (and assign addresses if needed).
16
+
17
+### BGP
18
+
19
+`quagga` and `bird` are both packaged in OpenWRT. Note that quagga is split in many packages, you probably need `quagga-bgpd`, `quagga-vtysh` and `quagga-zebra`.
20
+
21
+### Interface definition
22
+
23
+This is needed so that OpenWRT is aware of the new interfaces (for firewall and stuff).
24
+
25
+In `/etc/config/network`, add entries for each dn42 interface:
26
+
27
+ config interface dn42peer1
28
+ option ifname tun-peer1
29
+ option proto none
30
+
31
+### Firewall
32
+
33
+There are two goals:
34
+
35
+ - Allowing traffic from LAN to dn42 (and maybe from dn42 to LAN too)
36
+ - If you have more than one peer, allowing traffic from dn42 to dn42 (forwarding)
37
+
38
+### DNS
2 39
3
-The intended target is a home router, acting as the default gateway for its LAN clients. The goal is to have one or more dn42 peers, announce the LAN subnet with BGP, and thus transparently provide dn42 access to the LAN clients.
... ...
\ No newline at end of file