funkinselkamikaze
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| funkinselkamikaze [2008/10/21 02:00] – ChristianPointner | funkinselkamikaze [2012/09/12 15:37] (current) – ChristianPointner | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | /* UndefinedMacro: TableOfContents(None) */ | + | <<[[: |
| ====== Funkinsel Setup auf OpenWRT Kamikaze ====== | ====== Funkinsel Setup auf OpenWRT Kamikaze ====== | ||
| - | Dieses Howto beschreibt das Funkinselsetup | + | :!: Dieses Howto beschreibt das Funkinsel Setup für OpenWRT Kamikaze. Howtos für andere Firmware Images können auf der Seite [[: |
| Line 16: | Line 16: | ||
| - | < | + | < |
| </ | </ | ||
| Das Verzeichnis /// | Das Verzeichnis /// | ||
| - | < | + | < |
| - | cd / | + | # cd / |
| - | vi server.conf | + | # vi server.conf |
| </ | </ | ||
| Hier eine Beispielkonfiguration: | Hier eine Beispielkonfiguration: | ||
| Line 31: | Line 31: | ||
| proto udp | proto udp | ||
| - | remote | + | remote |
| resolv-retry infinite | resolv-retry infinite | ||
| nobind | nobind | ||
| Line 46: | Line 46: | ||
| cert "< | cert "< | ||
| key "< | key "< | ||
| + | |||
| + | ns-cert-type server | ||
| cipher none | cipher none | ||
| Line 51: | Line 53: | ||
| verb 3 | verb 3 | ||
| </ | </ | ||
| - | Diese Konfiguration geht davon aus das die Zertifikate mit denen sich der Router authentifiziert im gleichen Verzeichnis wie die Konfiguration liegt. Sollten diese woanders liegen kann dass ebenfalls mit relativen oder absoluten Pfaden angegeben werden. Die 3 auskommentierten Zeilen bringen wenn sie einkommentiert werden OpenVPN dazu in ein chroot-jail unter dem User nodody zu laufen. Dies ist wohl auf einem kleinen Router etwas übertrieben aber sollte auf einem normalen System verwendet werden. | + | Diese Konfiguration geht davon aus das die Zertifikate mit denen sich der Router authentifiziert im gleichen Verzeichnis wie die Konfiguration liegt. Sollten diese woanders liegen kann dass ebenfalls mit relativen oder absoluten Pfaden angegeben werden. Die 3 auskommentierten Zeilen bringen wenn sie einkommentiert werden OpenVPN dazu in ein chroot-jail unter dem User //nodody// zu laufen. Dies ist wohl auf einem kleinen Router etwas übertrieben aber sollte auf einem normalen System verwendet werden. |
| OpenVPN sollte sich nun mit folgenden Kommando starten lassen: | OpenVPN sollte sich nun mit folgenden Kommando starten lassen: | ||
| Line 57: | Line 59: | ||
| - | < | + | < |
| </ | </ | ||
| - | Sollte alles funktionieren wird der Tunnel aufgebaut und es gibt ein zusätzliches Netzwerk-Intefaces names //tap0//. Um OpenVPN nach einen einen Reboot neu zu starten muss der Initscript noch aktiviert weden: | + | Sollte alles funktionieren wird der Tunnel aufgebaut und es gibt ein zusätzliches Netzwerk |
| - | < | + | < |
| </ | </ | ||
| ==== OLSR ==== | ==== OLSR ==== | ||
| - | Die folgende Konfiguration für OLSR muss in die Datei /// | + | Die folgende Konfiguration für OLSRd muss in die Datei /// |
| Line 84: | Line 86: | ||
| option LinkQualityLevel ' | option LinkQualityLevel ' | ||
| option UseHysteresis | option UseHysteresis | ||
| - | option FIBMetric | + | option FIBMetric |
| option ClearScreen | option ClearScreen | ||
| - | option Willingness | ||
| option LinkQualityAging ' | option LinkQualityAging ' | ||
| - | option LinkQualityAlgorithm | + | option LinkQualityAlgorithm |
| option RtTable | option RtTable | ||
| option RtTableDefault | option RtTableDefault | ||
| Line 94: | Line 95: | ||
| config " | config " | ||
| option Interface | option Interface | ||
| - | option HelloInterval | + | option HelloInterval |
| - | option HelloValidityTime | + | option HelloValidityTime |
| - | option TcInterval | + | option TcInterval |
| - | option TcValidityTime | + | option TcValidityTime |
| - | option MidInterval | + | option MidInterval |
| - | option MidValidityTime | + | option MidValidityTime |
| - | option HnaInterval | + | option HnaInterval |
| - | option HnaValidityTime | + | option HnaValidityTime |
| config " | config " | ||
| option Interface | option Interface | ||
| - | option HelloInterval | + | option HelloInterval |
| - | option HelloValidityTime | + | option HelloValidityTime |
| - | option TcInterval | + | option TcInterval |
| - | option TcValidityTime | + | option TcValidityTime |
| - | option MidInterval | + | option MidInterval |
| - | option MidValidityTime | + | option MidValidityTime |
| - | option HnaInterval | + | option HnaInterval |
| - | option HnaValidityTime | + | option HnaValidityTime |
| </ | </ | ||
| - | Danach muss in der Datei /// | + | Danach muss in der Datei /// |
| Line 121: | Line 122: | ||
| option ifname | option ifname | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ===== Policy Routing ===== | ||
| + | Um das Policy Routing fertig zu konfigurieren brauchen wir noch einen zusätzlichen Initscript der die restlichen Routingeinträge richtig setzt. Ausserdem muss noch ein Paket installiert werden das ein fehlendes Modul für Iptables enthält. Weiters ist es wichtig das in der Datei /// | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | # vi / | ||
| + | </ | ||
| + | folgendes reinkopieren: | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | #!/bin/sh / | ||
| + | |||
| + | START=41 | ||
| + | STOP=39 | ||
| + | |||
| + | start() { | ||
| + | ip route add default via <gateway ip> table default | ||
| + | ip rule add lookup main | ||
| + | ip rule add lookup 111 | ||
| + | ip rule del pref 32766 | ||
| + | ip rule add pref 32766 fwmark 1 lookup 112 | ||
| + | |||
| + | iptables -t mangle -A PREROUTING -i ath0 -j MARK --set-mark 1 | ||
| + | iptables -t mangle -A PREROUTING -i tap0 -j MARK --set-mark 1 | ||
| + | } | ||
| + | |||
| + | stop() { | ||
| + | ip rule del pref 32766 | ||
| + | ip rule add pref 32766 lookup main | ||
| + | ip rule del lookup main | ||
| + | ip rule del lookup 111 | ||
| + | ip route del default via <gateway ip> table default | ||
| + | |||
| + | iptables -t mangle -D PREROUTING -i ath0 -j MARK --set-mark 1 | ||
| + | iptables -t mangle -D PREROUTING -i tap0 -j MARK --set-mark 1 | ||
| + | } | ||
| + | </ | ||
| + | Danach muss das Script noch ausführbar markiert und enabled werden. | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | # / | ||
| + | </ | ||
| + | Nach einem Reboot sollte der Tunnel aufgebaut werden und die Funkinsel somit aktiv sein. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | * [[: | ||
funkinselkamikaze.1224554451.txt · Last modified: (external edit)
