User Tools

Site Tools


gluon:extras

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gluon:extras [2022/07/14 20:24] – add flash script MaciejKrügergluon:extras [2022/12/29 07:19] (current) – dest_ip MaciejKrüger
Line 24: Line 24:
         option src 'wan'         option src 'wan'
         option src_ip '192.168.178.0/24' # subnetz eueres privat (!) wlans hier angeben         option src_ip '192.168.178.0/24' # subnetz eueres privat (!) wlans hier angeben
 +        option dest_ip '10.12.0.0/16'
         option src_dip '10.12.X.X' # olsr ip hier eintragen         option src_dip '10.12.X.X' # olsr ip hier eintragen
         option dest 'mesh'         option dest 'mesh'
Line 38: Line 39:
  
 IPv4-Netzwerk: 10.12.0.0 Subnetzmaske: 255.255.0.0 Gateway: IP vom Gluon-Knoten  IPv4-Netzwerk: 10.12.0.0 Subnetzmaske: 255.255.0.0 Gateway: IP vom Gluon-Knoten 
 +
 +
 +
 +====== Gluon als Funkfeuer Gateway (olsr2) ======
 +Der Gluon Router kann auch als gateway für das ipv6/olsr2 Netz konfiguriert werden, d.h. dass fdff:182f:da60/48 via NAT einfach vom Privat-WLAN erreichbar ist. 
 +
 +
 +
 +===== Setup auf dem Knoten =====
 +In /etc/config/firewall muss folgendes ergänzt werden 
 +
 +
 +
 +<file># diese regel ist identisch mit der für olsr1
 +config forwarding 'wan2mesh'
 +        option src 'wan'
 +        option dest 'mesh'
 +
 +config redirect 'wan2meshV6SNAT'
 +        option name 'SNAT V6 WAN to Mesh'
 +        option src 'wan'
 +        option src_ip 'fdxx:.../64' # subnetz eueres ULAs hier angeben
 +        option dest_ip 'fdff:182f:da60::/48'
 +        option src_dip 'fdfd:xxxx:...' # olsr ip hier eintragen
 +        option dest 'mesh'
 +        option target 'SNAT'
 +        option proto 'all'
 +</file>
 +
 +
 +===== Setup auf dem Router =====
 +
 +
 +==== FritzBox ====
 +Unter Netzwerk > Netzwerkeinstellungen > IPv6-Einstellungen 
 +
 +Unique Local Addresses: Auf "Unique Local Address (ULA) immer zuweisen" stellen 
 +
 +Vom Gerät jetzt die ULA holen ("ip a s br-wan | grep fd" via ssh) 
 +
 +Unter Netzwerk > Netzwerkeinstellungen bei IPv6-Routen neue Route hinzufügen 
 +
 +IPv6-Netzwerk: fdff:182f:da60 (restliche blöcke leer lassen) Prefixlänge: 48 Gateway: ULA vom Gluon-Knoten (erster block, letzte vier) 
  
  
Line 78: Line 122:
 tput setaf 8 && i "resolve $type..." tput setaf 8 && i "resolve $type..."
  
-IMG=$(curl -s "https://ffgraz.mkg20001.io/$channel/images/sysupgrade/" | grep "$type" | grep -o 'href=".*"' | grep -o 'gluon.*bin')+IMG=$(curl -s "https://ffgraz.mkg20001.io/$channel/images/sysupgrade/" | grep "$type" | grep -o 'href=".*"' | grep -o 'gluon.*[^"]') 
 if [ ! -e "$IMG.ok" ]; then if [ ! -e "$IMG.ok" ]; then
   i "dl $IMG"   i "dl $IMG"
Line 92: Line 137:
 tput setaf 1 && i "sysupgrade $*@$target..." tput setaf 1 && i "sysupgrade $*@$target..."
 ssh "root@$target" -o StrictHostKeyChecking=no sysupgrade "$@" -v /tmp/fw.bin # -n -> disable keeping config ssh "root@$target" -o StrictHostKeyChecking=no sysupgrade "$@" -v /tmp/fw.bin # -n -> disable keeping config
 +</file>
 +
 +
 +====== Gluon Massen-Konfiguration ======
 +Verwendung: 
 +
 +
 +  * entweder  
 +
 +
 +<file>bash config-gluon.sh NAME
 +</file>
 +
 +  * oder 
 +
 +
 +<file>bash config-gluon.sh manman-location manman-node
 +</file>
 +
 +
 +<file>#!/bin/bash
 +
 +# usage: <name>
 +# or: <manman location> <manman node>
 +
 +set -euo pipefail
 +
 +TMP=$(mktemp)
 +
 +run() {
 +  echo "$(tput bold)[*] $*$(tput init)"
 +  ssh "root@192.168.1.1" -oStrictHostKeyChecking=no "-oGlobalKnownHostsFile=$TMP" "-oUserKnownHostsFile=$TMP" "$@"
 +}
 +
 +clean() {
 +  rm "$TMP"
 +}
 +
 +trap clean EXIT
 +
 +run gluon-info
 +
 +if [ $# -gt 1 ]; then
 +  run manman-sync enable "$1" "$2"
 +  run pretty-hostname "$1-$2"
 +else
 +  run pretty-hostname "$1"
 +fi
 +
 +run uci set gluon-setup-mode.@setup_mode[0].configured=1
 +run uci set gluon.core.reconfigure=1
 +run uci commit
 +run reboot
 </file> </file>
  
gluon/extras.1657830250.txt · Last modified: by MaciejKrüger

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki