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/06/16 11:17:48] MaciejKrügergluon:extras [2026/02/01 10:11:38] (current) – ↷ Links adapted because of a move operation 114.119.158.138
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 40: Line 41:
  
  
- [[:CategoryDocumentation|CategoryDocumentation]] + 
 +====== 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)  
 + 
 + 
 + 
 +====== Gluon Upgrade/Flash Script ====== 
 +Verwendung  
 + 
 + 
 + 
 +<file>bash flash.sh <ip> <gerät> <channel> [<sysupgrade parameter...>
 +</file> 
 +z.B. für einen vollen re-flash und reset eines lokalen knotens  
 + 
 + 
 + 
 +<file>bash flash.sh 192.168.1.122 cpe210-v3 experimental -a 
 +</file> 
 + 
 + 
 +<file>#!/bin/sh 
 + 
 +set -euo pipefail 
 + 
 +target="$1" 
 +type="$2" 
 +channel="$3" 
 +shift 3 
 + 
 +TMP="/tmp/ffgraz" 
 + 
 +i() { 
 +  tput bold 
 +  echo "[*] $*" 
 +  tput init 
 +
 + 
 +mkdir -p "$TMP" 
 +cd "$TMP" 
 + 
 +tput setaf 8 && i "resolve $type..." 
 + 
 +IMG=$(curl -s "https://ffgraz.mkg20001.io/$channel/images/sysupgrade/" | grep "$type" | grep -o 'href=".*"' | grep -o 'gluon.*[^"]'
 + 
 +if [ ! -e "$IMG.ok" ]; then 
 +  i "dl $IMG" 
 +  curl -# "https://ffgraz.mkg20001.io/$channel/images/sysupgrade/$IMG" -o "$IMG" 
 +  touch "$IMG.ok" 
 +else 
 +  tput setaf 8 && i "cached $IMG" 
 +fi 
 + 
 +i "copy $IMG to $target..." 
 +scp -O -o StrictHostKeyChecking=no "$IMG" "root@$target:/tmp/fw.bin" 
 + 
 +tput setaf 1 && i "sysupgrade $*@$target..." 
 +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> 
 + 
 + 
 + 
 + [[archiv:categorydocumentation|CategoryDocumentation]] 
  
  
  
gluon/extras.1655378268.txt · Last modified: by MaciejKrüger

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki