gluon:extras
This is an old revision of the document!
Table of Contents
Gluon Extras
Dinge, die man mit seinem Gluon-Router machen kann, wenn einem langweilig ist
Gluon als Funkfeuer Gateway
Der Gluon-Router kann als Funkfeuer Gateway konfiguriert werden, d.h. dass 10.12.0.0/16 via NAT einfach vom Privat-WLAN erreichbar ist.
Setup auf dem Knoten
In /etc/config/firewall muss folgendes ergänzt werden
config forwarding 'wan2mesh'
option src 'wan'
option dest 'mesh'
config redirect 'wan2meshSNAT'
option name 'SNAT WAN to Mesh'
option src 'wan'
option src_ip '192.168.178.0/24' # subnetz eueres privat (!) wlans hier angeben
option src_dip '10.12.X.X' # olsr ip hier eintragen
option dest 'mesh'
option target 'SNAT'
option proto 'all'
Setup auf dem Router
FritzBox
Unter Netzwerk > Netzwerkeinstellungen ganz unten bei IPv4-Routen neue Route hinzufügen
IPv4-Netzwerk: 10.12.0.0 Subnetzmaske: 255.255.0.0 Gateway: IP vom Gluon-Knoten
Gluon Upgrade/Flash Script
Verwendung
bash flash.sh <ip> <gerät> <channel> [<sysupgrade parameter...>]
z.B. für einen vollen re-flash und reset eines lokalen knotens
bash flash.sh 192.168.1.122 cpe210-v3 experimental -a
#!/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.*bin')
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
gluon/extras.1657830250.txt · Last modified: by MaciejKrüger
