freifunk:meshkit

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
freifunk:meshkit [26.08.2014 23:53] stephanjfreifunk:meshkit [29.01.2015 01:45] (aktuell) – [Post-Install-Schritte] stephanj
Zeile 18: Zeile 18:
  option dest_port '22'  option dest_port '22'
  option name ‘SSH’  option name ‘SSH’
-- Install fastd from openwork +- Install fastd from openwrt 
- opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/packages/fastd_14-1_ar71xx.ipk+ # opkg update 
 + opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/fastd_16-2_ar71xx.ipk 
 + # /etc/init.d/fastd enable
 - Install kmod-ipip - Install kmod-ipip
- opkg install kmod-ipip+ opkg install kmod-ipip
 - Config fastd - Config fastd
 - Config OLSRd - Config OLSRd
Zeile 43: Zeile 45:
 <code> <code>
 # mkdir /etc/fastd/peers # mkdir /etc/fastd/peers
-# echo "key "3e652183339f2a68cb842a45de65fd1a1ea067c38841a21eb6a178c07a94d660"; +# echo "key \"3e652183339f2a68cb842a45de65fd1a1ea067c38841a21eb6a178c07a94d660\"; 
-remote ipv4 "sj.weimarnetz.de" port 10000;" > /etc/fastd/peers/connectionPartner+remote ipv4 \"sj.weimarnetz.de\" port 10000;" > /etc/fastd/peers/connectionPartner
 </code> </code>
  
Zeile 62: Zeile 64:
         option secure_handshakes 1         option secure_handshakes 1
         option secret '0000000000000000000000000000000000000000000000000000000000000000'         option secret '0000000000000000000000000000000000000000000000000000000000000000'
-        option up 'ip link set up dev $1;ip a a 10.99.254.X/24 dev $1;logger fastd tunnel active'+        option up 'ip link set up dev $1;ip a a 10.99.254.X/24 broadcast 10.99.254.255 dev $1;logger fastd tunnel active'
 </code> </code>
  
 Den **privaten Key** in //secret// eintragen (und entsprechend sicher lokal abspeichern) und den **öffentlichen Key** an [[stephan@freifunk-erfurt.de]] schicken oder im IRC durchgeben. Dieser wird dann in der Server-Config auch als Peer eingetragen. Dann in der letzten Zeile in der IP-Adresse das X durch die Zahl des eindeutigen VPN-Nodes ersetzen, welcher dir dann mitgeteilt wird. Den **privaten Key** in //secret// eintragen (und entsprechend sicher lokal abspeichern) und den **öffentlichen Key** an [[stephan@freifunk-erfurt.de]] schicken oder im IRC durchgeben. Dieser wird dann in der Server-Config auch als Peer eingetragen. Dann in der letzten Zeile in der IP-Adresse das X durch die Zahl des eindeutigen VPN-Nodes ersetzen, welcher dir dann mitgeteilt wird.
  
-===== Network ===== +===== Netzwerk ===== 
-Das Netzwerk wird um ein weiteres Interface erweitert. In die Datei /etc/config/network folgenden Abschnitt einfügen:+Die Network-Config wird um ein weiteres Interface erweitert. In die Datei /etc/config/network folgenden Abschnitt einfügen:
 <code> <code>
 config interface 'mvpn' config interface 'mvpn'
Zeile 74: Zeile 76:
  option proto 'none'  option proto 'none'
 </code> </code>
 +
 +===== OLSR =====
 +Die vollständige OLSRd Config sieht so aus:
 +<code>
 +config olsrd 'olsrd'
 +        option IpVersion '4'
 +        option FIBMetric 'flat'
 +        option LinkQualityLevel '2'
 +        option LinkQualityAlgorithm 'etx_ff'
 +        option OlsrPort '698'
 +        option Willingness '3'
 +        option NatThreshold '1.0'
 +        option RtTable '111'
 +        option RtTableDefault '112'
 +
 +config LoadPlugin 'olsrd_arprefresh'
 +        option library 'olsrd_arprefresh.so.0.1'
 +
 +config LoadPlugin 'olsrd_nameservice'
 +        option library 'olsrd_nameservice.so.0.3'
 +        option latlon_file '/var/run/latlon.js'
 +        option hosts_file '/var/etc/hosts.olsr'
 +        option sighup_pid_file '/var/run/dnsmasq.pid'
 +        option services_file '/var/run/services_olsr'
 +        option suffix '.olsr.erfurt.freifunk.net'
 +
 +config LoadPlugin 'olsrd_txtinfo'
 +        option library 'olsrd_txtinfo.so.0.1'
 +        option accept '0.0.0.0'
 +
 +config InterfaceDefaults 'InterfaceDefaults'
 +        option Ip4Broadcast '255.255.255.255'
 +        option Mode 'mesh'
 +
 +config LoadPlugin 'dyngw_plain'
 +        option library 'olsrd_dyn_gw_plain.so.0.4'
 +        option ignore '1'
 +
 +config LoadPlugin 'olsrd_watchdog'
 +        option library 'olsrd_watchdog.so.0.1'
 +        option file '/var/run/olsrd.watchdog'
 +        option interval '30'
 +
 +config LoadPlugin 'olsrd_jsoninfo'
 +        option library 'olsrd_jsoninfo.so.0.0'
 +
 +config Interface 'wireless0'
 +        option interface 'wireless0'
 +        option Mode 'mesh'
 +
 +config Interface
 +        option interface 'mvpn'
 +        option Mode 'ether'
 +</code>
 +
 +===== Firewall =====
 +
 +Die Firewall-Config (iptables) sollte zwei Ergänzungen in der Datei /etc/config/firewall bekommen
 +  * (Optional) SSH-Port von außen (in der Regel das LAN) durch den WAN-Port des Routers öffnen:
 +<code>
 +config redirect
 +        option enabled '1'
 +        option target 'DNAT'
 +        option src 'wan'
 +        option dest 'lan'
 +        option proto 'tcp'
 +        option src_dport '22'
 +        option dest_ip '10.99.0.6'
 +        option dest_port '22'
 +        option name 'SSH'
 +</code>
 +  * Das VPN in die Firewall-Regeln aufnehmen und mit WAN und Freifunk verbinden:
 +<code>
 +config zone
 +        option input 'ACCEPT'
 +        option output 'ACCEPT'
 +        option name 'meshvpn'
 +        option forward 'ACCEPT'
 +        option network 'mvpn'
 +        option masq '1'
 +        option mtu_fix '1'
 +
 +config forwarding
 +        option dest 'freifunk'
 +        option src 'meshvpn'
 +
 +config forwarding
 +        option dest 'wan'
 +        option src 'meshvpn'
 +
 +config forwarding
 +        option dest 'meshvpn'
 +        option src 'freifunk'
 +
 +config forwarding
 +        option dest 'wan'
 +        option src 'freifunk'
 +</code>
 +
 +**Ergänzung:**
 +Es muss der Parameter ''option mtu_fix 1'' in der Mesh-VPN Zone hinzugefügt werden, um die MSS-Korrektur zu aktivieren. Ohne die MSS-Korrektur werden z.B. Webseiten nicht richtige geladen.
  • freifunk/meshkit.1409090037.txt.gz
  • Zuletzt geändert: 26.08.2014 23:53
  • von stephanj